diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-04-17 15:35:58 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-04-17 15:35:58 +0200 |
commit | 5d0d60eabe56f5f8b84fe857b6e857d60c0a44c8 (patch) | |
tree | 6e79d6b6bc9c9ecc21aa2407953e5f1899910c61 | |
parent | ee004deede4f008f55d4b5b548521c209dafda9b (diff) | |
parent | df57e7ac05e218a910ce56a1a2bff16ccdaaba20 (diff) | |
download | rules-cc-5d0d60eabe56f5f8b84fe857b6e857d60c0a44c8.tar.gz |
Merge branch 'just-rules' into rules
-rw-r--r-- | CC/test/RULES | 40 | ||||
-rwxr-xr-x | CC/test/runner | 2 |
2 files changed, 12 insertions, 30 deletions
diff --git a/CC/test/RULES b/CC/test/RULES index 93356aa..601807a 100644 --- a/CC/test/RULES +++ b/CC/test/RULES @@ -45,9 +45,10 @@ , "srcs": [ "The sources of the test binary" , "" - , "The resulting test binary in an environment where it can assume" + , "The resulting test binary is run in an environment where it can assume" , "that the environment variable TEST_TMPDIR points to a" - , "director that may be used exclusively by this test." + , "directory that may be used exclusively by this test." + , "For convenience, the environment variable TMPDIR is also set to TEST_TMPDIR." , "" , "This running of the test is carried out by the implicit dependency" , "on the target \"runner\". By setting this target in the target layer" @@ -75,7 +76,7 @@ , "data": ["Any files the test binary needs access to when running"] , "defaults": ["The C/C++ toolchain to use"] , "runner": - [ "The test runner which starts the actual test binrary after providing" + [ "The test runner which starts the actual test binary after providing" , "the respective environment. The runner also takes care of capturing" , "stdout/stderr and timing information." ] @@ -207,32 +208,13 @@ , ["deps-transition", {"type": "var", "name": "host-trans"}] , ["deps-fieldnames", ["private-deps", "defaults"]] , [ "runner" - , { "type": "map_union" - , "$1": - { "type": "foreach" - , "var": "runner" - , "range": {"type": "FIELD", "name": "runner"} - , "body": - { "type": "map_union" - , "$1": - { "type": "foreach" - , "var": "runner" - , "range": - { "type": "values" - , "$1": - { "type": "DEP_ARTIFACTS" - , "dep": {"type": "var", "name": "runner"} - , "transition": {"type": "var", "name": "host-trans"} - } - } - , "body": - { "type": "singleton_map" - , "key": "runner" - , "value": {"type": "var", "name": "runner"} - } - } - } - } + , { "type": "let*" + , "bindings": + [ ["fieldname", "runner"] + , ["location", "runner"] + , ["transition", {"type": "var", "name": "host-trans"}] + ] + , "body": {"type": "CALL_EXPRESSION", "name": "stage"} } ] , ["test-args", {"type": "FIELD", "name": "args", "default": []}] diff --git a/CC/test/runner b/CC/test/runner index fc1f04c..45a1bee 100755 --- a/CC/test/runner +++ b/CC/test/runner @@ -46,7 +46,7 @@ os.makedirs(TEMP_DIR, exist_ok=True) WORK_DIR = os.path.realpath("work") os.makedirs(WORK_DIR, exist_ok=True) -ENV = dict(os.environ, TEST_TMPDIR=TEMP_DIR) +ENV = dict(os.environ, TEST_TMPDIR=TEMP_DIR, TMPDIR=TEMP_DIR) with open('test-launcher.json') as f: test_launcher = json.load(f) |