Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
e1293bbf
Commit
e1293bbf
authored
Sep 03, 2015
by
Thomas Miedema
Browse files
Testsuite: only print msg when timeout kills process unexpectedly
Differential Revision:
https://phabricator.haskell.org/D1207
parent
b639c977
Changes
2
Hide whitespace changes
Inline
Side-by-side
testsuite/driver/testlib.py
View file @
e1293bbf
...
...
@@ -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
...
...
testsuite/timeout/timeout.py
View file @
e1293bbf
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment