Bug 1444152 - [test] Fix regression running marionette tests with |mach test|. r=whimboo, a=test-only
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Tue, 13 Mar 2018 09:49:09 -0400
changeset 462779 4991a778dc7e56faa7ae2fe900069594f0fc0fc4
parent 462778 e965291bd708e0b007f8f7adc84349352a63aaac
child 462780 5e65b1aaa5080d71b41d16d9cfa58853c7f08d8a
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswhimboo, test-only
bugs1444152
milestone60.0
Bug 1444152 - [test] Fix regression running marionette tests with |mach test|. r=whimboo, a=test-only 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)?$',
     },