Bug 1550515 - [mochitest] Don't 'keep_open' a single mochitest when using --headless, r=gbrown
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Thu, 09 May 2019 19:07:57 +0000
changeset 532204 2c96c7bf4e62b336e4472851d979134cabde2e53
parent 532203 8deb4484f31c1427f92dd7bec741ff11197299c2
child 532205 def8a63f903864f52bc014572cc00f8e9cb7d0c2
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgbrown
bugs1550515
milestone68.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 1550515 - [mochitest] Don't 'keep_open' a single mochitest when using --headless, r=gbrown Differential Revision: https://phabricator.services.mozilla.com/D30536
testing/mochitest/mach_commands.py
--- a/testing/mochitest/mach_commands.py
+++ b/testing/mochitest/mach_commands.py
@@ -135,18 +135,20 @@ class MochitestRunner(MozbuildObject):
             manifest = TestManifest()
             manifest.tests.extend(tests)
             options.manifestFile = manifest
 
             # When developing mochitest-plain tests, it's often useful to be able to
             # refresh the page to pick up modifications. Therefore leave the browser
             # open if only running a single mochitest-plain test. This behaviour can
             # be overridden by passing in --keep-open=false.
-            flavor = getattr(options, 'flavor', 'plain')
-            if len(tests) == 1 and options.keep_open is None and flavor == 'plain':
+            if (len(tests) == 1
+                    and options.keep_open is None
+                    and not options.headless
+                    and getattr(options, 'flavor', 'plain') == 'plain'):
                 options.keep_open = True
 
         # We need this to enable colorization of output.
         self.log_manager.enable_unstructured()
         result = mochitest.run_test_harness(parser, options)
         self.log_manager.disable_unstructured()
         return result