Skip to content

Commit c23402c

Browse files
committed
Merge rust-bitcoin#4228: docs: Update README to replace use of mutagen with cargo-mutants
199f578 Remove references to cfg(mutate) from lint allow - no longer allowed (AM) a65d1d8 docs: Update README to replace use of mutagen with cargo-mutants (AM) Pull request description: Hey there! I am just getting up to speed with the project and in following the README discovered that there are still references to the previous mutation testing tool `mutagen`. I updated the README to refer to the new tool, `cargo-mutation`. I'm suggesting the user use the same command, `cargo mutants --in-place --no-shuffle`, as is run in the weekly CI workflow. I noticed that there are still references to the old `mutate` attribute in the following files. I removed these as well as per [feedback](rust-bitcoin#4228 (comment)). `primitives/Cargo.toml`: ``` [lints.rust] unexpected_cfgs = { level = "deny", check-cfg = ['cfg(mutate)'] } ``` and `bitcoin/Cargo.toml`: ``` unexpected_cfgs = { level = "deny", check-cfg = ['cfg(bench)', 'cfg(fuzzing)', 'cfg(kani)', 'cfg(mutate)'] } ``` Update to PR: removed incorrect understanding of logic in PR description as per [feedback](rust-bitcoin#4228 (comment)) and removed `cfg(mutate)` from above 2 files. ACKs for top commit: tcharding: ACK 199f578 apoelstra: ACK 199f578; successfully ran local tests Tree-SHA512: e154c504aa5283f1da05d0120ea8dda97d1159389e692b0d57d7d864032ecb2b48c496054ede5500477367bc732dc34b0870f2709b8bd6e7b3f5c18a10f7a29e
2 parents 951a030 + 199f578 commit c23402c

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ alias build-docs='RUSTDOCFLAGS="--cfg docsrs" cargo +nightly rustdoc --features=
148148
Unit and integration tests are available for those interested, along with benchmarks. For project
149149
developers, especially new contributors looking for something to work on, we do:
150150

151-
- Fuzz testing with [`Hongfuzz`](https://github.com/rust-fuzz/honggfuzz-rs)
152-
- Mutation testing with [`Mutagen`](https://github.com/llogiq/mutagen)
151+
- Fuzz testing with [`Honggfuzz`](https://github.com/rust-fuzz/honggfuzz-rs)
152+
- Mutation testing with [`cargo-mutants`](https://github.com/sourcefrog/cargo-mutants)
153153
- Code verification with [`Kani`](https://github.com/model-checking/kani)
154154

155155
There are always more tests to write and more bugs to find, contributions to our testing efforts
@@ -167,9 +167,9 @@ bench marks use: `RUSTFLAGS='--cfg=bench' cargo +nightly bench`.
167167

168168
### Mutation tests
169169

170-
We have started doing mutation testing with [mutagen](https://github.com/llogiq/mutagen). To run
171-
these tests first install the latest dev version with `cargo +nightly install --git https://github.com/llogiq/mutagen`
172-
then run with `RUSTFLAGS='--cfg=mutate' cargo +nightly mutagen`.
170+
We are doing mutation testing with [cargo-mutants](https://github.com/sourcefrog/cargo-mutants). To run
171+
these tests first install with `cargo install --locked cargo-mutants` then run with `cargo mutants --in-place --no-shuffle`.
172+
Note that running these mutation tests will take on the order of 10's of minutes.
173173

174174
### Code verification
175175

bitcoin/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ name = "io"
9595
required-features = ["std"]
9696

9797
[lints.rust]
98-
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(bench)', 'cfg(fuzzing)', 'cfg(kani)', 'cfg(mutate)'] }
98+
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(bench)', 'cfg(fuzzing)', 'cfg(kani)'] }

primitives/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ bincode = "1.3.1"
3838
all-features = true
3939
rustdoc-args = ["--cfg", "docsrs"]
4040

41-
[lints.rust]
42-
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(mutate)'] }
43-
4441
[lints.clippy]
4542
# Exclude lints we don't think are valuable.
4643
needless_question_mark = "allow" # https://github.com/rust-bitcoin/rust-bitcoin/pull/2134

0 commit comments

Comments
 (0)