summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/test/EXPRESSIONS14
-rw-r--r--shell/test/RULES11
2 files changed, 23 insertions, 2 deletions
diff --git a/shell/test/EXPRESSIONS b/shell/test/EXPRESSIONS
index e445c2a..44cb48a 100644
--- a/shell/test/EXPRESSIONS
+++ b/shell/test/EXPRESSIONS
@@ -6,6 +6,7 @@
, "name"
, "test.sh"
, "keep"
+ , "keep-dirs"
, "runner"
, "deps-fieldname"
, "deps-transition"
@@ -184,6 +185,16 @@
]
}
]
+ , [ "out_dirs"
+ , { "type": "foreach"
+ , "var": "dir_path"
+ , "range": {"type": "var", "name": "keep-dirs"}
+ , "body":
+ { "type": "join"
+ , "$1": ["work/", {"type": "var", "name": "dir_path"}]
+ }
+ }
+ ]
, [ "inputs"
, { "type": "map_union"
, "$1":
@@ -210,6 +221,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"}
@@ -225,6 +237,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"}
@@ -254,6 +267,7 @@
, "name"
, "test.sh"
, "keep"
+ , "keep-dirs"
, "runner"
, "deps-fieldname"
, "deps-transition"
diff --git a/shell/test/RULES b/shell/test/RULES
index e3ee4a2..5d83e1d 100644
--- a/shell/test/RULES
+++ b/shell/test/RULES
@@ -28,7 +28,7 @@
, "script":
{ "doc": ["Shell test, given by a test script"]
, "target_fields": ["deps", "test"]
- , "string_fields": ["keep", "name"]
+ , "string_fields": ["keep", "keep-dirs", "name"]
, "config_vars":
[ "ARCH"
, "HOST_ARCH"
@@ -63,6 +63,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"
@@ -118,7 +123,8 @@
, " generating test reports."
, "stdout/stderr: Any output the invocation of the test binary produced on"
, " the respective file descriptor"
- , "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"
@@ -171,6 +177,7 @@
}
]
, ["keep", {"type": "FIELD", "name": "keep"}]
+ , ["keep-dirs", {"type": "FIELD", "name": "keep-dirs"}]
, ["runner", {"type": "FIELD", "name": "runner"}]
, ["deps-fieldname", "deps"]
, [ "deps-transition"