Path: blob/main/tools/ci/src/commands/integration_test.rs
6598 views
use crate::{args::Args, commands::get_integration_tests, Prepare, PreparedCommand};1use argh::FromArgs;2use xshell::cmd;34/// Runs all integration tests (except for doc tests).5#[derive(FromArgs, Default)]6#[argh(subcommand, name = "integration-test")]7pub struct IntegrationTestCommand {}89impl Prepare for IntegrationTestCommand {10fn prepare<'a>(&self, sh: &'a xshell::Shell, args: Args) -> Vec<PreparedCommand<'a>> {11let no_fail_fast = args.keep_going();12let jobs = args.build_jobs();13let test_threads = args.test_threads();14let jobs_ref = jobs.as_ref();15let test_threads_ref = test_threads.as_ref();1617get_integration_tests(sh)18.into_iter()19.map(|path| {20PreparedCommand::new::<Self>(21cmd!(22sh,23"cargo test --manifest-path {path}/Cargo.toml --tests {no_fail_fast...} {jobs_ref...} -- {test_threads_ref...}"24),25"Please fix failing integration tests in output above.",26)27})28.collect()29}30}313233