Bug 1547983 - [mochitest] Fix running a single mochitest-plain-clipboard/gpu test locally, r=jmaher
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Tue, 30 Apr 2019 21:09:16 +0000
changeset 472038 c9e6b400a1e05bc10f892a9970b4b5e2c7dff282
parent 472037 a6f52fa08b8a788d149f3e2604dffada83190241
child 472039 e57ad617753ce19fba838960cd4aae3b7635c4e1
push id84426
push userahalberstadt@mozilla.com
push dateTue, 30 Apr 2019 21:10:47 +0000
treeherderautoland@c9e6b400a1e0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1547983, 1546100
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 1547983 - [mochitest] Fix running a single mochitest-plain-clipboard/gpu test locally, r=jmaher This was a regression from bug 1546100. Differential Revision: https://phabricator.services.mozilla.com/D29390
testing/mochitest/mach_commands.py
testing/mozbase/moztest/moztest/resolve.py
--- a/testing/mochitest/mach_commands.py
+++ b/testing/mochitest/mach_commands.py
@@ -135,17 +135,18 @@ 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.
-            if len(tests) == 1 and options.keep_open is None and options.flavor == 'plain':
+            flavor = getattr(options, 'flavor', 'plain')
+            if len(tests) == 1 and options.keep_open is None and flavor == '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
 
--- a/testing/mozbase/moztest/moztest/resolve.py
+++ b/testing/mozbase/moztest/moztest/resolve.py
@@ -140,24 +140,24 @@ TEST_SUITES = {
         'mach_command': 'mochitest',
         'kwargs': {'flavor': 'plain', 'test_paths': None},
         'task_regex': ['mochitest(?!-a11y|-browser|-chrome|-clip|-devtools|-gpu|-harness|-media|-screen|-webgl)($|.*(-1|[^0-9])$)',  # noqa
                        'test-verify($|.*(-1|[^0-9])$)'],
     },
     'mochitest-plain-clipboard': {
         'aliases': ('cl', 'clipboard',),
         'mach_command': 'mochitest',
-        'kwargs': {'subsuite': 'clipboard', 'test_paths': None},
+        'kwargs': {'flavor': 'plain', 'subsuite': 'clipboard', 'test_paths': None},
         'task_regex': ['mochitest-clipboard($|.*(-1|[^0-9])$)',
                        'test-verify($|.*(-1|[^0-9])$)'],
     },
     'mochitest-plain-gpu': {
         'aliases': ('gpu',),
         'mach_command': 'mochitest',
-        'kwargs': {'subsuite': 'gpu', 'test_paths': None},
+        'kwargs': {'flavor': 'plain', 'subsuite': 'gpu', 'test_paths': None},
         'task_regex': ['mochitest-gpu($|.*(-1|[^0-9])$)',
                        'test-verify($|.*(-1|[^0-9])$)'],
     },
     'mochitest-webgl1-core': WebglSuite('webgl1-core'),
     'mochitest-webgl1-ext': WebglSuite('webgl1-ext'),
     'mochitest-webgl2-core': WebglSuite('webgl2-core'),
     'mochitest-webgl2-ext': WebglSuite('webgl2-ext'),
     'mochitest-webgl2-deqp': WebglSuite('webgl2-deqp'),