-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
code coverage is broken - details of the error #6857
Comments
I was able to get reports (with branch coverage) by installing the https://github.com/taiki-e/cargo-llvm-cov tool. Should I add this to the developer docs? cargo llvm-cov --html -p uu_sort
cargo llvm-cov --html run factor -- 1234567 |
Oh, excellent news. Yes, it would be great :) |
the %p in |
mozilla/grcov#1287 might be the fix |
I am going to collect some finding of my work (@cakebaker probably has other).
-Zprofile has been removed from rustc - Remove support for
-Zprofile
(gcov-style coverage instrumentation) rust-lang/rust#131829we should use -Cinstrument-coverage instead
we have to switch to a different method described here readme: example uses
-Zprofile
which has been removed from Rust nightly mozilla/grcov#1240 (cc @marco-c)we need to pass LLVM_PROFILE_FILE as a new env variable, which wasn't passed to some commands by ucmd()
i fixed it in 0cd58c6
it was leaving some coverage artifacts in the pwd which was breaking some tests like ls.
LLVM_PROFILE_FILE: "${{ github.workspace }}/build/coverage-%p-%m.profraw"
because of the change of format, files have to be exported into a different directory to make sure they don't pollute the tests
the coverage files are HUGE
56G /Users/runner/work/coreutils/coreutils/build/
on a macit causes the linux machine to fails with
System.IO.IOException: No space left on device : '/home/runner/runners/2.320.0/_diag/Worker_20241116-105056-utc.log'
and doesn't show anything in the log
it takes 16 minutes for grcov to process everything - it was a few seconds before
During one of my numerous experiment, i got
<LLVM Profile Warning: Unable to track new values: Running out of static counters. Consider using option -mllvm -vp-counters-per-site=<n> to allocate more value profile counters at compile time.
despite passing-Clink-arg=-Wl,-mllvm -Clink-arg=-Wl,-vp-counters-per-site=6
, still happened.Using
cargo llvm-cov show-env
like in https://github.com/foundationdb-rs/foundationdb-rs/blob/c6623a84a7f35597eb7f68357a3c9cb91831501e/.github/workflows/coverage.yml fails the same wayMy experimentations: #6850
The text was updated successfully, but these errors were encountered: