Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/tools/ci/src/commands/doc_test.rs
6598 views
1
use crate::{args::Args, Prepare, PreparedCommand};
2
use argh::FromArgs;
3
use xshell::cmd;
4
5
/// Runs all doc tests.
6
#[derive(FromArgs, Default)]
7
#[argh(subcommand, name = "doc-test")]
8
pub struct DocTestCommand {}
9
10
impl Prepare for DocTestCommand {
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
16
vec![PreparedCommand::new::<Self>(
17
cmd!(
18
sh,
19
"cargo test --workspace --doc {no_fail_fast...} {jobs...} -- {test_threads...}"
20
),
21
"Please fix failing doc tests in output above.",
22
)]
23
}
24
}
25
26