Bug 1429158 - Use 'mach' format by default for one-click-loaner mochitests, r=jmaher
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Tue, 09 Jan 2018 14:34:27 -0500
changeset 452760 ed6cf025df1352cf5f9e8f6be8d09debf5b69801
parent 452759 b015e89b1064b5f0958ad2b945c9b2fdbe18f48f
child 452761 1599fb3b361022c56638a1570272068dc69eb268
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1429158
milestone59.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 1429158 - Use 'mach' format by default for one-click-loaner mochitests, r=jmaher This uses the 'mach' format by default when running mochitests from a one-click-loaner. This is now consistent with the default when running mochitests locally. MozReview-Commit-ID: LYQbGm71Of8
testing/mochitest/mach_test_package_commands.py
--- a/testing/mochitest/mach_test_package_commands.py
+++ b/testing/mochitest/mach_test_package_commands.py
@@ -1,29 +1,35 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import unicode_literals
 
 import os
+import sys
 from argparse import Namespace
 from functools import partial
 
 from mach.decorators import (
     CommandProvider,
     Command,
 )
 
 here = os.path.abspath(os.path.dirname(__file__))
 parser = None
 
 
 def run_mochitest(context, **kwargs):
     from mochitest_options import ALL_FLAVORS
+    from mozlog.commandline import setup_logging
+
+    if not kwargs.get('log'):
+        kwargs['log'] = setup_logging('mochitest', kwargs, {'mach': sys.stdout})
+
     flavor = kwargs.get('flavor') or 'mochitest'
     if flavor not in ALL_FLAVORS:
         for fname, fobj in ALL_FLAVORS.iteritems():
             if flavor in fobj['aliases']:
                 flavor = fname
                 break
     fobj = ALL_FLAVORS[flavor]
     kwargs.update(fobj.get('extra_args', {}))