Bug 1306717 - Mach command for mochitests ignores --manifest option; r?ahal
MozReview-Commit-ID: E97QUfdG3sY
--- 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