aboutsummaryrefslogtreecommitdiff
path: root/tests/rule_based_toolchain/args_list/BUILD
blob: 9fc9f88d6b5bc5f2dd091d24dc9b1518d8328dee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
load("@rules_testing//lib:util.bzl", "util")
load("//cc/toolchains:args.bzl", "cc_args")
load("//cc/toolchains:args_list.bzl", "cc_args_list")
load("//tests/rule_based_toolchain:analysis_test_suite.bzl", "analysis_test_suite")
load(":args_list_test.bzl", "TARGETS", "TESTS")

util.helper_target(
    cc_args,
    name = "c_compile_args",
    actions = ["//tests/rule_based_toolchain/actions:c_compile"],
    args = ["c"],
    data = ["//tests/rule_based_toolchain/testdata:file1"],
    visibility = ["//tests/rule_based_toolchain:__subpackages__"],
)

util.helper_target(
    cc_args,
    name = "cpp_compile_args",
    actions = ["//tests/rule_based_toolchain/actions:cpp_compile"],
    args = ["cpp"],
    data = ["//tests/rule_based_toolchain/testdata:file2"],
    visibility = ["//tests/rule_based_toolchain:__subpackages__"],
)

util.helper_target(
    cc_args,
    name = "all_compile_args",
    actions = ["//tests/rule_based_toolchain/actions:all_compile"],
    args = ["all"],
    data = ["//tests/rule_based_toolchain/testdata:multiple1"],
    visibility = ["//tests/rule_based_toolchain:__subpackages__"],
)

util.helper_target(
    cc_args_list,
    name = "args_list",
    args = [
        ":c_compile_args",
        ":cpp_compile_args",
        ":all_compile_args",
    ],
    visibility = ["//tests/rule_based_toolchain:__subpackages__"],
)

analysis_test_suite(
    name = "test_suite",
    targets = TARGETS,
    tests = TESTS,
)