diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-05-07 15:52:32 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-05-07 17:01:31 +0200 |
commit | d563aba13a34cf94d4cc689ebe779069f622d9f3 (patch) | |
tree | a09b1bea21fb12f87ace9159755cb52bb283fb23 | |
parent | 97f2dbe65ac7bace3c2a252a5edbb7aa95a1b674 (diff) | |
download | justbuild-d563aba13a34cf94d4cc689ebe779069f622d9f3.tar.gz |
tests: add a target to run precisely the unit tests
While there, also make sure we run unit tests that honor
TEST_COMPATIBLE_REMOTE in both configurations.
-rw-r--r-- | test/TARGETS | 75 |
1 files changed, 64 insertions, 11 deletions
diff --git a/test/TARGETS b/test/TARGETS index 3e166069..b1082951 100644 --- a/test/TARGETS +++ b/test/TARGETS @@ -45,21 +45,68 @@ ] , "stage": ["test"] } +, "unit tests with compatibility (unconfigured)": + { "type": ["@", "rules", "test", "suite"] + , "arguments_config": ["TEST_COMPATIBLE_REMOTE"] + , "stage": + [ { "type": "if" + , "cond": {"type": "var", "name": "TEST_COMPATIBLE_REMOTE"} + , "then": "compatible" + , "else": "native" + } + ] + , "deps": [["./", "buildtool", "TESTS"]] + } +, "unit tests with compatibility, compatible": + { "type": "configure" + , "tainted": ["test"] + , "target": "unit tests with compatibility (unconfigured)" + , "config": {"type": "'", "$1": {"TEST_COMPATIBLE_REMOTE": true}} + } +, "unit tests with compatibility, native": + { "type": "configure" + , "tainted": ["test"] + , "target": "unit tests with compatibility (unconfigured)" + , "config": {"type": "'", "$1": {"TEST_COMPATIBLE_REMOTE": false}} + } +, "unit tests with compatibility": + { "type": ["@", "rules", "test", "suite"] + , "stage": ["using-remote"] + , "deps": + [ "unit tests with compatibility, compatible" + , "unit tests with compatibility, native" + ] + } , "TESTS": { "type": ["@", "rules", "test", "suite"] - , "arguments_config": ["DROP_LARGE_TESTS"] + , "arguments_config": ["DROP_LARGE_TESTS", "DROP_END_TO_END_TESTS"] , "deps": - { "type": "++" + { "type": "`" , "$1": - [ [ ["./", "buildtool", "TESTS"] - , ["./", "utils", "TESTS"] - , ["./", "end-to-end", "TESTS"] - , ["./", "other_tools", "TESTS"] - ] - , { "type": "if" - , "cond": {"type": "var", "name": "DROP_LARGE_TESTS"} - , "then": [] - , "else": ["bootstrap-test"] + [ "unit tests with compatibility" + , ["./", "utils", "TESTS"] + , ["./", "other_tools", "TESTS"] + , { "type": ",@" + , "$1": + { "type": "if" + , "cond": {"type": "var", "name": "DROP_END_TO_END_TESTS"} + , "then": [] + , "else": [["./", "end-to-end", "TESTS"]] + } + } + , { "type": ",@" + , "$1": + { "type": "if" + , "cond": + { "type": "or" + , "$1": + [ {"type": "var", "name": "DROP_END_TO_END_TESTS"} + , {"type": "var", "name": "DROP_LARGE_TESTS"} + ] + } + , "then": [] + , "else": ["bootstrap-test"] + } } ] } @@ -91,6 +138,12 @@ {"type": "env", "vars": ["OS", "ARCH", "HOST_ARCH", "TARGET_ARCH"]} } } +, "UNIT_TESTS": + { "type": "configure" + , "tainted": ["test"] + , "target": "ALL" + , "config": {"type": "'", "$1": {"DROP_END_TO_END_TESTS": true}} + } , "bootstrap-test": { "type": "configure" , "tainted": ["test"] |