summaryrefslogtreecommitdiff
path: root/tests/test_rules/test_runner.py
diff options
context:
space:
mode:
authorAlberto Sartori <alberto.sartori@huawei.com>2024-06-04 11:49:04 +0200
committerAlberto Sartori <alberto.sartori@huawei.com>2024-06-04 14:53:39 +0200
commit53ca9245145536c62e1cff0b032ddf41f2a95a84 (patch)
tree46f02daf4aaffb0aedf7304e141cdd0f4819ab09 /tests/test_rules/test_runner.py
parent4602b1967533b61a1fc2ea1bef5c16dcc30e84ba (diff)
downloadrules-cc-53ca9245145536c62e1cff0b032ddf41f2a95a84.tar.gz
["test_rules", "test_case"]: add config vars to be propagated to the runner
The config vars ENV, ARCH, HOST_ARCH, TARGET_ARCH, BUILD_ARCH, OS have been added. This allows to test the rules with different configurations and/or set required values via the "defaults" target of the rules under testing.
Diffstat (limited to 'tests/test_rules/test_runner.py')
-rwxr-xr-xtests/test_rules/test_runner.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_rules/test_runner.py b/tests/test_rules/test_runner.py
index 6fd2d8c..5c0d129 100755
--- a/tests/test_rules/test_runner.py
+++ b/tests/test_rules/test_runner.py
@@ -53,7 +53,8 @@ for t in config.get('targets', []):
should_fail = t[0] == "-"
ret = subprocess.run([
"./bin/just", "install", "--local-build-root", "./build_root", "-C",
- "repos.json", "-o", "/".join(["./outs", target]), target
+ "repos.json", "-o", "/".join(["./outs", target]),
+ "-c", "conf_vars.json", target
],
capture_output=True)
success = ret.returncode != 0 if should_fail else ret.returncode == 0