repositories / smith

smith

There are many coding harnesses - but this one is fast

owned by bugabinga

split mutants config

90878bbe5a8f85b6014ec3635001eb4c19bdb3f0

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (1)

+9 / −5 text lines

Diff layout

xtask/src/main.rs

Modified

+9 / −5 text lines

105105/// Mutation testing runs on demand, never in the blocking check chain.
106106///
107/// Scratch lives under `target/mutants-tmp` on disk: the system tmpfs is
108/// 16G of RAM and tree copies would crawl the machine. Jobs stay low for
109/// the same reason. The baseline test run is skipped because `cargo x
110/// check` owns test verification.
107/// Split of concerns, kept CI-sensible:
108/// - `.cargo/mutants.toml` owns tree properties (scope, tool, profiles)
109/// so bare `cargo mutants` behaves identically anywhere.
110/// - this step owns run context: disk-backed scratch (system tmpfs is
111/// 16G RAM and tree copies crawl the machine), a modest default job
112/// count overridable through `CARGO_MUTANTS_JOBS`, and a skipped
113/// baseline because `cargo x check` owns test verification.
111114fn cargo_mutants() -> ExitCode {
112115 let installed = tool_present_bin("cargo-mutants", MUTANTS_VERSION, || {
113116 cargo(&[
123126 if std::fs::create_dir_all(&scratch).is_err() {
124127 return fail("cannot create target/mutants-tmp\n");
125128 }
129 let jobs = std::env::var("CARGO_MUTANTS_JOBS").unwrap_or_else(|_| "4".to_string());
126130 match Command::new("cargo")
127131 .env("TMPDIR", &scratch)
128132 .args([
129133 "mutants",
130134 "--jobs",
131 "4",
135 &jobs,
132136 "--baseline",
133137 "skip",
134138 "--no-shuffle",