Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo llvm-cov nexttest-archive does not work with the --cargo-profile flag of nextest #348

Closed
weiznich opened this issue Feb 21, 2024 · 1 comment
Labels
A-nextest Area: nextest integration https://github.com/nextest-rs/nextest C-bug Category: related to a bug.

Comments

@weiznich
Copy link
Contributor

I've run the following commands:

cargo llvm-cov nextest-archive --cargo-profile test-jenkins --archive-file tests.tar.zst
cargo llvm-cov nextest --archive-file tests.tar.zst

while having a custom cargo profile test-jenkins that just disable incremental compilation.

This fails after running the tests with the following output:

warning: not found object files (searched directories: /src/target/llvm-cov-target/target/debug); this may occur if show-env subcommand is used incorrectly (see docs or other warnings), or unsupported commands such as nextest archive are used
No filenames specified!
error: failed to generate report: process didn't exit successfully: `/usr/local/rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-cov report -instr-profile=/src/target/llvm-cov-target/src.profdata -ignore-filename-regex '/rustc/([0-9a-f]+|[0-9]+\.[0-9]+\.[0-9]+)/|^/src(/.*)?/(tests|examples|benches)/|^/src/target/llvm\-cov\-target($|/)|^/usr/local/cargo/(registry|git)/|^/usr/local/rustup/toolchains($|/)'` (exit status: 1)

Likely that's related to the fact that it search in the wrong path for the mentioned object files. I would expect them in /src/target/llvm-cov-target/target/test-jenkins instead. It works fine as long as I don't specify a profile at all.

@taiki-e taiki-e added C-bug Category: related to a bug. A-nextest Area: nextest integration https://github.com/nextest-rs/nextest labels Feb 21, 2024
@taiki-e
Copy link
Owner

taiki-e commented Feb 22, 2024

This is a similar case of #334.

The same flags (--cargo-profile) need to be passed to both cargo llvm-cov nextest-archive and cargo llvm-cov nextest --archive-file, but cargo-llvm-cov is not working because it propagates them to cargo nextest .. --extract-to.

error: the argument '--extract-to <DIR>' cannot be used with:

Ideally I would like to embed information about the flags passed to cargo llvm-cov nextest-archive to the archive created by nextest-archive to eliminate the need to pass the same flags to cargo llvm-cov nextest --archive-file, but I don't know if nextest supports that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-nextest Area: nextest integration https://github.com/nextest-rs/nextest C-bug Category: related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants