Skip to content

Commit

Permalink
Improve accuracy of test filtering on MaOS/Windows (#2115)
Browse files Browse the repository at this point in the history
There's no easy way to get the values of --test_tag_filters in .bazelrc,
so we work around the problem by excluding commonly used tags such as
no_windows and no_macos.
  • Loading branch information
fweikert authored Nov 21, 2024
1 parent 0c4fbd6 commit 721d577
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions buildkite/bazelci.py
Original file line number Diff line number Diff line change
Expand Up @@ -2140,7 +2140,6 @@ def calculate_targets(
if not use_bazel_diff and not sharding_enabled:
return build_targets, test_targets, coverage_targets, index_targets

# TODO(#1614): Fix target expansion
expanded_test_targets = expand_test_target_patterns(bazel_binary, test_targets, test_flags)

actual_test_targets = (
Expand Down Expand Up @@ -2252,7 +2251,14 @@ def get_test_tags(test_flags):

return include, exclude

return [], ["manual"]
exclude = ["manual"]
# Workaround for --test_tag_filters in .bazelrc
if is_mac():
exclude.append("no_macos")
elif is_windows():
exclude.append("no_windows")

return [], exclude


def removeprefix(s, prefix):
Expand Down

0 comments on commit 721d577

Please sign in to comment.