mozilla / mozilla/grcov

`--log-level` doesn't work

Open
#1,024 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
1.4k
Forks
170
Avg merge
3d 10h
Merged PRs (30d)
4

Description

I'm running grcov $(find . -name 'cargo-test-*.profraw' -o -name '*.gcno' -o -name '*.gcda') --binary-path ./target/testnet/deps -s . -t html,lcov --branch --ignore-not-existing -o html42-deps --log-level DEBUG --log stdout

And the only output I get is

[2023-04-25 10:04:46] 10:04:46 [ERROR] A panic occurred at /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/grcov-0.8.18/src/producer.rs:504: Cannot load file '"/builds/TriplEight/target/debug/build/eyre-283ea9182ebd0eaf/build_script_build-283ea9182ebd0eaf.gcda"': it isn't a .info, a .json or a .xml file.
[2023-04-25 10:04:48] 10:04:48 [ERROR] A panic occurred at /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/grcov-0.8.18/src/producer.rs:504: Cannot load file '"/builds/TriplEight/target/debug/deps/chacha20poly1305-0942dab31ea37fd3.gcno"': it isn't a .info, a .json or a .xml file.
exit code 123

Tried different options for --log-level and --log flags, but nothing helped. The only way I could come up with to get the logs is strace -f grcov ..., but it's a pain to dig through.

It would be helpful to see gcov output like here: https://users.rust-lang.org/t/howto-generating-a-branch-coverage-report/8524/11

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the CLI handles --log-level and --log, then inspect the panic reported at producer.rs:504 while processing .gcda and .gcno files. Reproduce the command from the issue and compare the available logging output with the requested gcov output; done means the flags provide the expected diagnostic logs without requiring strace.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.