You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: developer.md
+31-19
Original file line number
Diff line number
Diff line change
@@ -4,49 +4,61 @@
4
4
5
5
### Running Tests
6
6
7
-
Tests can be found in the `tests` directory, with `FORK_CONFIG` set in `tests/tester.js`. There are test runners for [State tests](http://www.ethdocs.org/en/latest/contracts-and-transactions/ethereum-tests/state_tests/index.html) and [Blockchain tests](http://www.ethdocs.org/en/latest/contracts-and-transactions/ethereum-tests/blockchain_tests/index.html). VM tests are disabled since Frontier gas costs are not supported any more. Tests are then executed by the [ethereumjs-testing](https://github.com/ethereumjs/ethereumjs-testing) utility library using the official client-independent [Ethereum tests](https://github.com/ethereum/tests).
7
+
Tests can be found in the `tests` directory. There are test runners for [State tests](http://www.ethdocs.org/en/latest/contracts-and-transactions/ethereum-tests/state_tests/index.html) and [Blockchain tests](http://www.ethdocs.org/en/latest/contracts-and-transactions/ethereum-tests/blockchain_tests/index.html). VM tests are disabled since Frontier gas costs are not supported any more. Tests are then executed by the [ethereumjs-testing](https://github.com/ethereumjs/ethereumjs-testing) utility library using the official client-independent [Ethereum tests](https://github.com/ethereum/tests).
8
8
9
-
For a wider picture about how to use tests to implement EIPs you can have a look at this [reddit post](https://www.reddit.com/r/ethereum/comments/6kc5g3/ethereumjs_team_is_seeking_contributors/)
10
-
or the associated YouTube video introduction to [core development with Ethereumjs-vm](https://www.youtube.com/watch?v=L0BVDl6HZzk&feature=youtu.be).
9
+
For a wider picture about how to use tests to implement EIPs you can have a look at this [Reddit post](https://www.reddit.com/r/ethereum/comments/6kc5g3/ethereumjs_team_is_seeking_contributors/)
10
+
or the associated YouTube video introduction to [Core Development with Ethereumjs-vm](https://www.youtube.com/watch?v=L0BVDl6HZzk).
11
11
12
12
#### Running different Test Types
13
13
14
14
Running the State tests:
15
15
16
-
`node ./tests/tester -s`
16
+
`node ./tests/tester --state`
17
17
18
18
Running the Blockchain tests:
19
19
20
-
`node ./tests/tester -b`
20
+
`node ./tests/tester --blockchain`
21
21
22
-
State tests and Blockchain tests can also be run against the `dist`folder (default: `lib`):
22
+
Tests run against source by default. They can be run with the `--dist`flag:
23
23
24
-
`node ./tests/tester -b --dist`
24
+
`npm run build:dist && node ./tests/tester --state --dist`
25
+
26
+
See `package.json` for all the scripts in the `test:` namespace, such as `npm run test:state` which would execute the above.
to skip only the `BROKEN` and `PERMANENT` tests and include the `SLOW` tests.
78
90
There are also the keywords `NONE` or `ALL` for convenience.
79
91
80
92
It is also possible to only run the tests from the skip lists:
81
93
82
-
`node tests/tester -s --runSkipped=SLOW`
94
+
`node ./tests/tester --state --runSkipped=SLOW`
83
95
84
96
### CI Test Integration
85
97
86
-
Tests are run on [Actions](https://github.com/ethereumjs/ethereumjs-vm/actions) on every PR, configuration can be found in `.github/workflows`.
98
+
Tests and checks are run in CI using [Github Actions](https://github.com/ethereumjs/ethereumjs-vm/actions). The configuration can be found in `.github/workflows`.
87
99
88
100
### Debugging
89
101
@@ -93,7 +105,7 @@ For state tests you can use the `--jsontrace` flag to output opcode trace inform
93
105
94
106
Blockchain tests support `--debug` to verify the postState:
All/most State tests are replicated as Blockchain tests in a `GeneralStateTests`[sub directory](https://github.com/ethereum/tests/tree/develop/BlockchainTests/GeneralStateTests) in the Ethereum tests repo, so for debugging single test cases the Blockchain test version of the State test can be used.
99
111
@@ -125,8 +137,8 @@ An extremely rich and powerful toolbox is the [evmlab](https://github.com/holima
125
137
126
138
## Profiling
127
139
128
-
[Clinic](https://github.com/nearform/node-clinic)Allows profiling the VM in the node environment. It supports various profiling methods, among them is [flame](https://github.com/nearform/node-clinic-flame) which can be used for generating flamegraphs to highlight bottlenecks and hot paths. As an example, to generate a flamegraph for the VM blockchain tests, you can run:
140
+
[Clinic](https://github.com/nearform/node-clinic)allows profiling the VM in the node environment. It supports various profiling methods, among them is [flame](https://github.com/nearform/node-clinic-flame) which can be used for generating flamegraphs to highlight bottlenecks and hot paths. As an example, to generate a flamegraph for the VM blockchain tests, you can run:
0 commit comments