diff options
-rw-r--r-- | CC/test/RULES | 15 | ||||
-rw-r--r-- | CC/test/test_runner.sh | 2 |
2 files changed, 14 insertions, 3 deletions
diff --git a/CC/test/RULES b/CC/test/RULES index de5a485..fa6fdbc 100644 --- a/CC/test/RULES +++ b/CC/test/RULES @@ -6,7 +6,8 @@ , "tainted": ["test"] , "target_fields": ["srcs", "private-hdrs", "deps", "data"] , "string_fields": ["name", "stage"] - , "config_vars": ["CXX", "CC", "CXXFLAGS", "CFLAGS", "ENV"] + , "config_vars": + ["CXX", "CC", "CXXFLAGS", "CFLAGS", "ENV", "CC_TEST_LAUNCHER"] , "implicit": { "defaults": [["./", "..", "defaults"]] , "proto-deps": [] @@ -36,6 +37,10 @@ [ "The flags for CXX to be used instead of the default ones" , "taken from the [\"CC\", \"defaults\"] target" ] + , "CC_TEST_LAUNCHER": + [ "List of strings representing the launcher that is prepend to the" + , "command line for running the test binary." + ] } , "imports": { "artifacts": ["./", "../..", "field_artifacts"] @@ -238,7 +243,13 @@ , {"type": "var", "name": "staged test binary"} ] } - , "cmd": ["sh", "./runner.sh"] + , "cmd": + { "type": "++" + , "$1": + [ ["sh", "./runner.sh"] + , {"type": "var", "name": "CC_TEST_LAUNCHER", "default": []} + ] + } , "may_fail": ["test"] , "fail_message": { "type": "join" diff --git a/CC/test/test_runner.sh b/CC/test/test_runner.sh index ed9f48a..5256867 100644 --- a/CC/test/test_runner.sh +++ b/CC/test/test_runner.sh @@ -21,7 +21,7 @@ date +%s > ../time-start # TODO: # - proper wrapping with timeout # - test arguments to select specific test cases -if ../test > ../stdout 2> ../stderr +if "$@" ../test > ../stdout 2> ../stderr then RESULT=PASS else |