Skip to content

Commit

Permalink
Failing list of tests for Web3 (#585)
Browse files Browse the repository at this point in the history
* Makefile, tests/failing.web3: use failing list to figure out failing tests

* tests/failing.web3: populate failing list

* Makefile, tests/failing.web3: allow running failing web3 tests too

* tests/web3: remove explicit failing directory

* tests/web3: format failing test expected output
  • Loading branch information
ehildenb authored and rv-jenkins committed Dec 2, 2019
1 parent 16ac53f commit 2cc646c
Show file tree
Hide file tree
Showing 21 changed files with 247 additions and 12 deletions.
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export LUA_PATH
split-tests \
test test-all test-conformance test-rest-conformance test-all-conformance \
test-vm test-rest-vm test-all-vm test-bchain test-rest-bchain test-all-bchain \
test-web3 \
test-web3 test-all-web3 test-failing-web3 \
test-prove test-prove-benchmarks test-prove-functional test-prove-opcodes test-prove-erc20 test-prove-bihu test-prove-examples test-klab-prove \
test-parse test-failure \
test-interactive test-interactive-help test-interactive-run test-interactive-prove test-interactive-search test-interactive-firefly \
Expand Down Expand Up @@ -471,10 +471,13 @@ test-all-bchain: $(all_bchain_tests:=.run)
test-rest-bchain: $(rest_bchain_tests:=.run)
test-bchain: $(passing_bchain_tests:=.run)

web3_tests=$(wildcard tests/web3/*.in.json) \
$(wildcard tests/web3/no-shutdown/*.in.json)
all_web3_tests = $(wildcard tests/web3/*.in.json) $(wildcard tests/web3/*/*.in.json)
failing_web3_tests = $(shell cat tests/failing.web3)
passing_web3_tests = $(filter-out $(failing_web3_tests), $(all_web3_tests))

test-web3: $(web3_tests:.in.json=.run-web3)
test-all-web3: $(all_web3_tests:.in.json=.run-web3)
test-failing-web3: $(failing_web3_tests:.in.json=.run-web3)
test-web3: $(passing_web3_tests:.in.json=.run-web3)

# Proof Tests

Expand Down
13 changes: 13 additions & 0 deletions tests/failing.web3
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
tests/web3/erc20/erc20capped.in.json
tests/web3/erc20/erc20capped-partial.in.json
tests/web3/erc20/erc20detailed.in.json
tests/web3/erc20/erc20detailed-partial.in.json
tests/web3/erc20/tokentimelock.in.json
tests/web3/erc20/tokentimelock-partial.in.json
tests/web3/eth_getBlockByNumber1Tx-2.in.json
tests/web3/eth_getBlockByNumberNoTx-2.in.json
tests/web3/eth_getTransactionReceipt.in.json
tests/web3/getBlock_multipleAccounts.in.json
tests/web3/getBlock_multipleTransactions.in.json
tests/web3/getBlock_singleAccount.in.json
tests/web3/getBlock_singleTransaction.in.json
33 changes: 33 additions & 0 deletions tests/web3/eth_getTransactionReceipt.expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[
{
"jsonrpc": "2.0",
"id": 1,
"result": true
},
{
"jsonrpc": "2.0",
"id": 2,
"result": "0x48b3bce222588aff4329c7c7aebaa39ffb66045254c1ca16b9b1a5482463682b"
},
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"transactionHash": "0x48b3bce222588aff4329c7c7aebaa39ffb66045254c1ca16b9b1a5482463682b",
"transactionIndex": "0x0",
"blockHash": "0xef122182b5260879e82a5495c5dbe57ebcf6f8b2cb8b6cf50dbfc96a1d39b776",
"blockNumber": "0x1",
"from": "0x79a59cf0083efdf696befda81655104787f938d0",
"to": null,
"gasUsed": "0xeaca",
"cumulativeGasUsed": "0xeaca",
"contractAddress": "0xe7f1941dc335305fc2799b72417243dc3f375179",
"logs": [],
"status": "0x1",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"v": "0x1b",
"r": "0xb6b98a3170b0ad5db2792d2314aa3435b8bdbb26c35d495a2aab893113904a41",
"s": "0x5bade5f3b478a7986d8933911866c324a1e5fb7839207c6cc631dead3f88063b"
}
}
]
1 change: 0 additions & 1 deletion tests/web3/failing/eth_getTransactionReceipt.expected.json

This file was deleted.

1 change: 0 additions & 1 deletion tests/web3/failing/getBlock_multipleAccounts.expected.json

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion tests/web3/failing/getBlock_singleAccount.expected.json

This file was deleted.

This file was deleted.

38 changes: 38 additions & 0 deletions tests/web3/getBlock_multipleAccounts.expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[
{
"jsonrpc": "2.0",
"id": 1,
"result": true
},
{
"jsonrpc": "2.0",
"id": 2,
"result": true
},
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"number": "0x0",
"hash": "0xa16e3b7ec1959f20a3fec6fb9c1b891fb3b5b95e4d1c7d91d77531b4a7d53be1",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"stateRoot": "0x8d914a687f983939880cfccb33737d490fbdb01256b1e053f93c93aa0463cf4c",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"miner": "0x0000000000000000000000000000000000000000",
"difficulty": "0x0",
"totalDifficulty": "0x0",
"extraData": "0x",
"size": "0x3e8",
"gasLimit": "0x6691b7",
"gasUsed": "0x0",
"timestamp": "0x0",
"transactions": [],
"uncles": []
}
}
]
78 changes: 78 additions & 0 deletions tests/web3/getBlock_multipleTransactions.expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[
{
"jsonrpc": "2.0",
"id": 1,
"result": true
},
{
"jsonrpc": "2.0",
"id": 2,
"result": true
},
{
"jsonrpc": "2.0",
"id": 3,
"result": "0xf4156d1e150a8d92070ac848fe10a6a994e7eb94184286e735e7437a011c63d7"
},
{
"jsonrpc": "2.0",
"id": 4,
"result": "0x2c5e04b53a8a4ad2c02d4541f23459a0381c60a73a96cdfd07a0d2c343911b34"
},
{
"jsonrpc": "2.0",
"id": 5,
"result": {
"number": "0x1",
"hash": "0x49bfc1db5249c2cae6f4939ff48f3729d210c7223a5306c7c41de12a4e0bdfd9",
"parentHash": "0xa16e3b7ec1959f20a3fec6fb9c1b891fb3b5b95e4d1c7d91d77531b4a7d53be1",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"transactionsRoot": "0x5ce4c8c27ecb3784bfcd8e128b01c3e6c90c0264d579d9f7232f53421c6e3109",
"stateRoot": "0x45fb450be0f9542426acf1a81c513ae9d1a2226d4b3ab7afe88f566ab2dcdd6b",
"receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2",
"miner": "0x0000000000000000000000000000000000000000",
"difficulty": "0x0",
"totalDifficulty": "0x0",
"extraData": "0x",
"size": "0x3e8",
"gasLimit": "0x6691b7",
"gasUsed": "0x5208",
"timestamp": "0x0",
"transactions": [
"0xf4156d1e150a8d92070ac848fe10a6a994e7eb94184286e735e7437a011c63d7"
],
"uncles": []
}
},
{
"jsonrpc": "2.0",
"id": 6,
"result": {
"number": "0x2",
"hash": "0x3b3a770d25ae5cdc930895a48a2c9b9b335cb2423fea3557b1128833ac087bb2",
"parentHash": "0x49bfc1db5249c2cae6f4939ff48f3729d210c7223a5306c7c41de12a4e0bdfd9",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"transactionsRoot": "0x44feb4e2e7d6a976b56b7d8c6a180e2585ebd67c63d526c9b77c6c5795af3cb2",
"stateRoot": "0x3f310a0070d7ff288bb2345cf86fbaa3538cfec53a12a273e58bd842779c8714",
"receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2",
"miner": "0x0000000000000000000000000000000000000000",
"difficulty": "0x0",
"totalDifficulty": "0x0",
"extraData": "0x",
"size": "0x3e8",
"gasLimit": "0x6691b7",
"gasUsed": "0x5208",
"timestamp": "0x0",
"transactions": [
"0x2c5e04b53a8a4ad2c02d4541f23459a0381c60a73a96cdfd07a0d2c343911b34"
],
"uncles": []
}
}
]
Loading

0 comments on commit 2cc646c

Please sign in to comment.