mozilla / grcov

Rust tool to collect and aggregate code coverage data for multiple source files
Mozilla Public License 2.0
1.18k stars 148 forks source link

Exit code is 0 even in case of fatal error #1160

Open avandecreme opened 9 months ago

avandecreme commented 9 months ago

For example if I have a corrupted profraw file, the following is printed to stderr:

warning: /tmp/.tmp9VFcUq/foo-1-11510002822451752252_0_1.profraw: invalid instrumentation profile data (file header is corrupt)
error: no profile can be merged
14:55:09 [ERROR] Error while executing llvm tools: Failure while running "/usr/local/rustup/toolchains/1.74.1-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-profdata" "merge" "-f" "-" "-sparse" "-o" "/tmp/.tmp9VFcUq/0/grcov.profdata"

However, grcov still returns with exit code 0 so in my case, the CI doesn't detect the error.