You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the things left to future work in #3396 was code coverage for Android. As described in #3396 (comment), there were some issues preventing that at the time. One of the main points is that Rust on Android is installed via a package manager rather than rustup, so does not have access to nightly. However, as mentioned in that comment, stable rust does now support -C instrument-coverage, which is apparently supposed to be more accurate anyway.
I was able to get this working on Android with approximately the following:
However, once uploading to codecov, this had the problem of not ignoring #[cfg()]] statements or blank lines. I couldn't see any way of fixing this in the docs for any of the respective llvm tools, so I tried combining it with grcov. I ran basically the commands used currently, just with an extra -b target/debug/ arg, which according to the grcov docs should work. Instead, it just generates an essentially empty lcov.info file (it contains a single line, TN:). I've since confirmed that this isn't unique to Android, I see the same effect on Linux (to reproduce, run the first two or three blocks of the above shell code, with $features and $this_repo replaced or set as needed, then run grcov). I'm not sure whether this is a bug in how I'm trying to generate the coverage file, or a bug in grcov, but any ideas would be appreciated.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is being tracked in #6857 now. I don't think Android ever had working coverage, but in any case it's blocked on getting something working in the general case. If we want a separate issue to track, we can open one once we know what the goal is.
One of the things left to future work in #3396 was code coverage for Android. As described in #3396 (comment), there were some issues preventing that at the time. One of the main points is that Rust on Android is installed via a package manager rather than rustup, so does not have access to nightly. However, as mentioned in that comment, stable rust does now support
-C instrument-coverage
, which is apparently supposed to be more accurate anyway.I was able to get this working on Android with approximately the following:
However, once uploading to codecov, this had the problem of not ignoring
#[cfg()]]
statements or blank lines. I couldn't see any way of fixing this in the docs for any of the respective llvm tools, so I tried combining it withgrcov
. I ran basically the commands used currently, just with an extra-b target/debug/
arg, which according to the grcov docs should work. Instead, it just generates an essentially emptylcov.info
file (it contains a single line,TN:
). I've since confirmed that this isn't unique to Android, I see the same effect on Linux (to reproduce, run the first two or three blocks of the above shell code, with$features
and$this_repo
replaced or set as needed, then run grcov). I'm not sure whether this is a bug in how I'm trying to generate the coverage file, or a bug in grcov, but any ideas would be appreciated.The text was updated successfully, but these errors were encountered: