Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/tools/ci/src/commands/integration_test_clean.rs
6598 views
1
use crate::{args::Args, Prepare, PreparedCommand};
2
use argh::FromArgs;
3
use xshell::cmd;
4
5
use super::get_integration_tests;
6
7
/// Cleans the build artifacts for all integration tests.
8
#[derive(FromArgs, Default)]
9
#[argh(subcommand, name = "integration-test-clean")]
10
pub struct IntegrationTestCleanCommand {}
11
12
impl Prepare for IntegrationTestCleanCommand {
13
fn prepare<'a>(&self, sh: &'a xshell::Shell, _args: Args) -> Vec<PreparedCommand<'a>> {
14
get_integration_tests(sh)
15
.into_iter()
16
.map(|path| {
17
PreparedCommand::new::<Self>(
18
cmd!(sh, "cargo clean --manifest-path {path}/Cargo.toml"),
19
"Failed to clean integration test.",
20
)
21
})
22
.collect()
23
}
24
}
25
26