Skip to content

Commit

Permalink
Rename exit code to BASELINE_FAILED, matching the term used elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcefrog committed Feb 7, 2025
1 parent 8e3c7c7 commit 4f24b13
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion book/src/exit-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cargo-mutants returns an exit code that can be used by scripts or CI.
* **3**: Some tests timed out: possibly the mutations caused an infinite loop,
or the timeout is too low.

* **4**: The tests are already failing or hanging before any mutations are
* **4**: The baseline tests are already failing or hanging before any mutations are
applied, so no mutations were tested.

For more detailed machine-readable information, use the [`mutants.out` directory](mutants-out.md).
2 changes: 1 addition & 1 deletion src/exit_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub const FOUND_PROBLEMS: i32 = 2;
pub const TIMEOUT: i32 = 3;

/// The tests are already failing in an unmutated tree.
pub const CLEAN_TESTS_FAILED: i32 = 4;
pub const BASELINE_FAILED: i32 = 4;

/// An internal software error, from sysexit.
pub const SOFTWARE: i32 = 70;
2 changes: 1 addition & 1 deletion src/outcome.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl LabOutcome {
.iter()
.any(|o| !o.scenario.is_mutant() && !o.success())
{
exit_code::CLEAN_TESTS_FAILED
exit_code::BASELINE_FAILED
} else if self.timeout > 0 {
exit_code::TIMEOUT
} else if self.missed > 0 {
Expand Down

0 comments on commit 4f24b13

Please sign in to comment.