• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("@rules_testing//lib:util.bzl", "util")
2load("//cc/toolchains:args.bzl", "cc_args")
3load("//tests/rule_based_toolchain:analysis_test_suite.bzl", "analysis_test_suite")
4load(":args_test.bzl", "TARGETS", "TESTS")
5
6util.helper_target(
7    cc_args,
8    name = "simple",
9    actions = ["//tests/rule_based_toolchain/actions:all_compile"],
10    args = [
11        "--foo",
12        "foo",
13    ],
14    data = [
15        "//tests/rule_based_toolchain/testdata:file1",
16        "//tests/rule_based_toolchain/testdata:multiple",
17    ],
18    env = {"BAR": "bar"},
19)
20
21util.helper_target(
22    cc_args,
23    name = "env_only",
24    actions = ["//tests/rule_based_toolchain/actions:all_compile"],
25    data = [
26        "//tests/rule_based_toolchain/testdata:file1",
27        "//tests/rule_based_toolchain/testdata:multiple",
28    ],
29    env = {"BAR": "bar"},
30)
31
32util.helper_target(
33    cc_args,
34    name = "with_dir",
35    actions = ["//tests/rule_based_toolchain/actions:all_compile"],
36    allowlist_include_directories = ["//tests/rule_based_toolchain/testdata:directory"],
37    args = ["--secret-builtin-include-dir"],
38)
39
40analysis_test_suite(
41    name = "test_suite",
42    targets = TARGETS,
43    tests = TESTS,
44)
45