|
36 | 36 | BASE_FIXTURE_PATH = os.path.join(ROOT_PROJECT_DIR, 'fixtures', 'BlockchainTests')
|
37 | 37 |
|
38 | 38 |
|
39 |
| -# These are the slowest 50 tests from the full statetest run. This list should |
40 |
| -# be regenerated occasionally using `--durations 50`. |
| 39 | +# These are the slowest tests from the full blockchain test run. This list |
| 40 | +# should be regenerated occasionally using `--durations 100`. |
41 | 41 | SLOWEST_TESTS = {
|
42 |
| - ('GeneralStateTests/stStaticCall/static_Call50000_sha256', 'static_Call50000_sha256'), |
43 |
| - ('GeneralStateTests/stStaticCall/static_Call50000_rip160', 'static_Call50000_rip160'), |
44 |
| - ('GeneralStateTests/stStaticCall/static_Call50000_sha256', 'static_Call50000_sha256'), |
45 |
| - ('GeneralStateTests/stStaticCall/static_Call50000', 'static_Call50000'), |
46 |
| - ('GeneralStateTests/stStaticCall/static_Call50000_ecrec', 'static_Call50000_ecrec'), |
47 |
| - ('GeneralStateTests/stStaticCall/static_Call50000_rip160', 'static_Call50000_rip160'), |
48 |
| - ('GeneralStateTests/stStaticCall/static_LoopCallsThenRevert', 'static_LoopCallsThenRevert'), |
49 |
| - ('GeneralStateTests/stStaticCall/static_Call50000_identity2', 'static_Call50000_identity2'), |
50 |
| - ('GeneralStateTests/stStaticCall/static_Call50000_identity', 'static_Call50000_identity'), |
51 |
| - ('GeneralStateTests/stStaticCall/static_Return50000_2', 'static_Return50000_2'), |
52 |
| - ('GeneralStateTests/stCallCreateCallCodeTest/Call1024PreCalls', 'Call1024PreCalls'), |
53 |
| - ('GeneralStateTests/stChangedEIP150/Call1024PreCalls', 'Call1024PreCalls'), |
54 |
| - ('GeneralStateTests/stDelegatecallTestHomestead/Call1024PreCalls', 'Call1024PreCalls'), |
55 |
| - ('GeneralStateTests/stStaticCall/static_Call50000', 'static_Call50000'), |
56 |
| - ('GeneralStateTests/stStaticCall/static_Call50000_ecrec', 'static_Call50000_ecrec'), |
57 |
| - ('GeneralStateTests/stStaticCall/static_Call1024PreCalls2', 'static_Call1024PreCalls2'), |
58 |
| - ('GeneralStateTests/stStaticCall/static_Call50000_identity', 'static_Call50000_identity'), |
59 |
| - ('GeneralStateTests/stStaticCall/static_Call50000_identity2', 'static_Call50000_identity2'), |
60 |
| - ('GeneralStateTests/stStaticCall/static_LoopCallsThenRevert', 'static_LoopCallsThenRevert'), |
61 |
| - ('GeneralStateTests/stCallCreateCallCodeTest/Call1024BalanceTooLow', 'Call1024BalanceTooLow'), # noqa: E501 |
62 |
| - ('GeneralStateTests/stChangedEIP150/Call1024BalanceTooLow', 'Call1024BalanceTooLow'), |
63 |
| - ('GeneralStateTests/stCallCreateCallCodeTest/Callcode1024BalanceTooLow', 'Callcode1024BalanceTooLow'), # noqa: E501 |
64 |
| - ('GeneralStateTests/stChangedEIP150/Callcode1024BalanceTooLow', 'Callcode1024BalanceTooLow'), # noqa: E501 |
65 |
| - ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb0_OOG_atMaxCallDepth', 'CallRecursiveBomb0_OOG_atMaxCallDepth'), # noqa: E501 |
66 |
| - ('GeneralStateTests/stRevertTest/LoopCallsDepthThenRevert2', 'LoopCallsDepthThenRevert2'), |
67 |
| - ('GeneralStateTests/stRevertTest/LoopCallsDepthThenRevert3', 'LoopCallsDepthThenRevert3'), |
68 |
| - ('GeneralStateTests/stDelegatecallTestHomestead/CallRecursiveBombPreCall', 'CallRecursiveBombPreCall'), # noqa: E501 |
69 |
| - ('GeneralStateTests/stRevertTest/LoopCallsThenRevert', 'LoopCallsThenRevert'), |
70 |
| - ('GeneralStateTests/stCallCreateCallCodeTest/CallRecursiveBombPreCall', 'CallRecursiveBombPreCall'), # noqa: E501 |
71 |
| - ('GeneralStateTests/stStaticCall/static_Call50000bytesContract50_1', 'static_Call50000bytesContract50_1'), # noqa: E501 |
72 |
| - ('GeneralStateTests/stStaticCall/static_Call1024PreCalls', 'static_Call1024PreCalls'), |
73 |
| - ('GeneralStateTests/stDelegatecallTestHomestead/Call1024BalanceTooLow', 'Call1024BalanceTooLow'), # noqa: E501 |
74 |
| - ('GeneralStateTests/stDelegatecallTestHomestead/Delegatecall1024', 'Delegatecall1024'), |
75 |
| - ('GeneralStateTests/stRevertTest/LoopCallsThenRevert', 'LoopCallsThenRevert'), |
76 |
| - ('GeneralStateTests/stStaticCall/static_Call50000bytesContract50_2', 'static_Call50000bytesContract50_2'), # noqa: E501 |
77 |
| - ('GeneralStateTests/stStaticCall/static_Call1024PreCalls2', 'static_Call1024PreCalls2'), |
78 |
| - ('GeneralStateTests/stRandom/randomStatetest636', 'randomStatetest636'), |
79 |
| - ('GeneralStateTests/stStaticCall/static_Call1024PreCalls3', 'static_Call1024PreCalls3'), |
80 |
| - ('GeneralStateTests/stRandom/randomStatetest467', 'randomStatetest467'), |
81 |
| - ('GeneralStateTests/stRandom/randomStatetest458', 'randomStatetest458'), |
82 |
| - ('GeneralStateTests/stRandom/randomStatetest150', 'randomStatetest150'), |
83 |
| - ('GeneralStateTests/stRandom/randomStatetest639', 'randomStatetest639'), |
84 |
| - ('GeneralStateTests/stStaticCall/static_LoopCallsDepthThenRevert2', 'static_LoopCallsDepthThenRevert2'), # noqa: E501 |
85 |
| - ('GeneralStateTests/stRandom/randomStatetest154', 'randomStatetest154'), |
86 |
| - ('GeneralStateTests/stRecursiveCreate/recursiveCreateReturnValue', 'recursiveCreateReturnValue'), # noqa: E501 |
87 |
| - ('GeneralStateTests/stStaticCall/static_LoopCallsDepthThenRevert3', 'static_LoopCallsDepthThenRevert3'), # noqa: E501 |
88 |
| - ('GeneralStateTests/stSystemOperationsTest/ABAcalls1', 'ABAcalls1'), |
89 |
| - ('GeneralStateTests/stSpecialTest/failed_tx_xcf416c53', 'failed_tx_xcf416c53'), |
90 |
| - ('GeneralStateTests/stRandom/randomStatetest159', 'randomStatetest159'), |
91 |
| - ('GeneralStateTests/stRandom/randomStatetest554', 'randomStatetest554'), |
| 42 | + ('GeneralStateTests/stStaticCall/static_Call50000_sha256_d0g0v0.json', 'static_Call50000_sha256_d0g0v0_Byzantium'), # noqa: E501 |
| 43 | + ('GeneralStateTests/stStaticCall/static_Call50000_sha256_d1g0v0.json', 'static_Call50000_sha256_d1g0v0_Byzantium'), # noqa: E501 |
| 44 | + ('GeneralStateTests/stStaticCall/static_Call50000_rip160_d0g0v0.json', 'static_Call50000_rip160_d0g0v0_Byzantium'), # noqa: E501 |
| 45 | + ('GeneralStateTests/stStaticCall/static_Call50000_d1g0v0.json', 'static_Call50000_d1g0v0_Byzantium'), # noqa: E501 |
| 46 | + ('GeneralStateTests/stStaticCall/static_Call50000_ecrec_d1g0v0.json', 'static_Call50000_ecrec_d1g0v0_Byzantium'), # noqa: E501 |
| 47 | + ('GeneralStateTests/stStaticCall/static_Call50000_rip160_d1g0v0.json', 'static_Call50000_rip160_d1g0v0_Byzantium'), # noqa: E501 |
| 48 | + ('GeneralStateTests/stStaticCall/static_Call50000_identity2_d1g0v0.json', 'static_Call50000_identity2_d1g0v0_Byzantium'), # noqa: E501 |
| 49 | + ('GeneralStateTests/stStaticCall/static_Call50000_identity_d1g0v0.json', 'static_Call50000_identity_d1g0v0_Byzantium'), # noqa: E501 |
| 50 | + ('GeneralStateTests/stStaticCall/static_Return50000_2_d0g0v0.json', 'static_Return50000_2_d0g0v0_Byzantium'), # noqa: E501 |
| 51 | + ('GeneralStateTests/stStaticCall/static_Call50000_d0g0v0.json', 'static_Call50000_d0g0v0_Byzantium'), # noqa: E501 |
| 52 | + ('GeneralStateTests/stStaticCall/static_Call50000bytesContract50_1_d1g0v0.json', 'static_Call50000bytesContract50_1_d1g0v0_Byzantium'), # noqa: E501 |
| 53 | + ('GeneralStateTests/stStaticCall/static_Call50000bytesContract50_2_d1g0v0.json', 'static_Call50000bytesContract50_2_d1g0v0_Byzantium'), # noqa: E501 |
| 54 | + ('GeneralStateTests/stChangedEIP150/Call1024PreCalls_d0g0v0.json', 'Call1024PreCalls_d0g0v0_Byzantium'), # noqa: E501 |
| 55 | + ('GeneralStateTests/stChangedEIP150/Call1024PreCalls_d0g0v0.json', 'Call1024PreCalls_d0g0v0_EIP150'), # noqa: E501 |
| 56 | + ('GeneralStateTests/stDelegatecallTestHomestead/Call1024PreCalls_d0g0v0.json', 'Call1024PreCalls_d0g0v0_Byzantium'), # noqa: E501 |
| 57 | + ('GeneralStateTests/stStaticCall/static_Call50000_ecrec_d0g0v0.json', 'static_Call50000_ecrec_d0g0v0_Byzantium'), # noqa: E501 |
| 58 | + ('GeneralStateTests/stAttackTest/ContractCreationSpam_d0g0v0.json', 'ContractCreationSpam_d0g0v0_Frontier'), # noqa: E501 |
| 59 | + ('GeneralStateTests/stAttackTest/ContractCreationSpam_d0g0v0.json', 'ContractCreationSpam_d0g0v0_Homestead'), # noqa: E501 |
| 60 | + ('GeneralStateTests/stCallCreateCallCodeTest/Call1024PreCalls_d0g0v0.json', 'Call1024PreCalls_d0g0v0_Byzantium'), # noqa: E501 |
| 61 | + ('GeneralStateTests/stStaticCall/static_Call1024PreCalls2_d0g0v0.json', 'static_Call1024PreCalls2_d0g0v0_Byzantium'), # noqa: E501 |
| 62 | + ('GeneralStateTests/stStaticCall/static_Call50000_identity2_d0g0v0.json', 'static_Call50000_identity2_d0g0v0_Byzantium'), # noqa: E501 |
| 63 | + ('GeneralStateTests/stStaticCall/static_Call50000_identity_d0g0v0.json', 'static_Call50000_identity_d0g0v0_Byzantium'), # noqa: E501 |
| 64 | + ('GeneralStateTests/stRecursiveCreate/recursiveCreateReturnValue_d0g0v0.json', 'recursiveCreateReturnValue_d0g0v0_Homestead'), # noqa: E501 |
| 65 | + ('GeneralStateTests/stStaticCall/static_LoopCallsThenRevert_d0g0v0.json', 'static_LoopCallsThenRevert_d0g0v0_Byzantium'), # noqa: E501 |
| 66 | + ('GeneralStateTests/stCallCreateCallCodeTest/Callcode1024OOG_d0g0v0.json', 'Callcode1024OOG_d0g0v0_Frontier'), # noqa: E501 |
| 67 | + ('GeneralStateTests/stStaticCall/static_LoopCallsThenRevert_d0g1v0.json', 'static_LoopCallsThenRevert_d0g1v0_Byzantium'), # noqa: E501 |
| 68 | + ('GeneralStateTests/stStaticCall/static_Call1024PreCalls3_d1g0v0.json', 'static_Call1024PreCalls3_d1g0v0_Byzantium'), # noqa: E501 |
| 69 | + ('GeneralStateTests/stStaticCall/static_Call1024PreCalls_d1g0v0.json', 'static_Call1024PreCalls_d1g0v0_Byzantium'), # noqa: E501 |
| 70 | + ('GeneralStateTests/stStaticCall/static_Call1024PreCalls2_d1g0v0.json', 'static_Call1024PreCalls2_d1g0v0_Byzantium'), # noqa: E501 |
| 71 | + ('GeneralStateTests/stDelegatecallTestHomestead/Delegatecall1024OOG_d0g0v0.json', 'Delegatecall1024OOG_d0g0v0_Homestead'), # noqa: E501 |
| 72 | + ('GeneralStateTests/stChangedEIP150/Call1024BalanceTooLow_d0g0v0.json', 'Call1024BalanceTooLow_d0g0v0_Byzantium'), # noqa: E501 |
| 73 | + ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBombLog_d0g0v0.json', 'CallRecursiveBombLog_d0g0v0_Frontier'), # noqa: E501 |
| 74 | + ('GeneralStateTests/stChangedEIP150/Callcode1024BalanceTooLow_d0g0v0.json', 'Callcode1024BalanceTooLow_d0g0v0_Byzantium'), # noqa: E501 |
| 75 | + ('bcForkStressTest/ForkStressTest.json', 'ForkStressTest_Frontier'), # noqa: E501 |
| 76 | + ('bcForkStressTest/ForkStressTest.json', 'ForkStressTest_Byzantium'), # noqa: E501 |
| 77 | + ('GeneralStateTests/stCallCreateCallCodeTest/Call1024OOG_d0g0v0.json', 'Call1024OOG_d0g0v0_Frontier'), # noqa: E501 |
| 78 | + ('GeneralStateTests/stDelegatecallTestHomestead/Call1024OOG_d0g0v0.json', 'Call1024OOG_d0g0v0_Homestead'), # noqa: E501 |
| 79 | + ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0.json', 'CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0_Homestead'), # noqa: E501 |
| 80 | + ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBombLog_d0g0v0.json', 'CallRecursiveBombLog_d0g0v0_Homestead'), # noqa: E501 |
| 81 | + ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb1_d0g0v0.json', 'CallRecursiveBomb1_d0g0v0_Frontier'), # noqa: E501 |
| 82 | + ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBombLog2_d0g0v0.json', 'CallRecursiveBombLog2_d0g0v0_Homestead'), # noqa: E501 |
| 83 | + ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0.json', 'CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0_Frontier'), # noqa: E501 |
| 84 | + ('GeneralStateTests/stCallCreateCallCodeTest/Call1024BalanceTooLow_d0g0v0.json', 'Call1024BalanceTooLow_d0g0v0_Byzantium'), # noqa: E501 |
| 85 | + ('GeneralStateTests/stChangedEIP150/Call1024BalanceTooLow_d0g0v0.json', 'Call1024BalanceTooLow_d0g0v0_EIP150'), # noqa: E501 |
| 86 | + ('bcForkStressTest/ForkStressTest.json', 'ForkStressTest_EIP150'), # noqa: E501 |
| 87 | + ('GeneralStateTests/stDelegatecallTestHomestead/CallRecursiveBombPreCall_d0g0v0.json', 'CallRecursiveBombPreCall_d0g0v0_Byzantium'), # noqa: E501 |
| 88 | + ('GeneralStateTests/stChangedEIP150/Callcode1024BalanceTooLow_d0g0v0.json', 'Callcode1024BalanceTooLow_d0g0v0_EIP150'), # noqa: E501 |
| 89 | + ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb1_d0g0v0.json', 'CallRecursiveBomb1_d0g0v0_Homestead'), # noqa: E501 |
| 90 | + ('GeneralStateTests/stDelegatecallTestHomestead/CallRecursiveBombPreCall_d0g0v0.json', 'CallRecursiveBombPreCall_d0g0v0_Homestead'), # noqa: E501 |
| 91 | + ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb2_d0g0v0.json', 'CallRecursiveBomb2_d0g0v0_Homestead'), # noqa: E501 |
| 92 | + ('GeneralStateTests/stCallCreateCallCodeTest/Callcode1024BalanceTooLow_d0g0v0.json', 'Callcode1024BalanceTooLow_d0g0v0_Byzantium'), # noqa: E501 |
| 93 | + ('GeneralStateTests/stSystemOperationsTest/ABAcalls2_d0g0v0.json', 'ABAcalls2_d0g0v0_Frontier'), # noqa: E501 |
| 94 | + ('GeneralStateTests/stDelegatecallTestHomestead/Delegatecall1024_d0g0v0.json', 'Delegatecall1024_d0g0v0_Byzantium'), # noqa: E501 |
| 95 | + ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBombLog2_d0g0v0.json', 'CallRecursiveBombLog2_d0g0v0_Frontier'), # noqa: E501 |
| 96 | + ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb2_d0g0v0.json', 'CallRecursiveBomb2_d0g0v0_Frontier'), # noqa: E501 |
| 97 | + ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0.json', 'CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0_EIP150'), # noqa: E501 |
| 98 | + ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb0_d0g0v0.json', 'CallRecursiveBomb0_d0g0v0_Frontier'), # noqa: E501 |
| 99 | + ('GeneralStateTests/stDelegatecallTestHomestead/Call1024BalanceTooLow_d0g0v0.json', 'Call1024BalanceTooLow_d0g0v0_Byzantium'), # noqa: E501 |
| 100 | + ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb0_d0g0v0.json', 'CallRecursiveBomb0_d0g0v0_Homestead'), # noqa: E501 |
| 101 | + ('GeneralStateTests/stStaticCall/static_Call50000bytesContract50_1_d0g0v0.json', 'static_Call50000bytesContract50_1_d0g0v0_Byzantium'), # noqa: E501 |
| 102 | + ('GeneralStateTests/stDelegatecallTestHomestead/Delegatecall1024_d0g0v0.json', 'Delegatecall1024_d0g0v0_EIP150'), # noqa: E501 |
| 103 | + ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0.json', 'CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0_Byzantium'), # noqa: E501 |
| 104 | + ('GeneralStateTests/stCallCreateCallCodeTest/CallRecursiveBombPreCall_d0g0v0.json', 'CallRecursiveBombPreCall_d0g0v0_Byzantium'), # noqa: E501 |
| 105 | + ('GeneralStateTests/stSystemOperationsTest/ABAcalls1_d0g0v0.json', 'ABAcalls1_d0g0v0_Frontier'), # noqa: E501 |
| 106 | + ('GeneralStateTests/stCallCreateCallCodeTest/CallRecursiveBombPreCall_d0g0v0.json', 'CallRecursiveBombPreCall_d0g0v0_Frontier'), # noqa: E501 |
| 107 | + ('GeneralStateTests/stStaticCall/static_Call1MB1024Calldepth_d1g0v0.json', 'static_Call1MB1024Calldepth_d1g0v0_Byzantium'), # noqa: E501 |
| 108 | + ('GeneralStateTests/stRevertTest/LoopCallsDepthThenRevert2_d0g0v0.json', 'LoopCallsDepthThenRevert2_d0g0v0_Byzantium'), # noqa: E501 |
| 109 | + ('GeneralStateTests/stSystemOperationsTest/ABAcalls2_d0g0v0.json', 'ABAcalls2_d0g0v0_Homestead'), # noqa: E501 |
| 110 | + ('GeneralStateTests/stStaticCall/static_Call50000bytesContract50_2_d0g0v0.json', 'static_Call50000bytesContract50_2_d0g0v0_Byzantium'), # noqa: E501 |
| 111 | + ('GeneralStateTests/stRevertTest/LoopCallsDepthThenRevert2_d0g0v0.json', 'LoopCallsDepthThenRevert2_d0g0v0_EIP158'), # noqa: E501 |
| 112 | + ('GeneralStateTests/stRevertTest/LoopCallsDepthThenRevert3_d0g0v0.json', 'LoopCallsDepthThenRevert3_d0g0v0_EIP158'), # noqa: E501 |
| 113 | + ('GeneralStateTests/stRevertTest/LoopCallsDepthThenRevert3_d0g0v0.json', 'LoopCallsDepthThenRevert3_d0g0v0_Byzantium'), # noqa: E501 |
92 | 114 | }
|
93 | 115 |
|
94 | 116 |
|
|
107 | 129 |
|
108 | 130 |
|
109 | 131 | def blockchain_fixture_mark_fn(fixture_path, fixture_name, fixture_fork):
|
110 |
| - |
111 |
| - # XXX Very ugly, not mergable |
112 |
| - def strip_path(path): |
113 |
| - ''' |
114 |
| - >>> strip_path('static_Call50000_d0g0v0.json') |
115 |
| - 'static_Call50000' |
116 |
| - ''' |
117 |
| - assert path.endswith('.json') |
118 |
| - stripped_path = path[:-5] |
119 |
| - return '_'.join(stripped_path.split('_')[:-1]) |
120 |
| - |
121 |
| - stripped_path = strip_path(fixture_path) |
122 |
| - stripped_name = '_'.join(fixture_name.split('_')[:-2]) |
123 |
| - # XXX End very ugly part |
| 132 | + fixture_id = (fixture_path, fixture_name) |
124 | 133 |
|
125 | 134 | if fixture_path.startswith('bcExploitTest'):
|
126 | 135 | return pytest.mark.skip("Exploit tests are slow")
|
127 | 136 | elif fixture_path == 'bcWalletTest/walletReorganizeOwners.json':
|
128 | 137 | return pytest.mark.skip("Wallet owner reorganization tests are slow")
|
129 |
| - elif (fixture_path, fixture_name) in INCORRECT_UPSTREAM_TESTS: |
| 138 | + elif fixture_id in INCORRECT_UPSTREAM_TESTS: |
130 | 139 | return pytest.mark.xfail(reason="Listed in INCORRECT_UPSTREAM_TESTS.")
|
131 | 140 | elif 'stTransactionTest/zeroSigTransa' in fixture_path:
|
132 | 141 | return pytest.mark.skip("EIP-86 not supported.")
|
133 |
| - elif (stripped_path, stripped_name) in SLOWEST_TESTS: |
| 142 | + elif fixture_id in SLOWEST_TESTS: |
134 | 143 | if should_run_slow_tests():
|
135 | 144 | return
|
136 | 145 | else:
|
|
0 commit comments