diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/test/EXPRESSIONS | 40 | ||||
-rw-r--r-- | shell/test/RULES | 6 | ||||
-rwxr-xr-x | shell/test/runner | 1 |
3 files changed, 45 insertions, 2 deletions
diff --git a/shell/test/EXPRESSIONS b/shell/test/EXPRESSIONS index 80e6cdb..2692c31 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"] } , "expression": { "type": "let*" @@ -68,6 +69,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": @@ -106,6 +120,10 @@ , "key": "work" , "value": {"type": "var", "name": "deps"} } + , { "type": "singleton_map" + , "key": "libs" + , "value": {"type": "var", "name": "run-libs"} + } , {"type": "var", "name": "runner"} , {"type": "var", "name": "test.sh"} , {"type": "var", "name": "attempt marker"} @@ -116,7 +134,27 @@ , {"type": "++", "$1": [["./runner"], {"type": "var", "name": "keep"}]} ] , [ "test_env" - , {"type": "var", "name": "TEST_ENV", "default": {"type": "empty_map"}} + , { "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": diff --git a/shell/test/RULES b/shell/test/RULES index 44acb00..ec26609 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" @@ -61,7 +65,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 a99d5b7..97c75ef 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 |