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.
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.
`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.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
For detailed information about the code coverage, see the test coverage report.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| ACK | fanquake |
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?
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 lcov says:
-a tracefile_pattern
--add-tracefile tracefile_pattern
Add contents of all files matching glob pattern trcefile_pattern.
Specify several tracefiles using the -a switch to combine the coverage data contained in
these files by adding up execution counts for matching test and filename combinations.
The result of the add operation will be written to stdout or the tracefile specified
with -o.
Only one of -z, -c, -a, -e, -r, -l, --diff or --summary may be specified at a time.
There clearly is an argument to the -a option. Anything that goes into LCOV_OPTS is not necessarily going to be the right argument, and the branch coverage opts certainly are not. I think it's obvious that what we currently have is just wrong.
I agree that it is wrong. I mostly wonder why it was working fine previously, when it shouldn't.
ACK 88e09ac2a15d674db9e814755602572be61241ff
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 --rc seems wrong as well? Previously it was ignored, but now I wonder why it doesn't lead to errors, because, according to the manpage:
Only one of -z, -c, -a, -e, -r, -l and --diff may be specified at a time.
I think --rc is different case, not included in that list, so it is also still working here?
--rc keyword=value Override a configuration directive.
Use this option to specify a keyword=value statement which overrides the corresponding configuration statement in the > lcovrc configuration file. You can specify this option more than once to override multiple configuration statements. See > lcovrc(5) for a list of available keywords and their meaning.