Closed julienJean99 closed 4 years ago
I don't think it's related to #278, in that case the program actually crashes, and that doesn't seem to be the case here.
You can add --debug=31 to enable more printouts. Sometimes it's possible to see exactly where it hangs then. Also, you could try limiting the collection a bit more with --include-pattern, if there is a problematic section which gets it to hang.
thank you for the quick response. Unfortunately, I have access to this project on Tuesday and Friday so I'll get back to you then.
so @SimonKagstrom I ran with --debug and at the end it print's STOPPED in state 5
i redirect to the output to a file do you want it.
Hi, I'm sorry to spam a little but I fixed the hanging problem with docker. But here is the output of running kcov:
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out
so the test is filtered out and I don't know why. Note that it is not due to the binary of cargo --no-run
cause when running the binary on its own here is the output:
running 1 test
test tests::test ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
since in the kcov case, the test is filtered the test never runs and is not counted towards the coverage.
here is the latest command i'm using for kcov:
kcov --exclude-pattern=/usr --include-pattern=/app/src /app/target/cov /app/target/debug/PKGNAME
Hmm... I'm not sure why kcov would filter a test out, are you sure that the parameters to the program is exactly the same in both cases?
Anyway, I'm not familiar with rust, so I might be missing something crucial here.
for me, the only thing ta differs is the use of kcov but I can make more test next week by doing every step by hand and i can come back with maybe more info and the output file
OK, thanks for the patience!
ok, so I don't know what was wrong. I used a bash script I found to execute kcov but it seems like there was something wrong with it so I simplified the script by putting the hard path rather than looking for it every time.(not the prettiest but at least it works).
also, you have the output of kcov --debug=31 when it was hanging here: output.txt
thank you so much for being active and nice.
Good to hear that you resolved it!
It's still strange that kcov should hang. Could there be multiple kcovs installed, i.e., is the one you use the hard path to the same as if you run which kcov
?
no the one I use the hard path is in the docker and I build it from the source of the master branch. The hanging one is the one I installed in macOS via brew install.
hi,
I just spent the day trying to troubleshoot why Kcov hangs after running you can see what I tried here but here a recap
I am on:
I am using this command
kcov --exclude-pattern=/.cargo Project_Root/target/cov Project_Root/target/debug/$PKGNAME-*
.when it is run it creates the /cov dir and the index.html (which I suppose to tell me that everything is finished) but the program never ends and I get this on the screen
running 0 tests
and nothing more. I can't C-c out and so I send a segFault to stop it.as an additional annoyance when
RUSTFLAGS='-C link-dead-code'
is set kcov never creat the index.html.could it be related to #278?