I have a workflow that runs cargo test
with the right options being passed to LLVM etc to produce coverage data I can feed up to Codecov. However, the code I'm most interested in testing is a proc macro which doesn't show up in that listing.
Does anyone know if it's possible to get coverage for proc macros that run while building tests, rather than when they run? That is, I run unit tests that depend on the macro, and get code coverage results for both the macro body and also the test harness that calls to the macro.
An alternative idea I had was manually driving the macros as though they were normal functions by feeding them token streams, but I'd like to avoid that as it seems awkward and fragile to pull off