Skip to content

Commit f732d22

Browse files
committed
rm bugged force flag from initial mutation test run
1 parent 33acbc8 commit f732d22

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

docs/src/tools/Mutator.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ You can provide flags to `forge` as part of the `--test-cmd` parameter or target
1212

1313
`slither-mutate src/core/MyContract.sol --test-cmd='forge test --match-contract="MyContract"'`
1414

15+
If a `timout` flag is not provided, slither-mutate will default to using a value that's double the runtime of it's initial test cmd execution. Make sure you run `forge clean` or similar beforehand to ensure cache usage doesn't cause a timeout that's too short to be used; this could lead to false-negatives.
16+
1517
### CLI Interface
1618

1719
```shell
@@ -30,7 +32,7 @@ options:
3032
--test-dir TEST_DIR Tests directory
3133
--ignore-dirs IGNORE_DIRS
3234
Directories to ignore
33-
--timeout TIMEOUT Set timeout for test command (by default 30 seconds)
35+
--timeout TIMEOUT Set timeout for test command (by default 2x the initial test runtime)
3436
--output-dir OUTPUT_DIR
3537
Name of output directory (by default 'mutation_campaign')
3638
-v, --verbose log mutants that are caught, uncaught, and fail to compile

slither/tools/mutator/utils/testing_generated_mutant.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ def run_test_cmd(
4040
elif "hardhat test" in cmd or "truffle test" in cmd and "--bail" not in cmd:
4141
cmd += " --bail"
4242

43-
if timeout is None and "hardhat" not in cmd: # hardhat doesn't support --force flag on tests
44-
# if no timeout, ensure all contracts are recompiled w/out using any cache
45-
cmd += " --force"
46-
4743
try:
4844
result = subprocess.run(
4945
cmd,

0 commit comments

Comments
 (0)