cargo-travis icon indicating copy to clipboard operation
cargo-travis copied to clipboard

Handle lack of debug symbols in the test profile

Open roblabla opened this issue 8 years ago • 3 comments

Reported by @debris at https://github.com/roblabla/cargo-travis/issues/18#issuecomment-337222869

just one more question. The crate is working fine for me at ethabi repo, but I have problems with the other repo, which has slightly different project structure. pr: debris/tiny-keccak#19 coveralls report: https://coveralls.io/builds/13753308 coveralls reports that no files were covered

roblabla avatar Oct 17 '17 16:10 roblabla

kcov relies on debug symbols (and probably a sane optimization level) to do its work, but you are removing debug symbols and setting opt-level to 3 in the test profile, which cargo-travis uses : https://github.com/debris/tiny-keccak/blob/master/Cargo.toml#L19

When I set debug = true in the test profile, I managed to get a coverage report.

I should probably make it error hard with a good error message when it fails this way.

roblabla avatar Oct 17 '17 18:10 roblabla

you are absolutely right, thank you!

debris avatar Oct 18 '17 14:10 debris

Investingating some old issues. We currently have some code injecting -C debuginfo=2 when built with --release. I think unconditionally injecting -C debuginfo=2 would fix this problem for good.

https://github.com/roblabla/cargo-travis/blob/master/src/lib.rs#L36

roblabla avatar Jun 17 '19 08:06 roblabla