2024-02-21 01:58:00 +00:00
|
|
|
load("@rules_testing//lib:util.bzl", "util")
|
|
|
|
load("//cc/toolchains:args.bzl", "cc_args")
|
|
|
|
load("//tests/rule_based_toolchain:analysis_test_suite.bzl", "analysis_test_suite")
|
|
|
|
load(":args_test.bzl", "TARGETS", "TESTS")
|
|
|
|
|
|
|
|
util.helper_target(
|
|
|
|
cc_args,
|
|
|
|
name = "simple",
|
|
|
|
actions = ["//tests/rule_based_toolchain/actions:all_compile"],
|
|
|
|
args = [
|
|
|
|
"--foo",
|
|
|
|
"foo",
|
|
|
|
],
|
2024-03-13 11:22:04 +00:00
|
|
|
data = [
|
|
|
|
"//tests/rule_based_toolchain/testdata:file1",
|
|
|
|
"//tests/rule_based_toolchain/testdata:multiple",
|
|
|
|
],
|
2024-02-21 01:58:00 +00:00
|
|
|
env = {"BAR": "bar"},
|
|
|
|
)
|
|
|
|
|
2024-03-14 23:26:51 +00:00
|
|
|
util.helper_target(
|
|
|
|
cc_args,
|
|
|
|
name = "env_only",
|
|
|
|
actions = ["//tests/rule_based_toolchain/actions:all_compile"],
|
|
|
|
data = [
|
|
|
|
"//tests/rule_based_toolchain/testdata:file1",
|
|
|
|
"//tests/rule_based_toolchain/testdata:multiple",
|
|
|
|
],
|
|
|
|
env = {"BAR": "bar"},
|
|
|
|
)
|
|
|
|
|
2024-09-05 16:05:23 +00:00
|
|
|
util.helper_target(
|
|
|
|
cc_args,
|
|
|
|
name = "with_dir",
|
|
|
|
actions = ["//tests/rule_based_toolchain/actions:all_compile"],
|
|
|
|
allowlist_include_directories = ["//tests/rule_based_toolchain/testdata:directory"],
|
|
|
|
args = ["--secret-builtin-include-dir"],
|
|
|
|
)
|
|
|
|
|
2024-02-21 01:58:00 +00:00
|
|
|
analysis_test_suite(
|
|
|
|
name = "test_suite",
|
|
|
|
targets = TARGETS,
|
|
|
|
tests = TESTS,
|
|
|
|
)
|