From 0afc1de20d04a62306084fc0355d7754ad7edf44 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 10 Apr 2024 10:23:13 +0200 Subject: tests with infrastructure: keep remote build root Often outputs are only referenced as blobs but not downloaded to the working directory of the test. This can make it hard to understand errors, as the respective artifacts are not available for inspection. This is even more important in case of tests with a provided serve endpoint as then even the error message of a failed serve build is only referenced as blob. Solve this by keeping the local build root of the remote-execution service using the fact that all objects are transferred between the serve endpoint and the client go through the remote-execution endpoint. --- test/end-to-end/EXPRESSIONS | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') diff --git a/test/end-to-end/EXPRESSIONS b/test/end-to-end/EXPRESSIONS index 345b6069..711b1d94 100644 --- a/test/end-to-end/EXPRESSIONS +++ b/test/end-to-end/EXPRESSIONS @@ -12,6 +12,7 @@ , "TEST_COMPATIBLE_REMOTE" , "TEST_REMOTE_EXECUTION" , "TIMEOUT_SCALE" + , "TEST_STANDALONE_SERVE" ] , "imports": { "artifacts_list": ["@", "rules", "", "field_artifacts_list"] @@ -82,6 +83,13 @@ ] } ] + , [ "out_dirs" + , { "type": "if" + , "cond": {"type": "var", "name": "TEST_STANDALONE_SERVE"} + , "then": ["serve"] + , "else": ["remote"] + } + ] , [ "inputs" , { "type": "map_union" , "$1": @@ -125,6 +133,7 @@ , "then": { "type": "ACTION" , "outs": {"type": "var", "name": "outs"} + , "out_dirs": {"type": "var", "name": "out_dirs"} , "inputs": {"type": "var", "name": "inputs"} , "cmd": {"type": "var", "name": "cmd"} , "env": {"type": "var", "name": "test_env"} @@ -151,6 +160,7 @@ , "else": { "type": "ACTION" , "outs": {"type": "var", "name": "outs"} + , "out_dirs": {"type": "var", "name": "out_dirs"} , "inputs": {"type": "var", "name": "inputs"} , "cmd": {"type": "var", "name": "cmd"} , "env": {"type": "var", "name": "test_env"} @@ -187,6 +197,7 @@ , "TEST_COMPATIBLE_REMOTE" , "TEST_REMOTE_EXECUTION" , "TIMEOUT_SCALE" + , "TEST_STANDALONE_SERVE" ] , "imports": {"action": "test-action"} , "expression": -- cgit v1.2.3