diff options
author | Ben Smith <binji@chromium.org> | 2020-01-28 09:55:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-28 09:55:14 -0800 |
commit | 4966aa99dceb8851c1135393f520b879096c16fc (patch) | |
tree | e62630a3f2c4648386889fb40b38bf6806257190 /test/run-tests.py | |
parent | c74e612ff9d95d6afd1bbfb6d9656655aa6d70ed (diff) | |
download | wabt-4966aa99dceb8851c1135393f520b879096c16fc.tar.gz wabt-4966aa99dceb8851c1135393f520b879096c16fc.tar.bz2 wabt-4966aa99dceb8851c1135393f520b879096c16fc.zip |
Increase timeout; fix bug when a timeout occurs (#1320)
Diffstat (limited to 'test/run-tests.py')
-rwxr-xr-x | test/run-tests.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/run-tests.py b/test/run-tests.py index 89094d9c..9df51e26 100755 --- a/test/run-tests.py +++ b/test/run-tests.py @@ -36,7 +36,7 @@ IS_WINDOWS = sys.platform == 'win32' TEST_DIR = os.path.dirname(os.path.abspath(__file__)) REPO_ROOT_DIR = os.path.dirname(TEST_DIR) OUT_DIR = os.path.join(REPO_ROOT_DIR, 'out') -DEFAULT_TIMEOUT = 10 # seconds +DEFAULT_TIMEOUT = 120 # seconds SLOW_TIMEOUT_MULTIPLIER = 3 @@ -299,7 +299,7 @@ class Command(object): process = None timer.cancel() if is_timeout.Get(): - raise Error('TIMEOUT\nSTDOUT:\n%s\nSTDERR:\n%s\n' % (stdout, stderr)) + raise Error('TIMEOUT') duration = time.time() - start_time except OSError as e: raise Error(str(e)) @@ -979,8 +979,13 @@ def main(args): if status.failed: sys.stderr.write('**** FAILED %s\n' % ('*' * (80 - 14))) for info, result in status.failed_tests: - last_cmd = result.GetLastCommand() if result is not None else '' - sys.stderr.write('- %s\n %s\n' % (info.GetName(), last_cmd)) + if isinstance(result, TestResult): + msg = result.GetLastCommand() + elif isinstance(result, Error): + msg = result + else: + msg = '' + sys.stderr.write('- %s\n %s\n' % (info.GetName(), msg)) ret = 1 return ret |