summaryrefslogtreecommitdiff
path: root/CC/test
diff options
context:
space:
mode:
Diffstat (limited to 'CC/test')
-rw-r--r--CC/test/EXPRESSIONS127
-rw-r--r--CC/test/RULES16
2 files changed, 96 insertions, 47 deletions
diff --git a/CC/test/EXPRESSIONS b/CC/test/EXPRESSIONS
index 1646dd7..f3e4b04 100644
--- a/CC/test/EXPRESSIONS
+++ b/CC/test/EXPRESSIONS
@@ -38,6 +38,7 @@
, "test-args"
, "test-data"
, "summarizer"
+ , "summary artifacts"
]
, "imports":
{ "artifacts": ["./", "../..", "field_artifacts"]
@@ -208,7 +209,7 @@
, "then":
{ "type": "let*"
, "bindings":
- [ [ "attempts"
+ [ [ "attempts (plain)"
, { "type": "map_union"
, "$1":
{ "type": "foreach"
@@ -221,54 +222,74 @@
{ "type": "singleton_map"
, "key": {"type": "var", "name": "ATTEMPT"}
, "value":
+ { "type": "ACTION"
+ , "outs":
+ ["result", "stdout", "stderr", "time-start", "time-stop"]
+ , "inputs":
+ { "type": "map_union"
+ , "$1":
+ [ { "type": "singleton_map"
+ , "key": "ATTEMPT"
+ , "value":
+ { "type": "BLOB"
+ , "data": {"type": "var", "name": "ATTEMPT"}
+ }
+ }
+ , {"type": "var", "name": "test input"}
+ ]
+ }
+ , "cmd": ["./runner"]
+ , "env":
+ { "type": "var"
+ , "name": "TEST_ENV"
+ , "default": {"type": "empty_map"}
+ }
+ , "may_fail": ["test"]
+ , "no_cache": ["test"]
+ , "fail_message":
+ { "type": "join"
+ , "$1":
+ [ "CC test "
+ , {"type": "var", "name": "test-name"}
+ , " failed (Run"
+ , {"type": "var", "name": "ATTEMPT"}
+ , ")"
+ ]
+ }
+ , "timeout scaling":
+ {"type": "var", "name": "TIMEOUT_SCALE", "default": 1.0}
+ , "execution properties":
+ {"type": "var", "name": "target properties"}
+ }
+ }
+ }
+ }
+ ]
+ , [ "attempts (for summary)"
+ , { "type": "map_union"
+ , "$1":
+ { "type": "foreach_map"
+ , "range": {"type": "var", "name": "attempts (plain)"}
+ , "body":
+ { "type": "singleton_map"
+ , "key": {"type": "var", "name": "_"}
+ , "value":
{ "type": "TREE"
, "$1":
- { "type": "ACTION"
- , "outs":
- [ "result"
- , "stdout"
- , "stderr"
- , "time-start"
- , "time-stop"
- ]
- , "inputs":
- { "type": "map_union"
- , "$1":
- [ { "type": "singleton_map"
- , "key": "ATTEMPT"
- , "value":
- { "type": "BLOB"
- , "data": {"type": "var", "name": "ATTEMPT"}
- }
+ { "type": "map_union"
+ , "$1":
+ { "type": "foreach"
+ , "range": {"type": "var", "name": "summary artifacts"}
+ , "body":
+ { "type": "singleton_map"
+ , "key": {"type": "var", "name": "_"}
+ , "value":
+ { "type": "lookup"
+ , "map": {"type": "var", "name": "$_"}
+ , "key": {"type": "var", "name": "_"}
}
- , {"type": "var", "name": "test input"}
- ]
- }
- , "cmd": ["./runner"]
- , "env":
- { "type": "var"
- , "name": "TEST_ENV"
- , "default": {"type": "empty_map"}
- }
- , "may_fail": ["test"]
- , "no_cache": ["test"]
- , "fail_message":
- { "type": "join"
- , "$1":
- [ "CC test "
- , {"type": "var", "name": "test-name"}
- , " failed (Run"
- , {"type": "var", "name": "ATTEMPT"}
- , ")"
- ]
+ }
}
- , "timeout scaling":
- { "type": "var"
- , "name": "TIMEOUT_SCALE"
- , "default": 1.0
- }
- , "execution properties":
- {"type": "var", "name": "target properties"}
}
}
}
@@ -280,7 +301,7 @@
, "inputs":
{ "type": "map_union"
, "$1":
- [ {"type": "var", "name": "attempts"}
+ [ {"type": "var", "name": "attempts (for summary)"}
, {"type": "var", "name": "summarizer"}
]
}
@@ -294,6 +315,20 @@
}
}
]
+ , [ "attempts"
+ , { "type": "map_union"
+ , "$1":
+ { "type": "foreach_map"
+ , "range": {"type": "var", "name": "attempts (plain)"}
+ , "body":
+ { "type": "singleton_map"
+ , "key": {"type": "var", "name": "_"}
+ , "value":
+ {"type": "TREE", "$1": {"type": "var", "name": "$_"}}
+ }
+ }
+ }
+ ]
, [ "artifacts"
, { "type": "map_union"
, "$1":
diff --git a/CC/test/RULES b/CC/test/RULES
index e23359e..f61d9f7 100644
--- a/CC/test/RULES
+++ b/CC/test/RULES
@@ -81,7 +81,8 @@
]
, "summarizer":
[ "Tool to aggregate the results of individual test runs (for flakyness"
- , "detection) to an overall test result."
+ , "detection) to an overall test result. If more fields than the result"
+ , "itself is needed, those can be specified using the \"summarizer\" rule."
]
}
, "config_doc":
@@ -157,6 +158,7 @@
, "host transition": ["transitions", "maybe for host"]
, "stage": ["./", "../..", "stage_singleton_field"]
, "run_test": "run_test"
+ , "field_list": ["", "field_list_provider"]
}
, "config_transitions":
{ "defaults": [{"type": "CALL_EXPRESSION", "name": "host transition"}]
@@ -237,6 +239,18 @@
, "body": {"type": "CALL_EXPRESSION", "name": "stage"}
}
]
+ , [ "summary artifacts"
+ , { "type": "++"
+ , "$1":
+ [ ["result"]
+ , { "type": "let*"
+ , "bindings":
+ [["provider", "artifacts"], ["fieldname", "summarizer"]]
+ , "body": {"type": "CALL_EXPRESSION", "name": "field_list"}
+ }
+ ]
+ }
+ ]
]
, "body": {"type": "CALL_EXPRESSION", "name": "run_test"}
}