summaryrefslogtreecommitdiff
path: root/CC/test/EXPRESSIONS
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-08-14 15:48:06 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-08-20 16:39:41 +0200
commitf6ea71cda4785287996d819e2817e9cd35e2e664 (patch)
tree6e1986466995c229e2144f0e4ce430cb05dcdbd8 /CC/test/EXPRESSIONS
parent2df55f5c3522e52bf6444ed561667ef42c2d0d25 (diff)
downloadrules-cc-f6ea71cda4785287996d819e2817e9cd35e2e664.tar.gz
["CC", "test"]: support providing lint information
While there, also properly transition "srcs" and "private-hdrs" to the host version.
Diffstat (limited to 'CC/test/EXPRESSIONS')
-rw-r--r--CC/test/EXPRESSIONS19
1 files changed, 19 insertions, 0 deletions
diff --git a/CC/test/EXPRESSIONS b/CC/test/EXPRESSIONS
index f3e4b04..b42401b 100644
--- a/CC/test/EXPRESSIONS
+++ b/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"]}
}
}
}