Bazel send host-formatted paths to test-setup and generate-xml scripts
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the bug:
When running tests on a linux remote executor from a Windows host, I see spawns like this:
```
external\bazel_tools\tools\test\test-setup.sh
./cc_test
```
and
```
external\bazel_tools\tools\test\generate-xml.sh
bazel-out/x64_windows-fastbuild/testlogs/cc_test/test.log
bazel-out/x64_windows-fastbuild/testlogs/cc_test/test.xml
0
1
```
Which of course results in `{"msg":"executable file `external\\bazel_tools\\tools\\test\\test-setup.sh` not found in $PATH: No such file or directory","level":"error","time":"2025-12-19T19:26:33.011523Z"}`
The underlying executable is built correctly.
```
/Users/dzbarsky/Downloads/cc_test: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.0.0, not stripped
```
### Which category does this issue belong to?
_No response_
### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
_No response_
### Which operating system are you running Bazel on?
Windows
### What is the output of `bazel info release`?
release 9.0.0rc2
### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.
_No response_
### What's the output of `git remote get-url origin; git rev-parse HEAD` ?
```text
```
### If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
_No response_
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
cc @fmeum
Contributor guide
Research direction
Start with external/bazel_tools/tools/test/test-setup.sh and generate-xml.sh, then trace how their paths are constructed for a Linux remote executor from a Windows host. Reproduce the reported spawns if possible and identify the relevant Bazel test setup entry point. Done means both scripts and their test-log paths use valid executor-side formatting, with coverage for this cross-platform case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, shell
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100