Skip to content

Commit 5cc974e

Browse files
committed
adjust the code blocks with line breaks for readability
1 parent f129669 commit 5cc974e

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

contrib/tools/local-mutation-testing.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ run_mutants() {
6464

6565
if [ "$mutant_count" -gt "$threshold" ]; then
6666
echo "Running mutants for $package ($mutant_count mutants)"
67-
RUST_BACKTRACE=1 BITCOIND_TEST=1 cargo mutants --timeout-multiplier 1.5 --no-shuffle -vV \
67+
RUST_BACKTRACE=1 BITCOIND_TEST=1 \
68+
cargo mutants --timeout-multiplier 1.5 --no-shuffle -vV \
6869
-F "$regex_pattern" \
6970
-E ": replace .{1,2} with .{1,2} in " \
7071
--output "$output_dir" \

docs/mutation-testing.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ cargo install --version 24.7.1 cargo-mutants --locked
6868
```sh
6969
regex_pattern=$(sed 's/[][()\.^$*+?{}|]/\\&/g' "mutants_by_package/stackslib.txt" | paste -sd'|' -)
7070
71+
RUST_BACKTRACE=1 BITCOIND_TEST=1 \
7172
cargo mutants --timeout-multiplier 1.5 --no-shuffle -vV \
7273
-F "$regex_pattern" \
7374
-E ": replace .{1,2} with .{1,2} in " \
@@ -79,6 +80,7 @@ cargo install --version 24.7.1 cargo-mutants --locked
7980
```sh
8081
regex_pattern=$(sed 's/[][()\.^$*+?{}|]/\\&/g' "mutants_by_package/testnet.txt" | paste -sd'|' -)
8182
83+
RUST_BACKTRACE=1 BITCOIND_TEST=1 \
8284
cargo mutants --timeout-multiplier 1.5 --no-shuffle -vV \
8385
-F "$regex_pattern" \
8486
-E ": replace .{1,2} with .{1,2} in " \
@@ -90,6 +92,7 @@ cargo install --version 24.7.1 cargo-mutants --locked
9092
```sh
9193
regex_pattern=$(sed 's/[][()\.^$*+?{}|]/\\&/g' "mutants_by_package/stacks-signer.txt" | paste -sd'|' -)
9294
95+
RUST_BACKTRACE=1 BITCOIND_TEST=1 \
9396
cargo mutants --timeout-multiplier 1.5 --no-shuffle -vV \
9497
-F "$regex_pattern" \
9598
-E ": replace .{1,2} with .{1,2} in " \
@@ -118,10 +121,26 @@ MISSED stacks-signer/src/runloop.rs:424:9: replace <impl SignerRunLoop for Run
118121
119122
Example of fix for it
120123
```sh
121-
RUST_BACKTRACE=1 BITCOIND_TEST=1 cargo mutants -vV -F "replace process_stackerdb_event" -E ": replace <impl SignerRunLoop for RunLoop<Signer, T>>::run_one_pass -> Option<Vec<SignerResult>> with None in " --test-tool=nextest -- --run-ignored all --fail-fast --test-threads 1
124+
RUST_BACKTRACE=1 BITCOIND_TEST=1 \
125+
cargo mutants -vV \
126+
-F "replace process_stackerdb_event" \
127+
-E ": replace <impl SignerRunLoop for RunLoop<Signer, T>>::run_one_pass -> Option<Vec<SignerResult>> with None in " \
128+
--test-tool=nextest \
129+
-- \
130+
--run-ignored all \
131+
--fail-fast \
132+
--test-threads 1
122133
```
123134
124135
General command to run
125136
```sh
126-
RUST_BACKTRACE=1 BITCOIND_TEST=1 cargo mutants -vV -F "replace process_stackerdb_event" -E ": replace [modify this] with [modify this] in " --test-tool=nextest -- --run-ignored all --fail-fast --test-threads 1
137+
RUST_BACKTRACE=1 BITCOIND_TEST=1 \
138+
cargo mutants -vV \
139+
-F "replace process_stackerdb_event" \
140+
-E ": replace [modify this] with [modify this] in " \
141+
--test-tool=nextest \
142+
-- \
143+
--run-ignored all \
144+
--fail-fast \
145+
--test-threads 1
127146
```

0 commit comments

Comments
 (0)