Skip to content

Commit 7864731

Browse files
authored
fix: add target platform to extra exec platforms in analysis tests (#2861)
This is required as of bazelbuild/bazel@2780393 as tests now require an execution platform that matches their target constraints by default. Fixes #2850
1 parent a4b946b commit 7864731

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/base_rules/py_executable_base_tests.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def _test_basic_windows(name, config):
5151
"//command_line_option:build_python_zip": "true",
5252
"//command_line_option:cpu": "windows_x86_64",
5353
"//command_line_option:crosstool_top": CROSSTOOL_TOP,
54+
"//command_line_option:extra_execution_platforms": [WINDOWS_X86_64],
5455
"//command_line_option:extra_toolchains": [CC_TOOLCHAIN],
5556
"//command_line_option:platforms": [WINDOWS_X86_64],
5657
},
@@ -96,6 +97,7 @@ def _test_basic_zip(name, config):
9697
"//command_line_option:build_python_zip": "true",
9798
"//command_line_option:cpu": "linux_x86_64",
9899
"//command_line_option:crosstool_top": CROSSTOOL_TOP,
100+
"//command_line_option:extra_execution_platforms": [LINUX_X86_64],
99101
"//command_line_option:extra_toolchains": [CC_TOOLCHAIN],
100102
"//command_line_option:platforms": [LINUX_X86_64],
101103
},

tests/base_rules/py_test/py_test_tests.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def _test_mac_requires_darwin_for_execution(name, config):
5959
config_settings = {
6060
"//command_line_option:cpu": "darwin_x86_64",
6161
"//command_line_option:crosstool_top": CROSSTOOL_TOP,
62+
"//command_line_option:extra_execution_platforms": [MAC_X86_64],
6263
"//command_line_option:extra_toolchains": CC_TOOLCHAIN,
6364
"//command_line_option:platforms": [MAC_X86_64],
6465
},
@@ -92,6 +93,7 @@ def _test_non_mac_doesnt_require_darwin_for_execution(name, config):
9293
config_settings = {
9394
"//command_line_option:cpu": "k8",
9495
"//command_line_option:crosstool_top": CROSSTOOL_TOP,
96+
"//command_line_option:extra_execution_platforms": [LINUX_X86_64],
9597
"//command_line_option:extra_toolchains": CC_TOOLCHAIN,
9698
"//command_line_option:platforms": [LINUX_X86_64],
9799
},

0 commit comments

Comments
 (0)