Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

cargo-verify: add --bin option #142

Merged
merged 1 commit into from
Jun 4, 2021
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
9 changes: 8 additions & 1 deletion cargo-verify/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ pub struct Opt {
#[structopt(long, number_of_values = 1, value_name = "TESTNAME")]
test: Vec<String>,

/// Build and run this specific binary
#[structopt(long, value_name = "NAME")]
bin: Option<String>,

// jobs_arg is used for holding the CL option. After parsing, if the user
// specified a value it will be copied to the `jobs` field below, if the
// user didn't specify a value, we will use num_cpus, and put it in the
Expand Down Expand Up @@ -378,7 +382,10 @@ fn main() -> CVResult<()> {
clean(&opt);
}

let package = get_meta_package_name(&opt)?;
let package = match &opt.bin {
Some(bin) => bin.clone(),
None => get_meta_package_name(&opt)?,
};
info_at!(&opt, Verbosity::Informative, "Checking {}", &package);

let status = match opt.backend {
Expand Down