Open Sakrafux opened 1 year ago
Unfortunately, as of today, coverage requires being able to execute shell scripts. This is obviously not ideal for windows.
But there is hope this may improve soon, cc @c-mita
Just wondering, is there anything in particular that brings us hope @hvadehra?
Nothing in particular; I have a dormant proposal https://github.com/bazelbuild/proposals/pull/351 that would, possibly, mean we wouldn't have to depend on shell scripts and rule authors could provide buildable executables to perform code coverage transformations.
Description of the bug:
When running
bazel coverage //...
for Java on Windows, it fails inexplicably.BUILD:
Running
bazel coverage test
fails with the following error:When I force the missing script into the runfiles via
data = ["@bazel_tools//tools/test:collect_coverage"]
I instead get%1 is not a valid Win32 application.
rather thanThe system cannot find the file specified.
To further clarify,
bazel test test
works fine and running everything with WSL successfully runs the coverage.What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
On a Windows machine, clone the given Java example https://github.com/bazelbuild/examples/tree/main/java-maven and run
bazel coverage :tests
.Which operating system are you running Bazel on?
Windows 10
What is the output of
bazel info release
?release 6.2.1
If
bazel info release
returnsdevelopment 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 master; git rev-parse HEAD
?No response
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response