summaryrefslogtreecommitdiff
path: root/test/end-to-end
diff options
context:
space:
mode:
Diffstat (limited to 'test/end-to-end')
-rw-r--r--test/end-to-end/EXPRESSIONS22
-rw-r--r--test/end-to-end/RULES19
2 files changed, 34 insertions, 7 deletions
diff --git a/test/end-to-end/EXPRESSIONS b/test/end-to-end/EXPRESSIONS
index 12f0772d..3c8a06c3 100644
--- a/test/end-to-end/EXPRESSIONS
+++ b/test/end-to-end/EXPRESSIONS
@@ -8,6 +8,7 @@
, "data"
, "extra_infra"
, "keep"
+ , "keep-dirs"
, "transition"
, "TEST_COMPATIBLE_REMOTE"
, "TEST_REMOTE_EXECUTION"
@@ -85,10 +86,22 @@
}
]
, [ "out_dirs"
- , { "type": "if"
- , "cond": {"type": "var", "name": "TEST_STANDALONE_SERVE"}
- , "then": ["serve"]
- , "else": ["remote"]
+ , { "type": "++"
+ , "$1":
+ [ { "type": "if"
+ , "cond": {"type": "var", "name": "TEST_STANDALONE_SERVE"}
+ , "then": ["serve"]
+ , "else": ["remote"]
+ }
+ , { "type": "foreach"
+ , "var": "dir_path"
+ , "range": {"type": "var", "name": "keep-dirs"}
+ , "body":
+ { "type": "join"
+ , "$1": ["work/", {"type": "var", "name": "dir_path"}]
+ }
+ }
+ ]
}
]
, [ "inputs"
@@ -197,6 +210,7 @@
, "data"
, "extra_infra"
, "keep"
+ , "keep-dirs"
, "transition"
, "TEST_COMPATIBLE_REMOTE"
, "TEST_REMOTE_EXECUTION"
diff --git a/test/end-to-end/RULES b/test/end-to-end/RULES
index c02f9f24..0e71a45f 100644
--- a/test/end-to-end/RULES
+++ b/test/end-to-end/RULES
@@ -4,7 +4,7 @@
, "implicitly assuming a remote execution in the background."
]
, "target_fields": ["deps", "test"]
- , "string_fields": ["keep", "name"]
+ , "string_fields": ["keep", "name", "keep-dirs"]
, "config_vars":
[ "ARCH"
, "HOST_ARCH"
@@ -46,6 +46,11 @@
, "the test might generate that should be kept as part of the output."
, "This might be useful for further analysis of the test"
]
+ , "keep-dirs":
+ [ "List of names (relative to the test working directory) of directories"
+ , "that the test might generate that should be kept as part of the"
+ , "output. This might be useful for further analysis of the test"
+ ]
, "deps":
[ "Any targets that should be staged (with artifacts and runfiles) into"
, "the tests working directory"
@@ -79,7 +84,8 @@
, " the respective file descriptor"
, "remotestdout/remotestderr: Any output of the remote-execution server"
, " implicit to that test"
- , "work: In this directory, all the files specified to \"keep\" are staged"
+ , "work: In this directory, all the files specified to \"keep\" and"
+ , " \"keep-dirs\" are staged"
, "time-start/time-stop: The time (decimally coded) in seconds since the"
, " epoch when the test invocation started and ended."
, "pwd: the directory in which the test was carried out"
@@ -130,6 +136,7 @@
}
]
, ["keep", {"type": "FIELD", "name": "keep"}]
+ , ["keep-dirs", {"type": "FIELD", "name": "keep-dirs"}]
, ["deps-fieldname", "deps"]
, ["transition", {"type": "CALL_EXPRESSION", "name": "host transition"}]
]
@@ -280,7 +287,7 @@
, "in the background."
]
, "target_fields": ["deps", "test", "repos"]
- , "string_fields": ["keep", "name"]
+ , "string_fields": ["keep", "keep-dirs", "name"]
, "config_vars":
[ "ARCH"
, "HOST_ARCH"
@@ -332,6 +339,11 @@
, "the test might generate that should be kept as part of the output."
, "This might be useful for further analysis of the test"
]
+ , "keep-dirs":
+ [ "List of names (relative to the test working directory) of directories"
+ , "that the test might generate that should be kept as part of the"
+ , "output. This might be useful for further analysis of the test"
+ ]
, "deps":
[ "Any targets that should be staged (with artifacts and runfiles) into"
, "the tests working directory"
@@ -418,6 +430,7 @@
}
]
, ["keep", {"type": "FIELD", "name": "keep"}]
+ , ["keep-dirs", {"type": "FIELD", "name": "keep-dirs"}]
, ["deps-fieldname", "deps"]
, ["transition", {"type": "CALL_EXPRESSION", "name": "host transition"}]
, [ "data"