Skip to content

Commit

Permalink
Merge branch '151-baseline-packages'
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcefrog committed Oct 4, 2023
2 parents 65e3953 + dfb3044 commit 49ae069
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# cargo-mutants changelog

## Unreleased

- The baseline test (with no mutants) now tests only the packages in which
mutants will be generated, subject to any file or regex filters. This
should both make baseline tests faster, and allow testing workspaces in
which some packages have non-hermetic tests.

## 23.9.1

- Mutate the known collection types `BinaryHeap`, `BTreeSet`, `HashSet`,
Expand Down
5 changes: 4 additions & 1 deletion book/src/workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cargo-mutants supports testing Cargo workspaces that contain multiple packages.

By default, all source files in all packages in the workspace are tested.

**NOTE: This behavior might not be the best choice, and this may change in future.**
**NOTE: This behavior is likely to change in future: see <https://github.com/sourcefrog/cargo-mutants/issues/156>.**

You can use the `--file` options to restrict cargo-mutants to testing only files
from some subdirectory, e.g. with `-f "utils/**/*.rs"`. (Remember to quote globs
Expand All @@ -13,3 +13,6 @@ on the command line, so that the shell doesn't expand them.) You can use `--list

For each mutant, only the containing package's tests are run, on the theory that
each package's tests are responsible for testing the package's code.

The baseline tests exercise all and only the packages for which mutants will
be generated.

0 comments on commit 49ae069

Please sign in to comment.