Repository navigation
Closed
Labels
P2We'll consider working on this in future. (Assignee optional)area-WindowsWindows-specific issues and feature requeststeam-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websitetype: bug
Description
Description of the problem / feature request:
Bazel on Windows cannot run tests from external repos with --nolegacy_external_runfiles.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Directories a and b are siblings.
a\WORKSPACE:
local_repository(
name = "b",
path = "../b",
)
a\BUILD:
cc_test(
name = "x",
srcs = ["x.cc"],
)
a\x.cc:
int main() { return 0; }
b\WORKSPACE:
empty
b\BUILD:
same as a\BUILD
b\x.cc:
same as a\x.cc
Demo:
Default test wrapper (test-setup.sh), default external runfiles:
C:\src\tmp2\a>c:\src\bazel-releases\0.25.0\rc3\bazel.exe test -t- --test_output=errors @b//:x
(...)
@b//:x PASSED in 1.6s
Native test wrapper, default external runfiles:
C:\src\tmp2\a>c:\src\bazel-releases\0.25.0\rc3\bazel.exe test --incompatible_windows_native_test_wrapper -t- --test_output=errors @b//:x
(...)
@b//:x PASSED in 0.1s
Default test wrapper (test-setup.sh), no external runfiles:
C:\src\tmp2\a>c:\src\bazel-releases\0.25.0\rc3\bazel.exe test --nolegacy_external_runfiles -t- --test_output=errors @b//:x
(...)
==================== Test output for @b//:x:
external/bazel_tools/tools/test/test-setup.sh: line 288: : command not found
================================================================================
Native test wrapper, no external runfiles:
C:\src\tmp2\a>c:\src\bazel-releases\0.25.0\rc3\bazel.exe test --incompatible_windows_native_test_wrapper --nolegacy_external_runfiles -t- --test_output=errors @b//:x
(...)
==================== Test output for @b//:x:
ERROR(tools/test/windows/tw.cc:1250) value: 2 (0x00000002): CreateProcessW failed (bazel-out\x64_windows-fastbuild\bin\external\b\x.exe.runfiles\__main__\external\b\x.exe)
ERROR(tools/test/windows/tw.cc:1442) Failed to start test process "bazel-out\x64_windows-fastbuild\bin\external\b\x.exe.runfiles\__main__\external\b\x.exe"
================================================================================
What operating system are you running Bazel on?
Windows 10
What's the output of bazel info release?
release 0.25.0rc3
Metadata
Metadata
Assignees
Labels
P2We'll consider working on this in future. (Assignee optional)area-WindowsWindows-specific issues and feature requeststeam-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websitetype: bug
Activity
Windows, test wrapper: works with external tests