diff options
-rw-r--r-- | CC/test/RULES | 23 | ||||
-rw-r--r-- | shell/test/EXPRESSIONS | 15 | ||||
-rw-r--r-- | shell/test/RULES | 6 |
3 files changed, 36 insertions, 8 deletions
diff --git a/CC/test/RULES b/CC/test/RULES index 44cf1c4..4425fd6 100644 --- a/CC/test/RULES +++ b/CC/test/RULES @@ -1,8 +1,5 @@ { "test": - { "doc": - [ "A test written in C++" - , "FIXME: the test binary and data must be built for host" - ] + { "doc": ["A test written in C++"] , "tainted": ["test"] , "target_fields": ["srcs", "private-hdrs", "private-deps", "data"] , "string_fields": @@ -15,7 +12,9 @@ , "private-ldflags" ] , "config_vars": - [ "CC" + [ "ARCH" + , "HOST_ARCH" + , "CC" , "CXX" , "CFLAGS" , "CXXFLAGS" @@ -103,6 +102,12 @@ , "link-deps": ["./", "..", "link-deps"] , "link-args-deps": ["./", "..", "link-args-deps"] , "binary": ["./", "..", "bin artifact"] + , "host transition": ["transitions", "for host"] + } + , "config_transitions": + { "defaults": [{"type": "CALL_EXPRESSION", "name": "host transition"}] + , "private-deps": [{"type": "CALL_EXPRESSION", "name": "host transition"}] + , "data": [{"type": "CALL_EXPRESSION", "name": "host transition"}] } , "expression": { "type": "let*" @@ -140,6 +145,9 @@ } } ] + , ["host-trans", {"type": "CALL_EXPRESSION", "name": "host transition"}] + , ["defaults-transition", {"type": "var", "name": "host-trans"}] + , ["deps-transition", {"type": "var", "name": "host-trans"}] , ["deps-fieldnames", ["private-deps"]] , ["compile-deps", {"type": "CALL_EXPRESSION", "name": "compile-deps"}] , [ "compile-args" @@ -238,7 +246,10 @@ , "msg": "Data runfiles may not conflict" , "$1": { "type": "let*" - , "bindings": [["fieldname", "data"]] + , "bindings": + [ ["fieldname", "data"] + , ["transition", {"type": "var", "name": "deps-transition"}] + ] , "body": {"type": "CALL_EXPRESSION", "name": "runfiles_list"} } } diff --git a/shell/test/EXPRESSIONS b/shell/test/EXPRESSIONS index 444de92..d9b1fbc 100644 --- a/shell/test/EXPRESSIONS +++ b/shell/test/EXPRESSIONS @@ -7,6 +7,7 @@ , "keep" , "runner" , "deps-fieldname" + , "deps-transition" ] , "imports": { "artifacts_list": ["./", "../..", "field_artifacts_list"] @@ -53,7 +54,9 @@ , "$1": { "type": "let*" , "bindings": - [["fieldname", {"type": "var", "name": "deps-fieldname"}]] + [ ["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"} @@ -153,7 +156,15 @@ } } , "test-result": - { "vars": ["TEST_ENV", "name", "test.sh", "keep", "runner", "deps-fieldname"] + { "vars": + [ "TEST_ENV" + , "name" + , "test.sh" + , "keep" + , "runner" + , "deps-fieldname" + , "deps-transition" + ] , "imports": {"action": "test-action"} , "expression": { "type": "let*" diff --git a/shell/test/RULES b/shell/test/RULES index 990e8d9..92c0ccc 100644 --- a/shell/test/RULES +++ b/shell/test/RULES @@ -55,7 +55,10 @@ { "test-result": "test-result" , "action": "test-action" , "stage": ["./", "../..", "stage_singleton_field"] + , "host transition": ["transitions", "for host"] } + , "config_transitions": + {"deps": [{"type": "CALL_EXPRESSION", "name": "host transition"}]} , "expression": { "type": "let*" , "bindings": @@ -78,6 +81,9 @@ , ["keep", {"type": "FIELD", "name": "keep"}] , ["runner", {"type": "FIELD", "name": "runner"}] , ["deps-fieldname", "deps"] + , [ "deps-transition" + , {"type": "CALL_EXPRESSION", "name": "host transition"} + ] ] , "body": { "type": "if" |