Bug 1306717 - Mach command for mochitests ignores --manifest option; r=ahal
authorDan Minor <dminor@mozilla.com>
Mon, 03 Oct 2016 08:23:14 -0400
changeset 343282 c075dbe4e001980da5d4d288c9c181d321ee95cb
parent 343281 dbaae495b5bfea4296d124da1c8439e1e6cb133d
child 343283 54f0671f3c8b914960a659553afcd63cf2a860cd
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1306717
milestone52.0a1
Bug 1306717 - Mach command for mochitests ignores --manifest option; r=ahal MozReview-Commit-ID: E97QUfdG3sY
testing/mochitest/mach_commands.py
--- a/testing/mochitest/mach_commands.py
+++ b/testing/mochitest/mach_commands.py
@@ -191,17 +191,17 @@ class MochitestRunner(MozbuildObject):
                 imp.load_module('mochitest', fh, path,
                                 ('.py', 'r', imp.PY_SOURCE))
 
             import mochitest
 
         options = Namespace(**kwargs)
 
         from manifestparser import TestManifest
-        if tests:
+        if tests and not options.manifestFile:
             manifest = TestManifest()
             manifest.tests.extend(tests)
             options.manifestFile = manifest
 
         return mochitest.run_test_harness(parser, options)
 
     def run_desktop_test(self, context, tests=None, suite=None, **kwargs):
         """Runs a mochitest.
@@ -227,17 +227,17 @@ class MochitestRunner(MozbuildObject):
         remove_handlers = [l for l in logging.getLogger().handlers
                            if isinstance(l, logging.StreamHandler)]
         for handler in remove_handlers:
             logging.getLogger().removeHandler(handler)
 
         options = Namespace(**kwargs)
 
         from manifestparser import TestManifest
-        if tests:
+        if tests and not options.manifestFile:
             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.
@@ -260,17 +260,17 @@ class MochitestRunner(MozbuildObject):
         with open(path, 'r') as fh:
             imp.load_module('runtestsremote', fh, path,
                             ('.py', 'r', imp.PY_SOURCE))
         import runtestsremote
 
         options = Namespace(**kwargs)
 
         from manifestparser import TestManifest
-        if tests:
+        if tests and not options.manifestFile:
             manifest = TestManifest()
             manifest.tests.extend(tests)
             options.manifestFile = manifest
 
         return runtestsremote.run_test_harness(parser, options)
 
     def run_robocop_test(self, context, tests, suite=None, **kwargs):
         host_ret = verify_host_bin()
@@ -282,17 +282,17 @@ class MochitestRunner(MozbuildObject):
         with open(path, 'r') as fh:
             imp.load_module('runrobocop', fh, path,
                             ('.py', 'r', imp.PY_SOURCE))
         import runrobocop
 
         options = Namespace(**kwargs)
 
         from manifestparser import TestManifest
-        if tests:
+        if tests and not options.manifestFile:
             manifest = TestManifest()
             manifest.tests.extend(tests)
             options.manifestFile = manifest
 
         return runrobocop.run_test_harness(parser, options)
 
 # parser