@@ -23,6 +23,7 @@ use ethjson;
2323use miner:: Miner ;
2424use io:: IoChannel ;
2525use test_helpers;
26+ use super :: SKIP_TEST_STATE ;
2627
2728use super :: HookType ;
2829
@@ -36,12 +37,20 @@ pub fn run_test_file<H: FnMut(&str, HookType)>(p: &Path, h: &mut H) {
3637 :: json_tests:: test_common:: run_test_file ( p, json_chain_test, h)
3738}
3839
40+ fn skip_test ( name : & String ) -> bool {
41+ SKIP_TEST_STATE . block . iter ( ) . any ( |block_test|block_test. subtests . contains ( name) )
42+ }
43+
3944pub fn json_chain_test < H : FnMut ( & str , HookType ) > ( json_data : & [ u8 ] , start_stop_hook : & mut H ) -> Vec < String > {
4045 :: ethcore_logger:: init_log ( ) ;
4146 let tests = ethjson:: blockchain:: Test :: load ( json_data) . unwrap ( ) ;
4247 let mut failed = Vec :: new ( ) ;
4348
4449 for ( name, blockchain) in tests. into_iter ( ) {
50+ if skip_test ( & name) {
51+ println ! ( " - {} | {:?} Ignoring tests because in skip list" , name, blockchain. network) ;
52+ continue ;
53+ }
4554 start_stop_hook ( & name, HookType :: OnStart ) ;
4655
4756 let mut fail = false ;
@@ -122,19 +131,24 @@ mod block_tests {
122131 declare_test ! { BlockchainTests_bcInvalidHeaderTest , "BlockchainTests/bcInvalidHeaderTest" }
123132 declare_test ! { BlockchainTests_bcMultiChainTest , "BlockchainTests/bcMultiChainTest" }
124133 declare_test ! { BlockchainTests_bcRandomBlockhashTest , "BlockchainTests/bcRandomBlockhashTest" }
134+ declare_test ! { BlockchainTests_bcStateTest , "BlockchainTests/bcStateTests" }
125135 declare_test ! { BlockchainTests_bcTotalDifficultyTest , "BlockchainTests/bcTotalDifficultyTest" }
126136 declare_test ! { BlockchainTests_bcUncleHeaderValidity , "BlockchainTests/bcUncleHeaderValidity" }
127137 declare_test ! { BlockchainTests_bcUncleTest , "BlockchainTests/bcUncleTest" }
128138 declare_test ! { BlockchainTests_bcValidBlockTest , "BlockchainTests/bcValidBlockTest" }
129139 declare_test ! { BlockchainTests_bcWalletTest , "BlockchainTests/bcWalletTest" }
130140
141+ declare_test ! { BlockchainTests_GeneralStateTest_stArgsZeroOneBalance , "BlockchainTests/GeneralStateTests/stArgsZeroOneBalance/" }
131142 declare_test ! { BlockchainTests_GeneralStateTest_stAttackTest , "BlockchainTests/GeneralStateTests/stAttackTest/" }
132143 declare_test ! { BlockchainTests_GeneralStateTest_stBadOpcodeTest , "BlockchainTests/GeneralStateTests/stBadOpcode/" }
144+ declare_test ! { BlockchainTests_GeneralStateTest_stBugsTest , "BlockchainTests/GeneralStateTests/stBugs/" }
133145 declare_test ! { BlockchainTests_GeneralStateTest_stCallCodes , "BlockchainTests/GeneralStateTests/stCallCodes/" }
146+ declare_test ! { BlockchainTests_GeneralStateTest_stCallCreateCallCodeTest , "BlockchainTests/GeneralStateTests/stCallCreateCallCodeTest/" }
134147 declare_test ! { BlockchainTests_GeneralStateTest_stCallDelegateCodesCallCodeHomestead , "BlockchainTests/GeneralStateTests/stCallDelegateCodesCallCodeHomestead/" }
135148 declare_test ! { BlockchainTests_GeneralStateTest_stCallDelegateCodesHomestead , "BlockchainTests/GeneralStateTests/stCallDelegateCodesHomestead/" }
136149 declare_test ! { BlockchainTests_GeneralStateTest_stChangedEIP150 , "BlockchainTests/GeneralStateTests/stChangedEIP150/" }
137150 declare_test ! { BlockchainTests_GeneralStateTest_stCodeSizeLimit , "BlockchainTests/GeneralStateTests/stCodeSizeLimit/" }
151+ declare_test ! { BlockchainTests_GeneralStateTest_stCreate2 , "BlockchainTests/GeneralStateTests/stCreate2/" }
138152 declare_test ! { BlockchainTests_GeneralStateTest_stCreateTest , "BlockchainTests/GeneralStateTests/stCreateTest/" }
139153 declare_test ! { BlockchainTests_GeneralStateTest_stDelegatecallTestHomestead , "BlockchainTests/GeneralStateTests/stDelegatecallTestHomestead/" }
140154 declare_test ! { BlockchainTests_GeneralStateTest_stEIP150singleCodeGasPrices , "BlockchainTests/GeneralStateTests/stEIP150singleCodeGasPrices/" }
@@ -149,12 +163,15 @@ mod block_tests {
149163 declare_test ! { BlockchainTests_GeneralStateTest_stMemoryTest , "BlockchainTests/GeneralStateTests/stMemoryTest/" }
150164 declare_test ! { BlockchainTests_GeneralStateTest_stNonZeroCallsTest , "BlockchainTests/GeneralStateTests/stNonZeroCallsTest/" }
151165 declare_test ! { BlockchainTests_GeneralStateTest_stPreCompiledContracts , "BlockchainTests/GeneralStateTests/stPreCompiledContracts/" }
166+ declare_test ! { BlockchainTests_GeneralStateTest_stPreCompiledContracts2 , "BlockchainTests/GeneralStateTests/stPreCompiledContracts2/" }
152167 declare_test ! { heavy => BlockchainTests_GeneralStateTest_stQuadraticComplexityTest , "BlockchainTests/GeneralStateTests/stQuadraticComplexityTest/" }
153168 declare_test ! { BlockchainTests_GeneralStateTest_stRandom , "BlockchainTests/GeneralStateTests/stRandom/" }
169+ declare_test ! { BlockchainTests_GeneralStateTest_stRandom2 , "BlockchainTests/GeneralStateTests/stRandom2/" }
154170 declare_test ! { BlockchainTests_GeneralStateTest_stRecursiveCreate , "BlockchainTests/GeneralStateTests/stRecursiveCreate/" }
155171 declare_test ! { BlockchainTests_GeneralStateTest_stRefundTest , "BlockchainTests/GeneralStateTests/stRefundTest/" }
156172 declare_test ! { BlockchainTests_GeneralStateTest_stReturnDataTest , "BlockchainTests/GeneralStateTests/stReturnDataTest/" }
157173 declare_test ! { BlockchainTests_GeneralStateTest_stRevertTest , "BlockchainTests/GeneralStateTests/stRevertTest/" }
174+ declare_test ! { BlockchainTests_GeneralStateTest_stShift , "BlockchainTests/GeneralStateTests/stShift/" }
158175 declare_test ! { BlockchainTests_GeneralStateTest_stSolidityTest , "BlockchainTests/GeneralStateTests/stSolidityTest/" }
159176 declare_test ! { BlockchainTests_GeneralStateTest_stSpecialTest , "BlockchainTests/GeneralStateTests/stSpecialTest/" }
160177 declare_test ! { BlockchainTests_GeneralStateTest_stStackTests , "BlockchainTests/GeneralStateTests/stStackTests/" }
@@ -166,6 +183,7 @@ mod block_tests {
166183 declare_test ! { BlockchainTests_GeneralStateTest_stZeroCallsRevert , "BlockchainTests/GeneralStateTests/stZeroCallsRevert/" }
167184 declare_test ! { BlockchainTests_GeneralStateTest_stZeroCallsTest , "BlockchainTests/GeneralStateTests/stZeroCallsTest/" }
168185 declare_test ! { BlockchainTests_GeneralStateTest_stZeroKnowledge , "BlockchainTests/GeneralStateTests/stZeroKnowledge/" }
186+ declare_test ! { BlockchainTests_GeneralStateTest_stZeroKnowledge2 , "BlockchainTests/GeneralStateTests/stZeroKnowledge2/" }
169187
170188 declare_test ! { BlockchainTests_TransitionTests_bcEIP158ToByzantium , "BlockchainTests/TransitionTests/bcEIP158ToByzantium/" }
171189 declare_test ! { BlockchainTests_TransitionTests_bcFrontierToHomestead , "BlockchainTests/TransitionTests/bcFrontierToHomestead/" }
0 commit comments