From 95284ec611a53ca9c7925aad4bbe3f6561de018a Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Tue, 13 Dec 2022 17:20:01 +0100 Subject: rules: Add support for shared libraries --- shell/test/EXPRESSIONS | 18 ++++++++++++++++++ shell/test/test_runner.sh | 1 + 2 files changed, 19 insertions(+) (limited to 'shell/test') diff --git a/shell/test/EXPRESSIONS b/shell/test/EXPRESSIONS index d9b1fbc..d1d7e64 100644 --- a/shell/test/EXPRESSIONS +++ b/shell/test/EXPRESSIONS @@ -12,6 +12,7 @@ , "imports": { "artifacts_list": ["./", "../..", "field_artifacts_list"] , "runfiles_list": ["./", "../..", "field_runfiles_list"] + , "map_provider": ["./", "../..", "field_map_provider"] } , "expression": { "type": "let*" @@ -66,6 +67,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": @@ -104,6 +118,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"} diff --git a/shell/test/test_runner.sh b/shell/test/test_runner.sh index a99d5b7..97c75ef 100755 --- a/shell/test/test_runner.sh +++ b/shell/test/test_runner.sh @@ -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 -- cgit v1.2.3