bug 825511 - use outputTimeout for runcppunittests.py. r=ahal
authorTed Mielczarek <ted@mielczarek.org>
Thu, 03 Jan 2013 18:50:22 -0500
changeset 129021 d5b9cb99e14167036278fbf05d8ec915682b33ff
parent 129020 bc9d2b47cda82c3ac852a3bdf255276a187e7948
child 129022 152d3caaf16ad50e300263860003960383df3e0e
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs825511
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 825511 - use outputTimeout for runcppunittests.py. r=ahal
content/svg/content/src/DOMSVGPoint.cpp
testing/runcppunittests.py
--- a/testing/runcppunittests.py
+++ b/testing/runcppunittests.py
@@ -15,17 +15,19 @@ log = mozlog.getLogger('cppunittests')
 @contextmanager
 def TemporaryDirectory():
     tempdir = tempfile.mkdtemp()
     yield tempdir
     shutil.rmtree(tempdir)
 
 class CPPUnitTests(object):
     # Time (seconds) to wait for test process to complete
-    TEST_PROC_TIMEOUT = 300
+    TEST_PROC_TIMEOUT = 1200
+    # Time (seconds) in which process will be killed if it produces no output.
+    TEST_PROC_NO_OUTPUT_TIMEOUT = 300
 
     def run_one_test(self, prog, env, symbols_path=None):
         """
         Run a single C++ unit test program.
 
         Arguments:
         * prog: The path to the test program to run.
         * env: The environment to use for running the program.
@@ -37,17 +39,18 @@ class CPPUnitTests(object):
         basename = os.path.basename(prog)
         log.info("Running test %s", basename)
         with TemporaryDirectory() as tempdir:
             proc = mozprocess.ProcessHandler([prog],
                                              cwd=tempdir,
                                              env=env)
             #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=CPPUnitTests.TEST_PROC_TIMEOUT)
+            proc.run(timeout=CPPUnitTests.TEST_PROC_TIMEOUT,
+                     outputTimeout=CPPUnitTests.TEST_PROC_NO_OUTPUT_TIMEOUT)
             proc.wait()
             if proc.timedOut:
                 log.testFail("%s | timed out after %d seconds",
                              basename, CPPUnitTests.TEST_PROC_TIMEOUT)
                 return False
             if mozcrash.check_for_crashes(tempdir, symbols_path,
                                           test_name=basename):
                 log.testFail("%s | test crashed", basename)