diff options
Diffstat (limited to 'unit-tests')
-rw-r--r-- | unit-tests/function/buildfile | 3 | ||||
-rw-r--r-- | unit-tests/function/driver.cxx | 4 | ||||
-rw-r--r-- | unit-tests/test/script/parser/driver.cxx | 9 |
3 files changed, 11 insertions, 5 deletions
diff --git a/unit-tests/function/buildfile b/unit-tests/function/buildfile index 5c326b8..27c73d1 100644 --- a/unit-tests/function/buildfile +++ b/unit-tests/function/buildfile @@ -4,6 +4,8 @@ #@@ Temporary until we get utility library support. # +if ($cxx.target.class != "windows") + cxx.libs += -lpthread import libs = libbutl%lib{butl} src = token lexer diagnostics utility variable name b-options types-parsers \ context scope parser target operation rule prerequisite file module function \ @@ -11,6 +13,7 @@ functions-builtin functions-path functions-process-path functions-string \ functions-target-triplet algorithm search dump filesystem \ config/{utility init operation} + exe{driver}: cxx{driver} ../../build2/cxx{$src} $libs test{call syntax} include ../../build2/ diff --git a/unit-tests/function/driver.cxx b/unit-tests/function/driver.cxx index 2f605b0..4fbbdb6 100644 --- a/unit-tests/function/driver.cxx +++ b/unit-tests/function/driver.cxx @@ -26,7 +26,9 @@ namespace build2 main (int, char* argv[]) { init (argv[0], 1); // Fake build system driver, default verbosity. - reset (strings ()); // No command line variables. + + ulock ml (model); + reset (ml, strings ()); // No command line variables. function_family f ("dummy"); diff --git a/unit-tests/test/script/parser/driver.cxx b/unit-tests/test/script/parser/driver.cxx index f641dc4..1e959c1 100644 --- a/unit-tests/test/script/parser/driver.cxx +++ b/unit-tests/test/script/parser/driver.cxx @@ -142,9 +142,10 @@ namespace build2 { tracer trace ("main"); - init (argv[0], 1); // Fake build system driver, default verbosity. - sched.startup (1); // Serial execution. - reset (strings ()); // No command line variables. + init (argv[0], 1); // Fake build system driver, default verbosity. + ulock ml (model); + sched.startup (1); // Serial execution. + reset (ml, strings ()); // No command line variables. bool scope (false); bool id (false); @@ -191,7 +192,7 @@ namespace build2 value& v ( tt.assign ( - var_pool.insert<target_triplet> ( + var_pool.rw (ml).insert<target_triplet> ( "test.target", variable_visibility::project))); v = cast<target_triplet> ((*global_scope)["build.host"]); |