##// END OF EJS Templates
run-tests: only call WIFEXITED on systems it exists...
Simon Heimberg -
r13348:31fdb04c default
parent child Browse files
Show More
@@ -580,6 +580,7 b' def tsttest(test, options, replacements)'
580
580
581 return exitcode, postout
581 return exitcode, postout
582
582
583 wifexited = getattr(os, "WIFEXITED", lambda x: False)
583 def run(cmd, options, replacements):
584 def run(cmd, options, replacements):
584 """Run command in a sub-process, capturing the output (stdout and stderr).
585 """Run command in a sub-process, capturing the output (stdout and stderr).
585 Return a tuple (exitcode, output). output is None in debug mode."""
586 Return a tuple (exitcode, output). output is None in debug mode."""
@@ -611,7 +612,7 b' def run(cmd, options, replacements):'
611 proc.tochild.close()
612 proc.tochild.close()
612 output = proc.fromchild.read()
613 output = proc.fromchild.read()
613 ret = proc.wait()
614 ret = proc.wait()
614 if os.WIFEXITED(ret):
615 if wifexited(ret):
615 ret = os.WEXITSTATUS(ret)
616 ret = os.WEXITSTATUS(ret)
616 except Timeout:
617 except Timeout:
617 vlog('# Process %d timed out - killing it' % proc.pid)
618 vlog('# Process %d timed out - killing it' % proc.pid)
General Comments 0
You need to be logged in to leave comments. Login now