From f077a55bcccfb4717b51485911d502f554dcc976 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 6 May 2025 15:15:22 +0200 Subject: end-to-end tests: consider both just-mr implementations So far, the configuration variable TEST_BOOTSTRAP_JUST_MR could be used to decide whether to run the end-to-end tests with the compiled version of just-mr or the python script, which is mainly used for bootstrapping only. To have a more simple way of running all tests in all relevant configurations, make this an internal variable and branch on the possible values, similarly as we already do for the possible values of TEST_COMPATIBLE_REMOTE. --- test/end-to-end/TARGETS | 50 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/test/end-to-end/TARGETS b/test/end-to-end/TARGETS index 4959a4b4..7907f5df 100644 --- a/test/end-to-end/TARGETS +++ b/test/end-to-end/TARGETS @@ -59,23 +59,26 @@ , "stage": ["using-remote"] , "deps": ["remote tests, compatible", "remote tests, native"] } -, "TESTS": +, "just-mr tests (unconfigured)": { "type": ["@", "rules", "test", "suite"] , "arguments_config": ["TEST_BOOTSTRAP_JUST_MR"] - , "stage": ["end-to-end"] + , "stage": + [ { "type": "if" + , "cond": {"type": "var", "name": "TEST_BOOTSTRAP_JUST_MR"} + , "then": "bootstrap-script" + , "else": "native" + } + ] , "deps": { "type": "`" , "$1": [ "remote tests" - , ["./", "actions", "TESTS"] - , ["./", "build-fails", "TESTS"] , ["./", "built-in-rules", "TESTS"] , ["./", "cli", "TESTS"] - , ["./", "execution-service", "TESTS"] + , ["./", "just-lock", "TESTS"] + , ["./", "target-cache", "TESTS"] , ["./", "gc", "TESTS"] - , ["./", "generated-binary", "TESTS"] , ["./", "git-import", "TESTS"] - , ["./", "just-lock", "TESTS"] , { "type": ",@" , "$1": { "type": "if" @@ -83,8 +86,39 @@ , "else": [["./", "profile", "TESTS"]] } } + ] + } + } +, "just-mr tests, bootstrap-script": + { "type": "configure" + , "tainted": ["test"] + , "target": "just-mr tests (unconfigured)" + , "config": {"type": "'", "$1": {"TEST_BOOTSTRAP_JUST_MR": true}} + } +, "just-mr tests, native": + { "type": "configure" + , "tainted": ["test"] + , "target": "just-mr tests (unconfigured)" + , "config": {"type": "'", "$1": {"TEST_BOOTSTRAP_JUST_MR": false}} + } +, "just-mr tests": + { "type": ["@", "rules", "test", "suite"] + , "stage": ["with-just-mr"] + , "deps": ["just-mr tests, bootstrap-script", "just-mr tests, native"] + } +, "TESTS": + { "type": ["@", "rules", "test", "suite"] + , "arguments_config": ["TEST_BOOTSTRAP_JUST_MR"] + , "stage": ["end-to-end"] + , "deps": + { "type": "`" + , "$1": + [ "just-mr tests" + , ["./", "actions", "TESTS"] + , ["./", "build-fails", "TESTS"] + , ["./", "execution-service", "TESTS"] + , ["./", "generated-binary", "TESTS"] , ["./", "symlinks", "TESTS"] - , ["./", "target-cache", "TESTS"] , ["./", "target-tests", "TESTS"] , ["./", "user-errors", "TESTS"] ] -- cgit v1.2.3