-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
kcov loses accumulated data when ${1:?} used #75
Comments
OK, this is sort of an interesting case. Apparently bash will parse this as a syntax error and return an error code:
adding a parameter sets that right again:
and in this case, kcov works as expected. However, as you noted, the real kcov issue here is that accumulation doesn't work as expected. I have to investigate, but my guess is that the reason is that kcov visits files in bash "lazily" the first time they are referenced through PS4. So in the error-case, kcov won't see any files at all. When you added the echo, the file will show up and the accumulation can be done. |
Thanks. I suppose then that I'll have to visit my larger test case. I strip out Mark E. Hamilton |
The smaller tests are quite good to have, so thanks for doing that! Is your original problem an accumulation problem? |
I think so. When I run a single test case the shell lines in question Mark E. Hamilton |
Hi, again,
I've got another simple test case.
When I run it with a parameter I get 100% coverage
When I run it with no parameter I get 0% coverage.
Howwever, when I run them both in sequence I get 100% coverage after the first kcov, and 0% after the second.
FInally, if I uncomment the 'echo before' statement I get 100% coverage in both cases when I run them in the order above. If I run them in the other order (the failure case first) I get 33% coverage after the failure case, and then 100% coverage after the success case (which seems correct.)
The text was updated successfully, but these errors were encountered: