Skip to content

Commit

Permalink
Fix incompatible flags not applied to integration tests (#3415)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Jan 5, 2023
1 parent 14edd3a commit e213f25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ build:incompatible --incompatible_config_setting_private_default_visibility
build:incompatible --incompatible_enforce_config_setting_visibility
build:incompatible --incompatible_disallow_empty_glob
# Also enable all incompatible flags in go_bazel_test by default.
test:incompatible --test_env=GO_BAZEL_TEST_BAZELFLAGS=--incompatible_load_proto_rules_from_bzl --incompatible_enable_cc_toolchain_resolution --incompatible_config_setting_private_default_visibility --incompatible_enforce_config_setting_visibility --incompatible_disallow_empty_glob
# TODO: Add --incompatible_disallow_empty_glob once
# https://github.com/bazelbuild/bazel-gazelle/pull/1405 has been released.
test:incompatible --test_env=GO_BAZEL_TEST_BAZELFLAGS='--incompatible_load_proto_rules_from_bzl --incompatible_enable_cc_toolchain_resolution --incompatible_config_setting_private_default_visibility --incompatible_enforce_config_setting_visibility'
6 changes: 5 additions & 1 deletion go/tools/bzltestutil/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ go_test(
"wrap_test.go",
"xml_test.go",
],
data = glob(["testdata/**"]),
# Empty in integration tests or in distributions.
data = glob(
["testdata/**"],
allow_empty = True,
),
embed = [":bzltestutil"],
)

Expand Down

0 comments on commit e213f25

Please sign in to comment.