Skip to content

Commit be310c6

Browse files
committed
fix(test-cli-fill): Use default evm-dump-dir for traces; gitignore it
1 parent 2a6f9ee commit be310c6

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ tests/t8n_testdata
7676

7777
fixtures/
7878

79+
# Trace output (generated by --traces flag)
80+
traces/
81+
7982
logs/
8083
*.log
8184

docs/filling_tests/debugging_t8n_tools.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ There are two flags that can help debugging `t8n` tools or the execution-spec-te
88

99
## EVM Dump Directory
1010

11-
The `--evm-dump-dir` flag tells the framework to write the inputs and outputs of every call made to the `t8n` command to the specified output directory. The aim is to help debugging or simply understand how a test is interacting with the EVM. Debug output is only generated when this flag is explicitly specified.
11+
The `--evm-dump-dir` flag tells the framework to write the inputs and outputs of every call made to the `t8n` command to the specified output directory. The aim is to help debugging or simply understand how a test is interacting with the EVM.
12+
When `--traces` is specified without an explicit `--evm-dump-dir`, a default directory of `traces/` is used.
1213

1314
Each test case receives its own sub-directory under the `--evm-dump-dir` that contains these files which can be easily accessed from the HTML test report generated by `fill` (located by default in the root of the `--output` directory).
1415

packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/filler.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,13 @@ def pytest_configure(config: pytest.Config) -> None:
723723
or config.getoption("optimize_gas", False)
724724
)
725725

726+
# set default for --evm-dump-dir
727+
if (
728+
config.collect_traces # type: ignore[attr-defined]
729+
and config.getoption("base_dump_dir")
730+
) is None:
731+
config.option.base_dump_dir = "traces"
732+
726733
# Instantiate the transition tool here to check that the binary path/trace
727734
# option is valid. This ensures we only raise an error once, if
728735
# appropriate, instead of for every test.

0 commit comments

Comments
 (0)