# Objective - Fixes #14723 ## Solution - add the manifest path to the cargo command ## Testing - ran `cargo run -p ci -- bench-check` locally
21 lines
613 B
Rust
21 lines
613 B
Rust
use crate::{Flag, Prepare, PreparedCommand};
|
|
use argh::FromArgs;
|
|
use xshell::cmd;
|
|
|
|
/// Checks that the benches compile.
|
|
#[derive(FromArgs, Default)]
|
|
#[argh(subcommand, name = "bench-check")]
|
|
pub struct BenchCheckCommand {}
|
|
|
|
impl Prepare for BenchCheckCommand {
|
|
fn prepare<'a>(&self, sh: &'a xshell::Shell, _flags: Flag) -> Vec<PreparedCommand<'a>> {
|
|
vec![PreparedCommand::new::<Self>(
|
|
cmd!(
|
|
sh,
|
|
"cargo check --benches --target-dir ../target --manifest-path ./benches/Cargo.toml"
|
|
),
|
|
"Failed to check the benches.",
|
|
)]
|
|
}
|
|
}
|