bevy/tools/ci/src/commands/test.rs
Joshua Ortiz a656023363
Remove benchmarks from CI test (#16833)
# Objective

Fixes [Do not test benchmarks in CI
#16803](https://github.com/bevyengine/bevy/issues/16803), part of [Add
benchmarks and compile fail tests back to
workspace #16801](https://github.com/bevyengine/bevy/issues/16801)

## Solution

Removes the `--benches` flag from the CI tool test.

## Testing

`cargo run -p ci --quiet -- test`
2024-12-16 19:15:01 +00:00

26 lines
738 B
Rust

use crate::{Flag, Prepare, PreparedCommand};
use argh::FromArgs;
use xshell::cmd;
/// Runs all tests (except for doc tests).
#[derive(FromArgs, Default)]
#[argh(subcommand, name = "test")]
pub struct TestCommand {}
impl Prepare for TestCommand {
fn prepare<'a>(&self, sh: &'a xshell::Shell, flags: Flag) -> Vec<PreparedCommand<'a>> {
let no_fail_fast = flags
.contains(Flag::KEEP_GOING)
.then_some("--no-fail-fast")
.unwrap_or_default();
vec![PreparedCommand::new::<Self>(
cmd!(
sh,
"cargo test --workspace --lib --bins --tests {no_fail_fast}"
),
"Please fix failing tests in output above.",
)]
}
}