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

[nextest-runner] add --cargo-verbose #967

Merged
merged 1 commit into from
Sep 20, 2023
Merged
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
12 changes: 9 additions & 3 deletions cargo-nextest/src/cargo_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use crate::output::OutputContext;
use camino::{Utf8Path, Utf8PathBuf};
use clap::Args;
use clap::{ArgAction, Args};
use std::{borrow::Cow, path::PathBuf};

/// Options passed down to cargo.
Expand Down Expand Up @@ -82,10 +82,14 @@
#[arg(long, value_name = "NAME", group = "cargo-opts")]
cargo_profile: Option<String>,

/// Run cargo in quiet mode
/// Do not print cargo log messages
#[arg(long, group = "cargo-opts")]
cargo_quiet: bool,

/// Use cargo verbose output (specify twice for very verbose/build.rs output)
#[arg(long, action = ArgAction::Count, group = "cargo-opts")]
cargo_verbose: u8,

Check warning on line 91 in cargo-nextest/src/cargo_cli.rs

View check run for this annotation

Codecov / codecov/patch

cargo-nextest/src/cargo_cli.rs#L91

Added line #L91 was not covered by tests

/// Number of build jobs to run
#[arg(long, value_name = "JOBS", group = "cargo-opts")]
build_jobs: Option<String>,
Expand Down Expand Up @@ -126,7 +130,6 @@
#[arg(long, require_equals = true, value_name = "FMTS", group = "cargo-opts")]
timings: Option<Option<String>>,

// --verbose is not currently supported
// --color is handled by runner
/// Require Cargo.lock and cache are up to date
#[arg(long, group = "cargo-opts")]
Expand Down Expand Up @@ -242,6 +245,9 @@
if options.cargo_quiet {
self.add_arg("--quiet");
}
if options.cargo_verbose > 0 {
self.add_args(std::iter::repeat("--verbose").take(options.cargo_verbose.into()));

Check warning on line 249 in cargo-nextest/src/cargo_cli.rs

View check run for this annotation

Codecov / codecov/patch

cargo-nextest/src/cargo_cli.rs#L249

Added line #L249 was not covered by tests
}
if let Some(build_jobs) = &options.build_jobs {
self.add_args(["--jobs", build_jobs.as_str()]);
}
Expand Down
Loading