Repository navigation
tests: Fix LCOV_OPTS to be in the correct position - #28771
Conversation
`lcov`'s `-a` option takes an argument. With `LCOV_OPTS` immediately after `-a`, the first additional argument becomes the argument to `-a` which is incorrect. Also add `LCOV_OPTS` to more `lcov` calls.
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
|
Can you clarify whether this has any visible effect on the generated html? I presume only when branch coverage is enabled? |
It shouldn't, other than actually working. The man page for There clearly is an argument to the |
|
I agree that it is wrong. I mostly wonder why it was working fine previously, when it shouldn't. |
fanquake
left a comment
There was a problem hiding this comment.
ACK 88e09ac
I mostly wonder why it was working fine previously, when it shouldn't.
It looks like when LCOV_OPTS is set, during branch coverage, and we end up with something like lcov -a --rc lcov_branch_coverage=1 baseline_filtered.info, lcov just reads pass the extra arguments, and still uses the file, i.e:
touch some_file
lcov -a --rc lcov_branch_coverage=1 some_file
Combining tracefiles.
.. found 1 files to aggregate.
Merging some_file..0 remaining
lcov: ERROR: trace file 'some_file' is empty
(use "lcov --ignore-errors empty ..." to bypass this error)|
Thanks for taking a look. The |
|
I think
|
lcov's-aoption takes an argument. WithLCOV_OPTSimmediately after-a, the first additional argument becomes the argument to-awhich is incorrect.Also add
LCOV_OPTSto morelcovcalls.