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],
|
||||
cwd=tempdir,
|
||||
env=env)
|
||||
proc.run()
|
||||
timeout = 300
|
||||
proc.processOutput(timeout=timeout)
|
||||
if proc.timedOut:
|
||||
log.testFail("%s | timed out after %d seconds",
|
||||
basename, timeout)
|
||||
return False
|
||||
proc.waitForFinish(timeout=timeout)
|
||||
#TODO: After bug 811320 is fixed, don't let .run() kill the process,
|
||||
# instead use a timeout in .wait() and then kill to get a stack.
|
||||
proc.run(timeout=timeout)
|
||||
proc.wait()
|
||||
if proc.timedOut:
|
||||
log.testFail("%s | timed out after %d seconds",
|
||||
basename, timeout)
|
||||
|
||||
Reference in New Issue
Block a user