|
|
@@ -273,6 +273,8 @@ parser.add_argument('--rundir',
|
|
|
help="change to the directory before running tests")
|
|
|
parser.add_argument('--start-timeout', default=30, type=int,
|
|
|
help="default timeout for initial prompt")
|
|
|
+parser.add_argument('--start-fail-timeout', default=2, type=int,
|
|
|
+ help="default timeout for initial prompt (when expected to fail)")
|
|
|
parser.add_argument('--test-timeout', default=20, type=int,
|
|
|
help="default timeout for each individual test action")
|
|
|
parser.add_argument('--no-pty', action='store_true',
|
|
|
@@ -1230,7 +1232,7 @@ def test_assert_with_exception(form, wast_tempfile, wasm_tempfile, aot_tempfile,
|
|
|
if test_aot:
|
|
|
r = compile_wasm_to_aot(wasm_tempfile, aot_tempfile, True, opts, r)
|
|
|
try:
|
|
|
- assert_prompt(r, ['Compile success'], opts.start_timeout, True)
|
|
|
+ assert_prompt(r, ['Compile success'], opts.start_fail_timeout, True)
|
|
|
except:
|
|
|
_, exc, _ = sys.exc_info()
|
|
|
if (r.buf.find(expected) >= 0):
|
|
|
@@ -1251,7 +1253,7 @@ def test_assert_with_exception(form, wast_tempfile, wasm_tempfile, aot_tempfile,
|
|
|
if loadable:
|
|
|
# Wait for the initial prompt
|
|
|
try:
|
|
|
- assert_prompt(r, ['webassembly> '], opts.start_timeout, True)
|
|
|
+ assert_prompt(r, ['webassembly> '], opts.start_fail_timeout, True)
|
|
|
except:
|
|
|
_, exc, _ = sys.exc_info()
|
|
|
if (r.buf.find(expected) >= 0):
|
|
|
@@ -1331,7 +1333,7 @@ if __name__ == "__main__":
|
|
|
if test_aot:
|
|
|
r = compile_wasm_to_aot(wasm_tempfile, aot_tempfile, True, opts, r)
|
|
|
try:
|
|
|
- assert_prompt(r, ['Compile success'], opts.start_timeout, True)
|
|
|
+ assert_prompt(r, ['Compile success'], opts.start_fail_timeout, True)
|
|
|
except:
|
|
|
_, exc, _ = sys.exc_info()
|
|
|
if (r.buf.find(error_msg) >= 0):
|