Commit e9316f0
python: Don't require
This fixes the failures on MacOS after the recent upgrade to CI.
When `//src/test/py/baze:runfiles_test` sets
`--incompatible_use_python_toolchains=false`, it eventuallys tries to search
`PATH` for `python`. This is because it falls back to the `--python_path`
flag, which has a computed default of "python". Since new Mac versions no
longer provide Python 2, this doesn't work.
To fix, enable Python toolchains. Comments indicate they were only disabled
because Python 3 wasn't available on the Mac CI machines at the time.
For pywrapper_test: this was failing because it copies system utilities (e.g
`/usr/bin/which`) to another location and tries to run them. For newer MacOS
versions, this results in a failure due AMFI (a security mechanism, see
https://theevilbit.github.io/posts/amfi_launch_constraints/)
To fix, instead of copying the binary, write a wrapper that re-execs the
original binary.
Work towards #16526, #8169
PiperOrigin-RevId: 507526814
Change-Id: Ifaacc30cb155af30af606254eb7ffcd9304478f6python binary for Bazel tests.1 parent 02b1b78 commit e9316f0
File tree
2 files changed
+6
-5
lines changed- src/test/py/bazel
- tools/python
2 files changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 50 | | |
54 | 51 | | |
55 | 52 | | |
56 | | - | |
57 | 53 | | |
58 | 54 | | |
59 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
90 | 95 | | |
91 | 96 | | |
92 | 97 | | |
| |||
0 commit comments