Skip to content
Snippets Groups Projects
Commit 31fdb04c authored by Simon Heimberg's avatar Simon Heimberg
Browse files

run-tests: only call WIFEXITED on systems it exists

not on Windows or in jython
parent ce07defe
No related branches found
No related tags found
No related merge requests found
......@@ -580,6 +580,7 @@
return exitcode, postout
wifexited = getattr(os, "WIFEXITED", lambda x: False)
def run(cmd, options, replacements):
"""Run command in a sub-process, capturing the output (stdout and stderr).
Return a tuple (exitcode, output). output is None in debug mode."""
......@@ -611,7 +612,7 @@
proc.tochild.close()
output = proc.fromchild.read()
ret = proc.wait()
if os.WIFEXITED(ret):
if wifexited(ret):
ret = os.WEXITSTATUS(ret)
except Timeout:
vlog('# Process %d timed out - killing it' % proc.pid)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment