-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running on Windows is broken because of symlink usage #462
Comments
5441: RUN: Fix environment variables for Coverage runner r=Undin a=mchernyavsky Fixes `Run with Coverage` on the latest versions of the plugin. Also adds tests for the Coverage runner. NB: For now, `cargo test` with coverage doesn't work on Windows if MSVC toolchain is used (mozilla/grcov#462) Co-authored-by: mchernyavsky <[email protected]>
I've seen the same issue. I initially wondered if it was due to the use of --llvm, as I was linking with the MSVC linker, but removing that flag resulted in grcov reporting errors. Eventually I found that removing the -Cpanic=abort rustflag solved the problem. I also found I had to turn off control flow guard or my instrumented application crashed with a stack buffer overflow. |
I'll try to get to this as soon as I get my hands on a Windows machine. |
I've got another error on my Windows 10. Without Administrator rights, it ends with:
If running with admin rights because grcov want to do symlinks: set LLVM_PROFILE_FILE=your_name-%p-%m.profraw
set RUSTFLAGS=-Zinstrument-coverage
cargo +nightly build
cargo +nightly test
grcov . --source-dir . --llvm --binary-path .\target\debug\ --branch --ignore-not-existing --ignore "/*" --output-type html --output-path .\target\debug\coverage
Sorry, the error message is in french like my interface. It says that grcov cannot find a file. Versions informations:
|
Sorry, i'm replying to my previous report, I forget to install rustup component add llvm-tools-preview Solved my previous problem, but I got another erro with the same command as the previous one:
|
@lolo32 does the report look OK? That error can be ignored in most cases. |
This comment has been minimized.
This comment has been minimized.
#720 should fix this. |
To reproduce, run the following code with cmd:
There is no coverage on the report. Also, I have noticed that if I use
nightly-gnu
instead ofnightly
, the result is correct. Maybe the-Zprofile
is not supported for msvc target?System informantion:
The text was updated successfully, but these errors were encountered: