summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-07-11 15:21:49 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-07-12 09:58:33 +0200
commit928a4425ab08828491bafa905161dbeb7153b59c (patch)
treed6cacf91dc4197ddb1d85e4ac07b78ac631f2ff9 /test
parent230b76b253f01098274f15b9c9a9140d362813db (diff)
downloadjustbuild-928a4425ab08828491bafa905161dbeb7153b59c.tar.gz
Internal test rules: only use in summary action what is necessary
Diffstat (limited to 'test')
-rw-r--r--test/end-to-end/RULES158
1 files changed, 114 insertions, 44 deletions
diff --git a/test/end-to-end/RULES b/test/end-to-end/RULES
index ceb6da7c..93a63c9e 100644
--- a/test/end-to-end/RULES
+++ b/test/end-to-end/RULES
@@ -97,11 +97,13 @@
, "action": "test-action"
, "stage": ["@", "rules", "", "stage_singleton_field"]
, "host transition": ["@", "rules", "transitions", "for host"]
+ , "field_list": ["@", "rules", "", "field_list_provider"]
}
, "config_transitions":
{ "deps": [{"type": "CALL_EXPRESSION", "name": "host transition"}]
, "just": [{"type": "CALL_EXPRESSION", "name": "host transition"}]
, "runner": [{"type": "CALL_EXPRESSION", "name": "host transition"}]
+ , "summarizer": [{"type": "CALL_EXPRESSION", "name": "host transition"}]
}
, "expression":
{ "type": "let*"
@@ -136,7 +138,7 @@
, "then":
{ "type": "let*"
, "bindings":
- [ [ "attempts"
+ [ [ "attempts (plain)"
, { "type": "map_union"
, "$1":
{ "type": "foreach"
@@ -148,37 +150,56 @@
, "body":
{ "type": "singleton_map"
, "key": {"type": "var", "name": "ATTEMPT"}
- , "value":
- { "type": "TREE"
- , "$1": {"type": "CALL_EXPRESSION", "name": "action"}
- }
+ , "value": {"type": "CALL_EXPRESSION", "name": "action"}
}
}
}
]
, [ "summarizer"
+ , { "type": "let*"
+ , "bindings":
+ [["fieldname", "summarizer"], ["location", "summarizer"]]
+ , "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"}
+ }
+ ]
+ }
+ ]
+ , [ "attempts (for summary)"
, { "type": "map_union"
, "$1":
- { "type": "foreach"
- , "var": "x"
- , "range": {"type": "FIELD", "name": "summarizer"}
+ { "type": "foreach_map"
+ , "range": {"type": "var", "name": "attempts (plain)"}
, "body":
- { "type": "map_union"
- , "$1":
- { "type": "foreach"
- , "var": "x"
- , "range":
- { "type": "values"
+ { "type": "singleton_map"
+ , "key": {"type": "var", "name": "_"}
+ , "value":
+ { "type": "TREE"
+ , "$1":
+ { "type": "map_union"
, "$1":
- { "type": "DEP_ARTIFACTS"
- , "dep": {"type": "var", "name": "x"}
+ { "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": "_"}
+ }
+ }
}
}
- , "body":
- { "type": "singleton_map"
- , "key": "summarizer"
- , "value": {"type": "var", "name": "x"}
- }
}
}
}
@@ -189,7 +210,7 @@
, "inputs":
{ "type": "map_union"
, "$1":
- [ {"type": "var", "name": "attempts"}
+ [ {"type": "var", "name": "attempts (for summary)"}
, {"type": "var", "name": "summarizer"}
]
}
@@ -203,6 +224,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":
@@ -350,12 +385,14 @@
, "action": "test-action"
, "stage": ["@", "rules", "", "stage_singleton_field"]
, "host transition": ["@", "rules", "transitions", "for host"]
+ , "field_list": ["@", "rules", "", "field_list_provider"]
}
, "config_transitions":
{ "deps": [{"type": "CALL_EXPRESSION", "name": "host transition"}]
, "repos": [{"type": "CALL_EXPRESSION", "name": "host transition"}]
, "just": [{"type": "CALL_EXPRESSION", "name": "host transition"}]
, "runner": [{"type": "CALL_EXPRESSION", "name": "host transition"}]
+ , "summarizer": [{"type": "CALL_EXPRESSION", "name": "host transition"}]
}
, "expression":
{ "type": "let*"
@@ -418,7 +455,7 @@
, "then":
{ "type": "let*"
, "bindings":
- [ [ "attempts"
+ [ [ "attempts (plain)"
, { "type": "map_union"
, "$1":
{ "type": "foreach"
@@ -430,37 +467,56 @@
, "body":
{ "type": "singleton_map"
, "key": {"type": "var", "name": "ATTEMPT"}
- , "value":
- { "type": "TREE"
- , "$1": {"type": "CALL_EXPRESSION", "name": "action"}
- }
+ , "value": {"type": "CALL_EXPRESSION", "name": "action"}
}
}
}
]
, [ "summarizer"
+ , { "type": "let*"
+ , "bindings":
+ [["fieldname", "summarizer"], ["location", "summarizer"]]
+ , "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"}
+ }
+ ]
+ }
+ ]
+ , [ "attempts (for summary)"
, { "type": "map_union"
, "$1":
- { "type": "foreach"
- , "var": "x"
- , "range": {"type": "FIELD", "name": "summarizer"}
+ { "type": "foreach_map"
+ , "range": {"type": "var", "name": "attempts (plain)"}
, "body":
- { "type": "map_union"
- , "$1":
- { "type": "foreach"
- , "var": "x"
- , "range":
- { "type": "values"
+ { "type": "singleton_map"
+ , "key": {"type": "var", "name": "_"}
+ , "value":
+ { "type": "TREE"
+ , "$1":
+ { "type": "map_union"
, "$1":
- { "type": "DEP_ARTIFACTS"
- , "dep": {"type": "var", "name": "x"}
+ { "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": "_"}
+ }
+ }
}
}
- , "body":
- { "type": "singleton_map"
- , "key": "summarizer"
- , "value": {"type": "var", "name": "x"}
- }
}
}
}
@@ -471,7 +527,7 @@
, "inputs":
{ "type": "map_union"
, "$1":
- [ {"type": "var", "name": "attempts"}
+ [ {"type": "var", "name": "attempts (for summary)"}
, {"type": "var", "name": "summarizer"}
]
}
@@ -485,6 +541,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":