diff options
Diffstat (limited to 'shell/test')
-rw-r--r-- | shell/test/EXPRESSIONS | 41 | ||||
-rw-r--r-- | shell/test/RULES | 6 | ||||
-rwxr-xr-x | shell/test/runner | 1 |
3 files changed, 47 insertions, 1 deletions
diff --git a/shell/test/EXPRESSIONS b/shell/test/EXPRESSIONS index e158a4c..2526973 100644 --- a/shell/test/EXPRESSIONS +++ b/shell/test/EXPRESSIONS @@ -14,6 +14,7 @@ , "imports": { "artifacts_list": ["./", "../..", "field_artifacts_list"] , "runfiles_list": ["./", "../..", "field_runfiles_list"] + , "map_provider": ["./", "../..", "field_map_provider"] , "default-TOOLCHAIN": ["./", "../../CC", "default-TOOLCHAIN"] , "default-NON_SYSTEM_TOOLS": ["./", "../../CC", "default-NON_SYSTEM_TOOLS"] @@ -153,6 +154,19 @@ } } ] + , [ "run-libs" + , { "type": "TREE" + , "$1": + { "type": "let*" + , "bindings": + [ ["fieldname", {"type": "var", "name": "deps-fieldname"}] + , ["provider", "run-libs"] + , ["transition", {"type": "var", "name": "deps-transition"}] + ] + , "body": {"type": "CALL_EXPRESSION", "name": "map_provider"} + } + } + ] , [ "attempt marker" , { "type": "if" , "cond": @@ -191,6 +205,10 @@ , "key": "work" , "value": {"type": "var", "name": "deps"} } + , { "type": "singleton_map" + , "key": "libs" + , "value": {"type": "var", "name": "run-libs"} + } , {"type": "var", "name": "toolchain"} , {"type": "var", "name": "runner"} , {"type": "var", "name": "invocation"} @@ -202,6 +220,29 @@ , [ "cmd" , {"type": "++", "$1": [["./runner"], {"type": "var", "name": "keep"}]} ] + , [ "test_env" + , { "type": "map_union" + , "$1": + [ { "type": "if" + , "cond": + { "type": "==" + , "$1": {"type": "var", "name": "ATTEMPT"} + , "$2": null + } + , "then": {"type": "empty_map"} + , "else": + { "type": "singelton_map" + , "key": "TEST_RUN_NUMBER" + , "value": {"type": "var", "name": "ATTEMPT"} + } + } + , { "type": "var" + , "name": "TEST_ENV" + , "default": {"type": "empty_map"} + } + ] + } + ] ] , "body": { "type": "if" diff --git a/shell/test/RULES b/shell/test/RULES index 6539622..7a7aebd 100644 --- a/shell/test/RULES +++ b/shell/test/RULES @@ -21,6 +21,10 @@ , "outside the working directory and the TEST_TMPDIR." , "For convenience, the environment variable TMPDIR is also set to TEST_TMPDIR." , "" + , "If the configuration variable RUNS_PER_TEST is set, the environment" + , "variable TEST_RUN_NUMBER will also be set to the number of the attempt," + , "counting from 0." + , "" , "This running of the test is carried out by the implicit dependency" , "on the target \"runner\". By setting this target in the target layer" , "of this rues repository (instead of letting it default to the" @@ -62,7 +66,7 @@ , "default to the respective file) the layout of the summary can be" , "changed globally." ] - , "TEST_ENV": ["The environment for executing the test runner."] + , "TEST_ENV": ["Additional environment for executing the test runner."] , "TIMEOUT_SCALE": ["Factor on how to scale the timeout for this test. Defaults to 1.0."] , "TARGET_ARCH": diff --git a/shell/test/runner b/shell/test/runner index f762355..2f97005 100755 --- a/shell/test/runner +++ b/shell/test/runner @@ -25,6 +25,7 @@ echo UNKNOWN > time-stop mkdir scratch export TEST_TMPDIR=$(realpath scratch) export TMPDIR="${TEST_TMPDIR}" +export LD_LIBRARY_PATH=$(realpath ./libs):$LD_LIBRARY_PATH # Change to the working directory; note: while unlikely, the test # might not have test data, so we have to ensure the presence of |