diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-07-14 09:44:05 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-07-14 09:44:05 +0200 |
commit | 875296f27c7eec053a8b4f348ab6490441ef6454 (patch) | |
tree | 03bb9fa15200b9f9f1c3b98251ef2aadfddc5d07 | |
parent | bdeabd1b99600bd8bdd1c002dc73e7863b23d0d3 (diff) | |
parent | 9b6723844d1063459d27d3610284a5226b946cfe (diff) | |
download | rules-cc-875296f27c7eec053a8b4f348ab6490441ef6454.tar.gz |
Merge branch 'just-rules' into rules
-rw-r--r-- | shell/test/EXPRESSIONS | 4 | ||||
-rw-r--r-- | shell/test/RULES | 40 |
2 files changed, 40 insertions, 4 deletions
diff --git a/shell/test/EXPRESSIONS b/shell/test/EXPRESSIONS index a1e3137..2692c31 100644 --- a/shell/test/EXPRESSIONS +++ b/shell/test/EXPRESSIONS @@ -9,6 +9,7 @@ , "runner" , "deps-fieldname" , "deps-transition" + , "target properties" ] , "imports": { "artifacts_list": ["./", "../..", "field_artifacts_list"] @@ -173,6 +174,7 @@ } , "timeout scaling": {"type": "var", "name": "TIMEOUT_SCALE", "default": 1.0} + , "execution properties": {"type": "var", "name": "target properties"} } , "else": { "type": "ACTION" @@ -194,6 +196,7 @@ } , "timeout scaling": {"type": "var", "name": "TIMEOUT_SCALE", "default": 1.0} + , "execution properties": {"type": "var", "name": "target properties"} } } } @@ -208,6 +211,7 @@ , "runner" , "deps-fieldname" , "deps-transition" + , "target properties" ] , "imports": {"action": "test-action"} , "expression": diff --git a/shell/test/RULES b/shell/test/RULES index b952648..b3d757a 100644 --- a/shell/test/RULES +++ b/shell/test/RULES @@ -3,7 +3,14 @@ , "target_fields": ["deps", "test"] , "string_fields": ["keep", "name"] , "config_vars": - ["ARCH", "HOST_ARCH", "RUNS_PER_TEST", "TEST_ENV", "TIMEOUT_SCALE"] + [ "ARCH" + , "HOST_ARCH" + , "RUNS_PER_TEST" + , "TEST_ENV" + , "TIMEOUT_SCALE" + , "TARGET_ARCH" + , "ARCH_DISPATCH" + ] , "field_doc": { "test": [ "The shell script for the test, launched with sh." @@ -40,6 +47,19 @@ , "TEST_ENV": ["Additional environment for executing the test runner."] , "TIMEOUT_SCALE": ["Factor on how to scale the timeout for this test. Defaults to 1.0."] + , "TARGET_ARCH": + [ "The architecture to build the test for." + , "" + , "Will only be honored, if that architecture is available in the" + , "ARCH_DISPATCH map. Otherwise, the test will be built for and run" + , "on the host architecture." + ] + , "ARCH_DISPATCH": + [ "Map of architectures to execution properties that ensure execution" + , "on that architecture. Only the actual test binary will be run with" + , "the specified execution properties (i.e., on the target architecture);" + , "all building will be done on the host architecture." + ] } , "tainted": ["test"] , "artifacts_doc": @@ -62,10 +82,13 @@ { "test-result": "test-result" , "action": "test-action" , "stage": ["./", "../..", "stage_singleton_field"] - , "host transition": ["transitions", "for host"] + , "host transition": ["transitions", "maybe for host"] + , "target properties": ["transitions", "target properties"] } , "config_transitions": - {"deps": [{"type": "CALL_EXPRESSION", "name": "host transition"}]} + { "deps": [{"type": "CALL_EXPRESSION", "name": "host transition"}] + , "test": [{"type": "CALL_EXPRESSION", "name": "host transition"}] + } , "expression": { "type": "let*" , "bindings": @@ -74,7 +97,13 @@ , "msg": "Expecting 'test' to specify precisely one file containing a shell script" , "$1": { "type": "let*" - , "bindings": [["fieldname", "test"], ["location", "test.sh"]] + , "bindings": + [ ["fieldname", "test"] + , ["location", "test.sh"] + , [ "transition" + , {"type": "CALL_EXPRESSION", "name": "host transition"} + ] + ] , "body": {"type": "CALL_EXPRESSION", "name": "stage"} } } @@ -91,6 +120,9 @@ , [ "deps-transition" , {"type": "CALL_EXPRESSION", "name": "host transition"} ] + , [ "target properties" + , {"type": "CALL_EXPRESSION", "name": "target properties"} + ] ] , "body": { "type": "if" |