bug 811370 - runcppunittests doesn't handle hangs gracefully. r=ahal
This commit is contained in:
@@ -35,14 +35,11 @@ def run_one_test(prog, env, symbols_path=None):
|
|||||||
proc = mozprocess.ProcessHandler([prog],
|
proc = mozprocess.ProcessHandler([prog],
|
||||||
cwd=tempdir,
|
cwd=tempdir,
|
||||||
env=env)
|
env=env)
|
||||||
proc.run()
|
|
||||||
timeout = 300
|
timeout = 300
|
||||||
proc.processOutput(timeout=timeout)
|
#TODO: After bug 811320 is fixed, don't let .run() kill the process,
|
||||||
if proc.timedOut:
|
# instead use a timeout in .wait() and then kill to get a stack.
|
||||||
log.testFail("%s | timed out after %d seconds",
|
proc.run(timeout=timeout)
|
||||||
basename, timeout)
|
proc.wait()
|
||||||
return False
|
|
||||||
proc.waitForFinish(timeout=timeout)
|
|
||||||
if proc.timedOut:
|
if proc.timedOut:
|
||||||
log.testFail("%s | timed out after %d seconds",
|
log.testFail("%s | timed out after %d seconds",
|
||||||
basename, timeout)
|
basename, timeout)
|
||||||
|
|||||||
Reference in New Issue
Block a user