diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2015-09-03 16:13:42 +0200 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2015-09-04 00:06:17 +0200 |
commit | e1293bbfb1fa1fdeb56446a7b957d6f628042e71 (patch) | |
tree | 39d874bd11c690a126174382ddfa39bfbd2cb488 /testsuite | |
parent | b639c977fda47dd0088b0cf1c970018f032188a2 (diff) | |
download | haskell-e1293bbfb1fa1fdeb56446a7b957d6f628042e71.tar.gz |
Testsuite: only print msg when timeout kills process unexpectedly
Differential Revision: https://phabricator.haskell.org/D1207
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/driver/testlib.py | 4 | ||||
-rw-r--r-- | testsuite/timeout/timeout.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 5a587a7264..ee6f631cbe 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -1798,6 +1798,10 @@ def rawSystemWithTimeout(cmd_and_args): if r == 98: # The python timeout program uses 98 to signal that ^C was pressed stopNow() + if r == 99 and getTestOpts().exit_code != 99: + # Only print a message when timeout killed the process unexpectedly. + cmd = cmd_and_args[-1] + if_verbose(1, 'Timeout happened...killed process "{}"...\n'.format(cmd)) return r # cmd is a complex command in Bourne-shell syntax diff --git a/testsuite/timeout/timeout.py b/testsuite/timeout/timeout.py index 1016e2db33..51fb63c179 100644 --- a/testsuite/timeout/timeout.py +++ b/testsuite/timeout/timeout.py @@ -35,8 +35,6 @@ try: else: # parent def handler(signum, frame): - msg = 'Timeout happened...killing process %s...\n' % cmd - sys.stderr.write(msg) killProcess(pid) sys.exit(99) old = signal.signal(signal.SIGALRM, handler) |