From ea22643b2217921df74ea14df47d7c83987d5761 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 9 Dec 2016 17:29:27 +0200 Subject: Initial parallel scheduler implementation, use to run testscrips --- unit-tests/test/script/lexer/variable.test | 14 ++++---------- unit-tests/test/script/parser/buildfile | 5 ++++- unit-tests/test/script/parser/driver.cxx | 2 ++ 3 files changed, 10 insertions(+), 11 deletions(-) (limited to 'unit-tests/test') diff --git a/unit-tests/test/script/lexer/variable.test b/unit-tests/test/script/lexer/variable.test index 6478fea..302a8b1 100644 --- a/unit-tests/test/script/lexer/variable.test +++ b/unit-tests/test/script/lexer/variable.test @@ -29,18 +29,12 @@ $* <"0" >>EOO EOO -$* <"10" >>EOO -'10' - -EOO - -$* <"101" >>EOO -'101' - -EOO - $* <"1abc" >>EOO '1' 'abc' EOO + +$* <"10" 2>>EOE != 0 +stdin:1:1: error: multi-digit special variable name +EOE diff --git a/unit-tests/test/script/parser/buildfile b/unit-tests/test/script/parser/buildfile index b570901..ad32494 100644 --- a/unit-tests/test/script/parser/buildfile +++ b/unit-tests/test/script/parser/buildfile @@ -4,12 +4,15 @@ #@@ Temporary until we get utility library support. # +if ($cxx.target.class != "windows") + cxx.libs += -lpthread import libs = libbutl%lib{butl} src = token lexer parser diagnostics utility variable name context target \ scope prerequisite file module operation rule b-options algorithm search \ filesystem function functions-builtin functions-path functions-process-path \ functions-string config/{utility init operation} dump types-parsers \ -test/{target script/{token lexer parser script}} +test/{target script/{token lexer parser script}} \ +scheduler exe{driver}: cxx{driver} ../../../../build2/cxx{$src} $libs \ test{cleanup command-if command-re-parse description exit expansion \ diff --git a/unit-tests/test/script/parser/driver.cxx b/unit-tests/test/script/parser/driver.cxx index 83160cb..c116680 100644 --- a/unit-tests/test/script/parser/driver.cxx +++ b/unit-tests/test/script/parser/driver.cxx @@ -10,6 +10,7 @@ #include #include +#include #include @@ -136,6 +137,7 @@ 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. bool scope (false); -- cgit v1.1