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
coverage data file is overwritten when kcov run with --report-only option #330
Comments
Sorry for the very late reply! I can reproduce your problem, but I think it's limited to bash (and probably Python). It works for compiled code still. The collect-only/report-only is sort of a performance optimization, which is relevant for compiled programs, where the program execution is lightning fast compared to kcov. For bash, when running with PS4/debug trap set, the program executes at a nice slow pace anyhow, so the overhead of reporting is less. I'm not quite sure what causes the problem for bash, but I'm inclined to think that the collect-only option can be forbidden (i.e., a nop) with the bash "engine". |
on release 38,centos,
As it is written in --help:
first run:
kcov --collect-only /tmp/kcov ./main.sh
the size of coverage.db file is 8208 byte
then run:
kcov --report-only /tmp/kcov ./main.sh
the size of coverage.db file is 16 byte
and the numbers in html report are all 0
The text was updated successfully, but these errors were encountered: