Skip to content

Commit

Permalink
Add testStateEwasm and testBlockchainEwasm cmds
Browse files Browse the repository at this point in the history
Signed-off-by: Sina Mahmoodi <[email protected]>
  • Loading branch information
s1na committed Jan 30, 2019
1 parent 3a143c0 commit 43013a2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
"testBlockchain": "npm run build:dist && node --stack-size=1500 ./tests/tester -b --fork='Constantinople' --dist --excludeDir='GeneralStateTests'",
"testBlockchainGeneralStateTests": "npm run build:dist && node --stack-size=1500 ./tests/tester -b --dist --dir='GeneralStateTests'",
"testAPI": "tape ./tests/api/*.js",
"testStateEwasm": "npm run build:dist && node ./tests/tester -s --fork='Byzantium' --dist --ewasm",
"testBlockchainEwasm": "npm run build:dist && node --stack-size=1500 ./tests/tester -b --dist --ewasm --excludeDir='GeneralStateTests'",
"test": "node ./tests/tester -a",
"lint": "standard",
"prepublishOnly": "npm run lint && npm run build:dist && npm run testBuildIntegrity",
"build:dist": "babel lib/ -d dist/",
"build:dist": "babel lib/ -d dist/ --copy-files",
"build:docs": "documentation build ./lib/index.js ./lib/runBlockchain.js ./lib/runBlock.js ./lib/runTx.js ./lib/runCode.js ./lib/runCall.js --format md --shallow > ./docs/index.md",
"formatTest": "node ./scripts/formatTest"
},
Expand Down Expand Up @@ -79,6 +81,9 @@
"ignore": [
"dist/**",
"examples/runcode-browserify.js"
],
"globals": [
"WebAssembly"
]
}
}
3 changes: 2 additions & 1 deletion tests/BlockchainTestsRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ module.exports = function runBlockchainTest (options, testData, t, cb) {
var vm = new VM({
state: state,
blockchain: blockchain,
hardfork: options.forkConfig.toLowerCase()
hardfork: options.forkConfig.toLowerCase(),
enableEwasm: options.enableEwasm
})
var genesisBlock = new Block({ hardfork: options.forkConfig.toLowerCase() })

Expand Down
3 changes: 2 additions & 1 deletion tests/GeneralStateTestsRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ function runTestCase (options, testData, t, cb) {
}
vm = new VM({
state: state,
hardfork: options.forkConfig.toLowerCase()
hardfork: options.forkConfig.toLowerCase(),
enableEwasm: options.enableEwasm
})
testUtil.setupPreConditions(state, testData, done)
},
Expand Down
2 changes: 2 additions & 0 deletions tests/tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ function runTests (name, runnerArgs, cb) {
runnerArgs.gasLimit = argv.gas
runnerArgs.value = argv.value

runnerArgs.enableEwasm = argv.ewasm

// runnerArgs.vmtrace = true; // for VMTests

if (argv.customStateTest) {
Expand Down

0 comments on commit 43013a2

Please sign in to comment.