Bug 1437529: --verify shudown node h2 server for phase2 r=gbrown draft
authorPatrick McManus <mcmanus@ducksong.com>
Mon, 12 Feb 2018 09:57:48 -0500
changeset 753845 d9a2a23b42effea1807ac524616f4a93150fbf1e
parent 753815 3ee38289dac8838fe848f7234d75f3cef5d3dbc7
push id98694
push userbmo:mcmanus@ducksong.com
push dateMon, 12 Feb 2018 14:58:06 +0000
reviewersgbrown
bugs1437529
milestone60.0a1
Bug 1437529: --verify shudown node h2 server for phase2 r=gbrown MozReview-Commit-ID: BwSgugC1k7A
testing/xpcshell/runxpcshelltests.py
--- a/testing/xpcshell/runxpcshelltests.py
+++ b/testing/xpcshell/runxpcshelltests.py
@@ -1363,16 +1363,17 @@ class XPCShellTests(object):
                     usingTSan=usingTSan, mobileArgs=mobileArgs, **kwargs)
                 if 'run-sequentially' in test_object or self.sequential:
                     sequential_tests.append(test)
                 else:
                     tests_queue.append(test)
 
             status = self.runTestList(tests_queue, sequential_tests, testClass,
                                       mobileArgs, **kwargs)
+            self.shutdownNode()
         else:
             #
             # Test verification: Run each test many times, in various configurations,
             # in hopes of finding intermittent failures.
             #
 
             def step1():
                 # Run tests sequentially. Parallel mode would also work, except that
@@ -1432,16 +1433,17 @@ class XPCShellTests(object):
                 self.log.info(':::')
                 self.log.info('::: Test verification summary for: %s' % test_object['path'])
                 self.log.info(':::')
                 for descr in sorted(stepResults.keys()):
                     self.log.info('::: %s : %s' % (descr, stepResults[descr]))
                 self.log.info(':::')
                 self.log.info('::: Test verification %s' % finalResult)
                 self.log.info(':::')
+                self.shutdownNode()
 
         return status
 
     def runTestList(self, tests_queue, sequential_tests, testClass,
                     mobileArgs, **kwargs):
 
         if self.sequential:
             self.log.info("Running tests sequentially.")
@@ -1542,17 +1544,16 @@ class XPCShellTests(object):
                 exceptions.append(test.exception)
                 tracebacks.append(test.traceback)
                 break
             keep_going = test.keep_going
 
         # restore default SIGINT behaviour
         signal.signal(signal.SIGINT, signal.SIG_DFL)
 
-        self.shutdownNode()
         # Clean up any slacker directories that might be lying around
         # Some might fail because of windows taking too long to unlock them.
         # We don't do anything if this fails because the test slaves will have
         # their $TEMP dirs cleaned up on reboot anyway.
         for directory in self.cleanup_dir_list:
             try:
                 shutil.rmtree(directory)
             except Exception: