From 89d9cab8be34a82a9d39c7177101292c6c3257d2 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Wed, 26 Apr 2023 01:43:40 +0000 Subject: [PATCH] tests: Set mac platform for test_mac_requires_darwin_for_execution This makes the test pass on Bazel built from head. The failure appears due to not forcing the test to a Mac platform, so the underlying logic in `py_test` to detect the Mac platform fails and doesn't add the ExecutionInfo with the necessary info. Fixes bazelbuild/bazel/issues/18170 --- tools/build_defs/python/tests/py_test/py_test_tests.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build_defs/python/tests/py_test/py_test_tests.bzl b/tools/build_defs/python/tests/py_test/py_test_tests.bzl index f2b4875b15..41fd27da55 100644 --- a/tools/build_defs/python/tests/py_test/py_test_tests.bzl +++ b/tools/build_defs/python/tests/py_test/py_test_tests.bzl @@ -45,7 +45,7 @@ def _test_mac_requires_darwin_for_execution(name, config): config_settings = { "//command_line_option:cpu": "darwin_x86_64", "//command_line_option:crosstool_top": "@rules_python//tools/build_defs/python/tests:cc_toolchain_suite", - #"//command_line_option:platforms": "@rules_python//tools/build_defs/python/tests:mac", + "//command_line_option:platforms": "@rules_python//tools/build_defs/python/tests:mac", }, )