Skip to content

Commit

Permalink
Use local Python toolchain on Windows in integration tests
Browse files Browse the repository at this point in the history
This should address flaky test failures and timeout like
https://buildkite.com/bazel/bazel-bazel/builds/29818

Fixes #23806

PiperOrigin-RevId: 689300976
Change-Id: I5da652e4d317376e469885775745339561503b89
  • Loading branch information
meteorcloudy authored and copybara-github committed Oct 24, 2024
1 parent 49aa268 commit 11a909a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/test/py/bazel/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ def setUp(self):
f.write('startup --host_jvm_args=-Djava.net.preferIPv6Addresses=true\n')
f.write('build --jvmopt=-Djava.net.preferIPv6Addresses\n')

if TestBase.IsWindows():
# Use a specific Python toolchain on Windows to avoid blowing up the
# size of py_binary and py_test which slowed down tests significantly.
# Use @@rules_python+//python/runtime_env_toolchains:all when WORKSPACE
# is fully removed.
# pylint: disable=line-too-long
f.write('common --extra_toolchains=@bazel_tools//tools/python:autodetecting_toolchain\n')

# Disable WORKSPACE in python tests by default
# TODO(pcloudy): Remove when --enable_workspace defaults to false
f.write('common --noenable_workspace\n')
Expand Down

0 comments on commit 11a909a

Please sign in to comment.