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

Add --nextest-archive-file option to report subcommand #355

Merged
merged 1 commit into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,23 @@ jobs:
cd ../real1
cargo llvm-cov nextest-archive --archive-file a.tar.zst
cargo llvm-cov nextest --archive-file a.tar.zst --text --fail-under-lines 70
cargo llvm-cov report --nextest-archive-file a.tar.zst --fail-under-lines 70
rm a.tar.zst
cargo clean
cargo llvm-cov nextest-archive --archive-file a.tar.zst --release
cargo llvm-cov nextest --archive-file a.tar.zst --text --fail-under-lines 70
cargo llvm-cov report --nextest-archive-file a.tar.zst --fail-under-lines 70
rm a.tar.zst
cargo clean
cargo llvm-cov nextest-archive --archive-file a.tar.zst --cargo-profile custom
cargo llvm-cov nextest --archive-file a.tar.zst --text --fail-under-lines 70
cargo llvm-cov report --nextest-archive-file a.tar.zst --fail-under-lines 70
rm a.tar.zst
cargo clean
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
cargo llvm-cov report --nextest-archive-file a.tar.zst --fail-under-lines 70
working-directory: tests/fixtures/crates/bin_crate
- run: |
set -eEuxo pipefail
Expand Down
3 changes: 3 additions & 0 deletions docs/cargo-llvm-cov-report.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ OPTIONS:
This flag can only be used together with --text, --html, or --open. See also
--output-path.

--nextest-archive-file <PATH>
Path to nextest archive

--failure-mode <any|all>
Fail if `any` or `all` profiles cannot be merged (default to `any`)

Expand Down
6 changes: 3 additions & 3 deletions src/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ pub(crate) fn test_or_run_args(cx: &Context, cmd: &mut ProcessBuilder) {
if cx.args.release {
cmd.arg("--release");
}
if let Some(profile) = &cx.args.profile {
if cx.args.subcommand.is_nextest_based() {
if let Some(profile) = &cx.args.cargo_profile {
if cx.args.subcommand.call_cargo_nextest() {
cmd.arg("--cargo-profile");
} else {
cmd.arg("--profile");
Expand Down Expand Up @@ -253,7 +253,7 @@ pub(crate) fn clean_args(cx: &Context, cmd: &mut ProcessBuilder) {
if cx.args.release {
cmd.arg("--release");
}
if let Some(profile) = &cx.args.profile {
if let Some(profile) = &cx.args.cargo_profile {
cmd.arg("--profile");
cmd.arg(profile);
}
Expand Down
Loading