Skip to content

Commit

Permalink
Update test options, add rerun (#1232)
Browse files Browse the repository at this point in the history
  • Loading branch information
grandizzy authored Jul 5, 2024
1 parent ca80294 commit f74f285
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 18 deletions.
22 changes: 16 additions & 6 deletions src/reference/cli/forge/coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,16 @@ Test options:
--fuzz-input-file <FUZZ_INPUT_FILE>
File to rerun fuzz failures from

--max-threads <MAX_THREADS>
-j, --threads <THREADS>
Max concurrent threads to use. Default value is the number of available CPUs

[aliases: jobs]

--show-progress
Show test execution progress

Display options:
-j, --json
--json
Output test results in JSON format

-l, --list
Expand Down Expand Up @@ -123,6 +128,14 @@ Test filtering:

[aliases: nmp]

--no-match-coverage <REGEX>
Only show coverage for files that do not match the specified regex pattern

[aliases: nmco]

--rerun
Re-run recorded test failures from last run. If no failure recorded then regular test run is performed

EVM options:
-f, --fork-url <URL>
Fetch state over a remote endpoint instead of starting from an empty state.
Expand Down Expand Up @@ -400,7 +413,4 @@ Watch options:
suffix may be more convenient.

When using --poll mode, you'll want a larger duration, or risk overloading disk I/O.
--show-progress
Show test execution progress
```
```
22 changes: 16 additions & 6 deletions src/reference/cli/forge/snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,16 @@ Test options:
--fuzz-input-file <FUZZ_INPUT_FILE>
File to rerun fuzz failures from

--max-threads <MAX_THREADS>
-j, --threads <THREADS>
Max concurrent threads to use. Default value is the number of available CPUs

[aliases: jobs]

--show-progress
Show test execution progress

Display options:
-j, --json
--json
Output test results in JSON format

-l, --list
Expand Down Expand Up @@ -121,6 +126,14 @@ Test filtering:

[aliases: nmp]

--no-match-coverage <REGEX>
Only show coverage for files that do not match the specified regex pattern

[aliases: nmco]

--rerun
Re-run recorded test failures from last run. If no failure recorded then regular test run is performed

EVM options:
-f, --fork-url <URL>
Fetch state over a remote endpoint instead of starting from an empty state.
Expand Down Expand Up @@ -399,9 +412,6 @@ Watch options:

When using --poll mode, you'll want a larger duration, or risk overloading disk I/O.
--show-progress
Show test execution progress
--asc
Sort results by gas used (ascending)
Expand All @@ -413,4 +423,4 @@ Watch options:
--max <MAX_GAS>
Only include tests that used less gas that the given amount
```
```
22 changes: 16 additions & 6 deletions src/reference/cli/forge/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,16 @@ Test options:
--fuzz-input-file <FUZZ_INPUT_FILE>
File to rerun fuzz failures from

--max-threads <MAX_THREADS>
-j, --threads <THREADS>
Max concurrent threads to use. Default value is the number of available CPUs

[aliases: jobs]

--show-progress
Show test execution progress

Display options:
-j, --json
--json
Output test results in JSON format

-l, --list
Expand Down Expand Up @@ -101,6 +106,14 @@ Test filtering:

[aliases: nmp]

--no-match-coverage <REGEX>
Only show coverage for files that do not match the specified regex pattern

[aliases: nmco]

--rerun
Re-run recorded test failures from last run. If no failure recorded then regular test run is performed

EVM options:
-f, --fork-url <URL>
Fetch state over a remote endpoint instead of starting from an empty state.
Expand Down Expand Up @@ -378,7 +391,4 @@ Watch options:
suffix may be more convenient.

When using --poll mode, you'll want a larger duration, or risk overloading disk I/O.
--show-progress
Show test execution progress
```
```
4 changes: 4 additions & 0 deletions src/static/config.default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ rpc_endpoints = { optimism = "https://optimism.alchemyapi.io/v2/...", mainnet =
#path_pattern = None
# Only run tests in source files that do not match the specified glob pattern
#path_pattern_inverse = None
# Number of threads to use. Not set or zero specifies the number of logical cores.
#threads = 0
# Whether to show test execution progress
#show_progress = false
# Pins the block number for the state fork
#fork_block_number = None
# The block gas limit
Expand Down

0 comments on commit f74f285

Please sign in to comment.