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/EXPRESSIONS | |
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/EXPRESSIONS')
-rw-r--r-- | rules/CC/test/EXPRESSIONS | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/rules/CC/test/EXPRESSIONS b/rules/CC/test/EXPRESSIONS index f3e4b047..b42401be 100644 --- a/rules/CC/test/EXPRESSIONS +++ b/rules/CC/test/EXPRESSIONS @@ -39,6 +39,7 @@ , "test-data" , "summarizer" , "summary artifacts" + , "LINT" ] , "imports": { "artifacts": ["./", "../..", "field_artifacts"] @@ -53,6 +54,7 @@ , "host transition": ["transitions", "for host"] , "target properties": ["transitions", "target properties"] , "stage": ["./", "../..", "stage_singleton_field"] + , "lint": ["./", "..", "lint information"] } , "expression": { "type": "let*" @@ -89,6 +91,21 @@ } ] , ["binary", {"type": "CALL_EXPRESSION", "name": "binary"}] + , [ "lint" + , { "type": "if" + , "cond": {"type": "var", "name": "LINT"} + , "then": + { "type": "let*" + , "bindings": + [ ["hdrs", {"type": "empty_map"}] + , [ "lint-deps fieldnames" + , ["private-hdrs", "srcs", "private-deps"] + ] + ] + , "body": {"type": "CALL_EXPRESSION", "name": "lint"} + } + } + ] , [ "staged test binary" , { "type": "map_union" , "$1": @@ -204,6 +221,7 @@ { "type": "RESULT" , "artifacts": {"type": "var", "name": "test-results"} , "runfiles": {"type": "var", "name": "runfiles"} + , "provides": {"type": "env", "vars": ["lint"]} } } , "then": @@ -357,6 +375,7 @@ { "type": "RESULT" , "artifacts": {"type": "var", "name": "artifacts"} , "runfiles": {"type": "var", "name": "runfiles"} + , "provides": {"type": "env", "vars": ["lint"]} } } } |