@@ -273,6 +273,8 @@ def assert_prompt(runner, prompts, timeout, is_need_execute_result):
273273 help = "change to the directory before running tests" )
274274parser .add_argument ('--start-timeout' , default = 30 , type = int ,
275275 help = "default timeout for initial prompt" )
276+ parser .add_argument ('--start-fail-timeout' , default = 2 , type = int ,
277+ help = "default timeout for initial prompt (when expected to fail)" )
276278parser .add_argument ('--test-timeout' , default = 20 , type = int ,
277279 help = "default timeout for each individual test action" )
278280parser .add_argument ('--no-pty' , action = 'store_true' ,
@@ -1230,7 +1232,7 @@ def test_assert_with_exception(form, wast_tempfile, wasm_tempfile, aot_tempfile,
12301232 if test_aot :
12311233 r = compile_wasm_to_aot (wasm_tempfile , aot_tempfile , True , opts , r )
12321234 try :
1233- assert_prompt (r , ['Compile success' ], opts .start_timeout , True )
1235+ assert_prompt (r , ['Compile success' ], opts .start_fail_timeout , True )
12341236 except :
12351237 _ , exc , _ = sys .exc_info ()
12361238 if (r .buf .find (expected ) >= 0 ):
@@ -1251,7 +1253,7 @@ def test_assert_with_exception(form, wast_tempfile, wasm_tempfile, aot_tempfile,
12511253 if loadable :
12521254 # Wait for the initial prompt
12531255 try :
1254- assert_prompt (r , ['webassembly> ' ], opts .start_timeout , True )
1256+ assert_prompt (r , ['webassembly> ' ], opts .start_fail_timeout , True )
12551257 except :
12561258 _ , exc , _ = sys .exc_info ()
12571259 if (r .buf .find (expected ) >= 0 ):
@@ -1331,7 +1333,7 @@ def test_assert_with_exception(form, wast_tempfile, wasm_tempfile, aot_tempfile,
13311333 if test_aot :
13321334 r = compile_wasm_to_aot (wasm_tempfile , aot_tempfile , True , opts , r )
13331335 try :
1334- assert_prompt (r , ['Compile success' ], opts .start_timeout , True )
1336+ assert_prompt (r , ['Compile success' ], opts .start_fail_timeout , True )
13351337 except :
13361338 _ , exc , _ = sys .exc_info ()
13371339 if (r .buf .find (error_msg ) >= 0 ):
0 commit comments