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

--target + nextest-archive cause llvm-cov to not find files #334

Closed
cwfitzgerald opened this issue Jan 13, 2024 · 2 comments
Closed

--target + nextest-archive cause llvm-cov to not find files #334

cwfitzgerald opened this issue Jan 13, 2024 · 2 comments
Labels
A-nextest Area: nextest integration https://github.com/nextest-rs/nextest C-bug Category: related to a bug.

Comments

@cwfitzgerald
Copy link

cwfitzgerald commented Jan 13, 2024

When I use --target when building the initial archive, trying to run the archive cause llvm-cov to not find the files generated.

Generation command

cargo llvm-cov nextest-archive --all-features  --target aarch64-apple-darwin --archive-file tests.tar.zst

Error

$ cargo llvm-cov nextest --archive-file tests.tar.zst --extract-overwrite --no-fail-fast

<snip> test output </snip>

warning: not found object files (searched directories: /Users/cwfitzgerald/programming/wgpu/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: `/Users/cwfitzgerald/.rustup/toolchains/1.71-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-cov report -instr-profile=/Users/cwfitzgerald/programming/wgpu/target/llvm-cov-target/wgpu.profdata -ignore-filename-regex '/rustc/([0-9a-f]+|[0-9]+\.[0-9]+\.[0-9]+)/|^/Users/cwfitzgerald/programming/wgpu(/.*)?/(tests|examples|benches)/|^/Users/cwfitzgerald/programming/wgpu/target/llvm\-cov\-target($|/)|^/Users/cwfitzgerald/\.cargo/(registry|git)/|^/Users/cwfitzgerald/\.rustup/toolchains($|/)'` (exit status: 1)

The same problem happens with --no-report on the command, then calling cargo llvm-cov report --lcov --output-path lcov.info

I tried adding --target to the nextest call, but nextest doesn't except that argument with an archive file. Using --no-report and specifying the target when generating the report also doesn't work.

Motivation

Cross compiling from an x86 mac to generate archives used on an ARM mac. See gfx-rs/wgpu#5056

As always, I can PR things if you point me in the right direction.

@taiki-e taiki-e added C-bug Category: related to a bug. A-nextest Area: nextest integration https://github.com/nextest-rs/nextest labels Jan 13, 2024
taiki-e added a commit that referenced this issue Jan 13, 2024
@taiki-e
Copy link
Owner

taiki-e commented Jan 13, 2024

This and #333 have been fixed in 0.6.1. Thanks for reporting these issues @cwfitzgerald!

(This case is now tested in CI)

host=$(rustc -Vv | grep host | sed 's/host: //')
cargo llvm-cov nextest-archive --archive-file a.tar.zst --target "${host}"
cargo llvm-cov nextest --archive-file a.tar.zst --text --fail-under-lines 70 --target "${host}"

@cwfitzgerald
Copy link
Author

Amazing! Thanks for the super fast response and release!

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