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