diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-08-14 15:48:06 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-08-20 16:39:41 +0200 |
commit | d16aaf412e2d34befe45ca71864f7c981a1ded65 (patch) | |
tree | 8821f6c6f2e7acf6c7b88f98907d65b6eb7c1026 /rules/CC/test/RULES | |
parent | c5d844c7c3d6f2ec8941e7b3b266775af728c2dc (diff) | |
download | justbuild-d16aaf412e2d34befe45ca71864f7c981a1ded65.tar.gz |
["CC", "test"]: support providing lint information
While there, also properly transition "srcs" and "private-hdrs"
to the host version.
Diffstat (limited to 'rules/CC/test/RULES')
-rw-r--r-- | rules/CC/test/RULES | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/rules/CC/test/RULES b/rules/CC/test/RULES index f61d9f72..c0d54b53 100644 --- a/rules/CC/test/RULES +++ b/rules/CC/test/RULES @@ -28,6 +28,7 @@ , "RUNS_PER_TEST" , "ARCH_DISPATCH" , "TEST_SUMMARY_EXECUTION_PROPERTIES" + , "LINT" ] , "implicit": { "defaults": [["./", "..", "defaults"]] @@ -136,6 +137,11 @@ [ "Additional remote-execution properties for the test-summarizing action" , "in case RUNS_PER_TEST is set; defaults to the empty map." ] + , "LINT": + [ "Also provide nodes describing compile actions and header files;" + , "those can be used by lint rules (doing also the config transition)" + , "for additional checks." + ] } , "artifacts_doc": [ "result: the result of this test (\"PASS\" or \"FAIL\"); useful for" @@ -163,6 +169,8 @@ , "config_transitions": { "defaults": [{"type": "CALL_EXPRESSION", "name": "host transition"}] , "private-deps": [{"type": "CALL_EXPRESSION", "name": "host transition"}] + , "private-hdrs": [{"type": "CALL_EXPRESSION", "name": "host transition"}] + , "srcs": [{"type": "CALL_EXPRESSION", "name": "host transition"}] , "data": [{"type": "CALL_EXPRESSION", "name": "host transition"}] , "runner": [{"type": "CALL_EXPRESSION", "name": "host transition"}] } @@ -182,12 +190,16 @@ , "$1": {"type": "FIELD", "name": "stage"} } ] + , ["host-trans", {"type": "CALL_EXPRESSION", "name": "host transition"}] , [ "srcs" , { "type": "to_subdir" , "subdir": {"type": "var", "name": "stage"} , "$1": { "type": "let*" - , "bindings": [["fieldname", "srcs"]] + , "bindings": + [ ["fieldname", "srcs"] + , ["transition", {"type": "var", "name": "host-trans"}] + ] , "body": {"type": "CALL_EXPRESSION", "name": "artifacts"} } } @@ -197,12 +209,14 @@ , "subdir": {"type": "var", "name": "stage"} , "$1": { "type": "let*" - , "bindings": [["fieldname", "private-hdrs"]] + , "bindings": + [ ["fieldname", "private-hdrs"] + , ["transition", {"type": "var", "name": "host-trans"}] + ] , "body": {"type": "CALL_EXPRESSION", "name": "artifacts"} } } ] - , ["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", "defaults"]] |