Bug 1444152 - [test] Fix regression running marionette tests with |mach test|, r?whimboo draft
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Tue, 13 Mar 2018 09:49:09 -0400
changeset 766857 9da7d7f29af14321103dbabad2116ac1ef9b8411
parent 766824 8f1b2f872f0ea358a0412eb8b8687f08d47f6621
push id102418
push userahalberstadt@mozilla.com
push dateTue, 13 Mar 2018 13:52:11 +0000
reviewerswhimboo
bugs1444152
milestone61.0a1
Bug 1444152 - [test] Fix regression running marionette tests with |mach test|, r?whimboo There were two issues: 1) The mach command name in resolve.py was wrong. 2) The marionette harness uses deepcopy on the passed in kwargs and sometimes the 'log' argument that testing/mach_commands.py was passing in can be a class instance (which can't be deepcopied). MozReview-Commit-ID: 5gPxuiHs3dY
testing/marionette/mach_commands.py
testing/mozbase/moztest/moztest/resolve.py
--- a/testing/marionette/mach_commands.py
+++ b/testing/marionette/mach_commands.py
@@ -46,23 +46,23 @@ def run_marionette(tests, binary=None, t
 
     if not tests:
         tests = [os.path.join(topsrcdir,
                  "testing/marionette/harness/marionette_harness/tests/unit-tests.ini")]
 
     args = argparse.Namespace(tests=tests)
 
     args.binary = binary
+    args.logger = kwargs.pop('log', None)
 
     for k, v in kwargs.iteritems():
         setattr(args, k, v)
 
     parser.verify_usage(args)
 
-    args.logger = kwargs.get('log')
     if not args.logger:
         args.logger = commandline.setup_logging("Marionette Unit Tests",
                                                 args,
                                                 {"mach": sys.stdout})
     failed = MarionetteHarness(MarionetteTestRunner, args=vars(args)).run()
     if failed > 0:
         return 1
     else:
--- a/testing/mozbase/moztest/moztest/resolve.py
+++ b/testing/mozbase/moztest/moztest/resolve.py
@@ -51,17 +51,17 @@ TEST_SUITES = {
     # TODO(ato): integrate geckodriver tests with moz.build
     'geckodriver': {
         'aliases': ('testing/geckodriver',),
         'mach_command': 'geckodriver-test',
         'kwargs': {},
     },
     'marionette': {
         'aliases': ('mn',),
-        'mach_command': 'marionette',
+        'mach_command': 'marionette-test',
         'kwargs': {'tests': None},
     },
     'mochitest-a11y': {
         'aliases': ('a11y', 'ally'),
         'mach_command': 'mochitest',
         'kwargs': {'flavor': 'a11y', 'test_paths': None},
         'task_regex': 'mochitest-a11y(?:-1)?$',
     },