-
Notifications
You must be signed in to change notification settings - Fork 782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to test a custom state test #202
Conversation
tests/GeneralStateTestsRunner.js
Outdated
@@ -72,6 +72,7 @@ function runTestCase (testData, t, cb) { | |||
} | |||
|
|||
module.exports = function runStateTest (options, testData, t, cb) { | |||
debugger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this some new ES* magic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since testState
is being run with node inspect
this acts as a breakpoint for the debugger.
688fbf7
to
97558a8
Compare
I've now looked 2-3 times over this PR and I still have difficulties to get the essence of it respectively grab what the PR wants to achieve. Can you come up with a practical example? Is this something different that can be achieved with either the new |
97558a8
to
2269a7f
Compare
Yes. This is necessary for fuzz testing and for doing trace equivalence testing. Even with the current CLI options, in order to run a state test, it has to be located under the tests file tree. |
Sorry, I'm not really getting it, can' you just make a directory |
2269a7f
to
4a76abd
Compare
Can you give a short comment on my last question? |
I changed the command line argument name to 'customStateTest'. We could potentially do what you are suggesting. But IMO it would be easier to have a separate command line option to directly pass the test to tester.js. The alternative would be to modify this code to move the state test file to the correct location (as opposed to passing it via cli argument): I'll see if I can do some modifications to get it working in this manner. |
9ec6821
to
ff1f674
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I updated this with switching back to the master branch ethereumjs-testing
version and updated the README to use the latest parameter naming.
This PR adds the ability to test against custom-generated state tests. The argument
--customStateTest
is used to specify the relative path of a file containing a custom test.This PR is necessary for implementing trace equivalence testing and fuzz testing with EthereumjsVM.
Depends on changes in https://github.com/ethereumjs/ethereumjs-testing/tree/test-from-source