diff options
-rw-r--r-- | CC/test/EXPRESSIONS | 14 | ||||
-rw-r--r-- | CC/test/RULES | 1 | ||||
-rwxr-xr-x | CC/test/runner | 2 | ||||
-rw-r--r-- | shell/test/EXPRESSIONS | 2 | ||||
-rw-r--r-- | shell/test/RULES | 7 | ||||
-rwxr-xr-x | shell/test/runner | 1 |
6 files changed, 23 insertions, 4 deletions
diff --git a/CC/test/EXPRESSIONS b/CC/test/EXPRESSIONS index b0a7f2b..1646dd7 100644 --- a/CC/test/EXPRESSIONS +++ b/CC/test/EXPRESSIONS @@ -165,7 +165,13 @@ [ [ "test-results" , { "type": "ACTION" , "outs": - ["result", "stdout", "stderr", "time-start", "time-stop"] + [ "result" + , "stdout" + , "stderr" + , "time-start" + , "time-stop" + , "pwd" + ] , "inputs": {"type": "var", "name": "test input"} , "cmd": ["./runner"] , "env": @@ -291,7 +297,11 @@ , [ "artifacts" , { "type": "map_union" , "$1": - [ {"type": "var", "name": "summary"} + [ { "type": "singleton_map" + , "key": "pwd" + , "value": {"type": "BLOB", "data": "/summary"} + } + , {"type": "var", "name": "summary"} , { "type": "singleton_map" , "key": "work" , "value": diff --git a/CC/test/RULES b/CC/test/RULES index 7444551..e23359e 100644 --- a/CC/test/RULES +++ b/CC/test/RULES @@ -143,6 +143,7 @@ , " the respective file descriptor" , "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" ] , "runfiles_doc": [ "A tree consisting of the artifacts staged at the name of the test." diff --git a/CC/test/runner b/CC/test/runner index 45a1bee..4984b17 100755 --- a/CC/test/runner +++ b/CC/test/runner @@ -36,6 +36,8 @@ def dump_results() -> None: f.write("%s\n" % (stdout, )) with open("stderr", "w") as f: f.write("%s\n" % (stderr, )) + with open("pwd", "w") as f: + f.write("%s\n" % (os.getcwd(), )) dump_results() diff --git a/shell/test/EXPRESSIONS b/shell/test/EXPRESSIONS index e158a4c..e445c2a 100644 --- a/shell/test/EXPRESSIONS +++ b/shell/test/EXPRESSIONS @@ -172,7 +172,7 @@ , [ "outs" , { "type": "++" , "$1": - [ ["result", "stdout", "stderr", "time-start", "time-stop"] + [ ["result", "stdout", "stderr", "time-start", "time-stop", "pwd"] , { "type": "foreach" , "var": "filename" , "range": {"type": "var", "name": "keep"} diff --git a/shell/test/RULES b/shell/test/RULES index af18828..ef67708 100644 --- a/shell/test/RULES +++ b/shell/test/RULES @@ -93,6 +93,7 @@ , "work: In this directory, all the files specified to \"keep\" 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" ] , "runfiles_doc": [ "A tree consisting of the artifacts staged at the name of the test." @@ -227,7 +228,11 @@ , [ "artifacts" , { "type": "map_union" , "$1": - [ {"type": "var", "name": "summary"} + [ { "type": "singleton_map" + , "key": "pwd" + , "value": {"type": "BLOB", "data": "/summary"} + } + , {"type": "var", "name": "summary"} , { "type": "singleton_map" , "key": "work" , "value": diff --git a/shell/test/runner b/shell/test/runner index f762355..624610b 100755 --- a/shell/test/runner +++ b/shell/test/runner @@ -21,6 +21,7 @@ RESULT=UNKNOWN echo "${RESULT}" > result echo UNKNOWN > time-start echo UNKNOWN > time-stop +pwd > pwd mkdir scratch export TEST_TMPDIR=$(realpath scratch) |