travis-cargo currently cannot upload / generate code coverage information for documentation tests

896050e
Opened by gnzlbg at 2022-01-18 22:16:10

@alexcrichton mentioned in this issue that this might be a bug in rustdoc --test. Currently it is not possible to generate code coverage information from documentation tests. This results in either wrong coverage information being generated (when some functionality is tested exclusively in documentation tests). The current workarounds are unfortunately to either duplicate documentation tests into module tests to generate correct code coverage information, or to "accept" wrong code coverage information in e.g. coveralls.

  1. Triage: I don't personally use these features; @gnzlbg are you still seeing this?

    Steve Klabnik at 2020-01-09 14:22:03

  2. I can try, but I don't think anything has happened upstream to support this? cc @QuietMisdreavus I've seen rustdoc can now output the percentage of documented APIs, but that is different from actually being able to run the doc-tests with code-coverage instrumentation, and output the instrumentation results to a meaningful place, or to provide some way that cargo-travis could use to run the doc tests with external code coverage sampling (maybe this would need a custom test runner?).

    gnzlbg at 2020-01-10 10:18:31