Closed robertprp closed 8 months ago
RUN cargo nextest archive --workspace --archive-file test.tar.zst
You have to use cargo llvm-cov nextest-archive
, like:
(We should perhaps expand the documentation of nextest to explain this or enhance our own documentation on nextest.)
The issue with using cargo llvm-cov nextest-archive
is that it recompiles everything again.
I have tried without success.
COPY --from=builder /app/target /app/target/llvm-cov-target/
COPY . .
RUN cargo llvm-cov nextest-archive --workspace --archive-file test.tar.zst
ENTRYPOINT ["cargo", "make", "docker-ci"]
Note that i mapped the build to /app/target/llvm-cov-target/
and /app/target/
We use a custom build command for a package and using nextest-archive does throw error
The issue with using
cargo llvm-cov nextest-archive
is that it recompiles everything again.
This is a fundamental limitation of Rust's current code coverage (regardless of which way you use it). There are several RFCs and proposals to improve this, but none have been approved yet.
We use a custom build command for a package and using nextest-archive does throw error
I don't have any information about the project you are building, so I don't know the details, but it is possible that the old build artifact is doing something or the fact that rustflags is being applied to the build script is causing some problems. (The former can be addressed by running cargo clean
first, the latter by passing --target
option.)
Thanks for your responses, I will try to investigate a bit more about this topic & avoid recompiling
I have been trying to add coverage part to a Rust project that runs tests with
nextest
. Tests are running correctly but I am not being able to debug the following error:Simplified docker file:
Command that is run
Versions
cargo-llvm-cov v0.6.4