{ "test-action": { "vars": [ "TEST_ENV" , "TIMEOUT_SCALE" , "ATTEMPT" , "name" , "test.sh" , "keep" , "runner" , "deps-fieldname" , "deps-transition" , "target properties" ] , "imports": { "artifacts_list": ["./", "../..", "field_artifacts_list"] , "runfiles_list": ["./", "../..", "field_runfiles_list"] } , "expression": { "type": "let*" , "bindings": [ [ "runner" , { "type": "map_union" , "$1": { "type": "foreach" , "var": "runner" , "range": {"type": "var", "name": "runner"} , "body": { "type": "map_union" , "$1": { "type": "foreach" , "var": "runner" , "range": { "type": "values" , "$1": { "type": "DEP_ARTIFACTS" , "dep": {"type": "var", "name": "runner"} } } , "body": {"type": "env", "vars": ["runner"]} } } } } ] , [ "deps" , { "type": "TREE" , "$1": { "type": "disjoint_map_union" , "msg": [ "Field" , {"type": "var", "name": "deps-fieldname"} , "has to stage in a conflict free way" ] , "$1": { "type": "++" , "$1": { "type": "let*" , "bindings": [ ["fieldname", {"type": "var", "name": "deps-fieldname"}] , ["transition", {"type": "var", "name": "deps-transition"}] ] , "body": [ {"type": "CALL_EXPRESSION", "name": "runfiles_list"} , {"type": "CALL_EXPRESSION", "name": "artifacts_list"} ] } } } } ] , [ "attempt marker" , { "type": "if" , "cond": { "type": "==" , "$1": {"type": "var", "name": "ATTEMPT"} , "$2": null } , "then": {"type": "empty_map"} , "else": { "type": "singleton_map" , "key": "ATTEMPT" , "value": {"type": "BLOB", "data": {"type": "var", "name": "ATTEMPT"}} } } ] , [ "outs" , { "type": "++" , "$1": [ ["result", "stdout", "stderr", "time-start", "time-stop"] , { "type": "foreach" , "var": "filename" , "range": {"type": "var", "name": "keep"} , "body": { "type": "join" , "$1": ["work/", {"type": "var", "name": "filename"}] } } ] } ] , [ "inputs" , { "type": "map_union" , "$1": [ { "type": "singleton_map" , "key": "work" , "value": {"type": "var", "name": "deps"} } , {"type": "var", "name": "runner"} , {"type": "var", "name": "test.sh"} , {"type": "var", "name": "attempt marker"} ] } ] , [ "cmd" , {"type": "++", "$1": [["./runner"], {"type": "var", "name": "keep"}]} ] , [ "test_env" , {"type": "var", "name": "TEST_ENV", "default": {"type": "empty_map"}} ] ] , "body": { "type": "if" , "cond": {"type": "==", "$1": {"type": "var", "name": "ATTEMPT"}, "$2": null} , "then": { "type": "ACTION" , "outs": {"type": "var", "name": "outs"} , "inputs": {"type": "var", "name": "inputs"} , "cmd": {"type": "var", "name": "cmd"} , "env": {"type": "var", "name": "test_env"} , "may_fail": ["test"] , "fail_message": { "type": "join" , "$1": ["shell test ", {"type": "var", "name": "name"}, " failed"] } , "timeout scaling": {"type": "var", "name": "TIMEOUT_SCALE", "default": 1.0} , "execution properties": {"type": "var", "name": "target properties"} } , "else": { "type": "ACTION" , "outs": {"type": "var", "name": "outs"} , "inputs": {"type": "var", "name": "inputs"} , "cmd": {"type": "var", "name": "cmd"} , "env": {"type": "var", "name": "test_env"} , "may_fail": ["test"] , "no_cache": ["test"] , "fail_message": { "type": "join" , "$1": [ "shell test " , {"type": "var", "name": "name"} , " failed (Run " , {"type": "var", "name": "ATTEMPT"} , ")" ] } , "timeout scaling": {"type": "var", "name": "TIMEOUT_SCALE", "default": 1.0} , "execution properties": {"type": "var", "name": "target properties"} } } } } , "test-result": { "vars": [ "TEST_ENV" , "TIMEOUT_SCALE" , "name" , "test.sh" , "keep" , "runner" , "deps-fieldname" , "deps-transition" , "target properties" ] , "imports": {"action": "test-action"} , "expression": { "type": "let*" , "bindings": [ ["test-results", {"type": "CALL_EXPRESSION", "name": "action"}] , [ "runfiles" , { "type": "singleton_map" , "key": {"type": "var", "name": "name"} , "value": {"type": "TREE", "$1": {"type": "var", "name": "test-results"}} } ] ] , "body": { "type": "RESULT" , "artifacts": {"type": "var", "name": "test-results"} , "runfiles": {"type": "var", "name": "runfiles"} } } } }