Commit 8a85b54
authored
feat(test-fill): enable phase-1-only pre-alloc generation (#2720)
* refactor(test-fill): allow phase-1-only pre-alloc generation
Re-order `FillCommand.create_executions` so that the execution plan
reflects the user's intent:
- `--use-pre-alloc-groups` now takes priority. The flag means pre-alloc
groups already exist on disk from a previous run, so even alongside
`--generate-all-formats` the run is single-phase.
- `--generate-pre-alloc-groups` without `--generate-all-formats` now
runs phase 1 only; don't continue to phase 2.
- `--generate-all-formats` continues to trigger the full two-phase
run.
Update `test_legacy_generate_pre_alloc_groups_still_works` to reflect
the new phase-1-only behaviour and add a test covering the
`--use-pre-alloc-groups` priority.
* test(test-fill): cover contradictory `--use-pre-alloc-groups` flag pairs
Add failing tests asserting that `FillCommand.create_executions` raises
`click.UsageError` when `--use-pre-alloc-groups` is combined with:
- `--generate-pre-alloc-groups`: the first asserts the groups already
exist on disk, the second regenerates them: contradictory intents.
- `--clean`: `--clean` wipes the output directory that holds the
pre-alloc groups the user is asserting exist.
Without a guard, `FillCommand.create_executions` silently returns a
single-phase plan and `FillingSession._load_pre_alloc_groups_from_folder`
then fails on a missing folder. Validation logic follows in the next
commit.
* fix(test-fill): reject contradictory `--use-pre-alloc-groups` flag pairs
Add `_validate_flag_combinations` to `FillCommand.create_executions`
so contradictory flag pairs fail fast with `click.UsageError` instead
of silently falling through to a broken single-phase execution.
Rejected combinations:
- `--use-pre-alloc-groups` + `--generate-pre-alloc-groups`: the first
asserts the groups already exist, the second regenerates them.
- `--use-pre-alloc-groups` + `--clean`: `--clean` wipes the output
directory that holds the pre-alloc groups.
`--use-pre-alloc-groups` + `--generate-all-formats` remains valid and
single-phase, per the intent stated in 116e5093e83.
* refactor(tooling): restore `bench-gas` two-phase fill
Swap `--generate-pre-alloc-groups` for `--generate-all-formats` in the
`bench-gas` recipe. After 116e5093e83, `--generate-pre-alloc-groups`
alone runs phase 1 only and produces no benchmark fixtures; the recipe
needs the full two-phase run to generate the `BlockchainEngineXFixture`
output it targets. Matches the flag used in `.github/configs/feature.yaml`.
* doc(test-fill): refresh pre-alloc flag docs
Update documentation to reflect the phase-1-only behaviour of
`--generate-pre-alloc-groups` introduced in 116e5093e83:
- Remove the "Alternative approach" note in
`filling_tests_command_line.md` that recommended
`--generate-pre-alloc-groups` as a single-command replacement for
`--generate-all-formats`: it now produces no fixtures.
- Reframe the `blockchain_test_engine_x.md` usage notes to describe
the two-invocation workflow (`--generate-pre-alloc-groups` then
`--use-pre-alloc-groups`) as the explicit alternative to the
single-command `--generate-all-formats` path.1 parent 739ecad commit 8a85b54
5 files changed
Lines changed: 136 additions & 61 deletions
File tree
- docs
- filling_tests
- running_tests/test_formats
- packages/testing/src/execution_testing/cli
- pytest_commands
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
| 223 | + | |
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | 110 | | |
119 | 111 | | |
120 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
Lines changed: 68 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
| 51 | + | |
45 | 52 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
63 | 111 | | |
64 | 112 | | |
65 | 113 | | |
| |||
68 | 116 | | |
69 | 117 | | |
70 | 118 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | 119 | | |
| 120 | + | |
78 | 121 | | |
79 | 122 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 123 | + | |
90 | 124 | | |
91 | 125 | | |
92 | 126 | | |
| |||
195 | 229 | | |
196 | 230 | | |
197 | 231 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | 232 | | |
206 | 233 | | |
207 | 234 | | |
| |||
Lines changed: 66 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| |||
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
79 | | - | |
80 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
81 | 88 | | |
82 | 89 | | |
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
86 | 93 | | |
87 | | - | |
| 94 | + | |
88 | 95 | | |
89 | | - | |
90 | 96 | | |
91 | 97 | | |
| 98 | + | |
| 99 | + | |
92 | 100 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
99 | 155 | | |
100 | 156 | | |
101 | 157 | | |
| |||
0 commit comments