I'm trying to create a CI workflow which requires me to do both code coverage and ordinary testing. We run both at this time, because the coverage test instrumented for grcov can fail, but the normal test could pass. I want to automate comparing the test that failed in coverage instrumentation to the tests run without it. So for each test that failed in the grcov instrumentation I want to run a similar test without instrumentation.
Currently, the way to do it, is to hardcode the test paths, and/or use unreliable text-based testing detection. It's both labour intensive and not very reliable once people start adding more tests (which they will).
So my question is
- Is there a way to get a list of all tests that are to be run from a multi-crate project.
- Is there a way to attach actions to
cargo -testif it fails, without stopping cargo test. - Is there a way to ask
cargo testto only mention the names of failed tests (if any).