Skip to content

Commit

Permalink
Add --nextest-archive-file option to report subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Mar 10, 2024
1 parent 60affb1 commit 2aa6ad5
Show file tree
Hide file tree
Showing 6 changed files with 1,032 additions and 988 deletions.
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

0 comments on commit 2aa6ad5

Please sign in to comment.