Bug 1470397 - Use logger from created from |mach test| in testing/firefox-ui/mach_commands.py, r=whimboo
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Wed, 27 Jun 2018 19:43:12 +0000
changeset 423979 16cad8d7cb82fd2e8cd71e93a285a9e55120d386
parent 423978 e03976b0784c52e885de484d069e4204a5305ac9
child 423980 423075e98708fd8a9239fb7500c9890bce4a2242
push id34197
push usercsabou@mozilla.com
push dateThu, 28 Jun 2018 09:44:02 +0000
treeherdermozilla-central@db455160668d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswhimboo
bugs1470397
milestone63.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 1470397 - Use logger from created from |mach test| in testing/firefox-ui/mach_commands.py, r=whimboo This will allow |mach test| to run firefox-ui tests. Differential Revision: https://phabricator.services.mozilla.com/D1844
testing/firefox-ui/mach_commands.py
--- a/testing/firefox-ui/mach_commands.py
+++ b/testing/firefox-ui/mach_commands.py
@@ -72,18 +72,20 @@ def run_firefox_ui_test(testtype=None, t
         for obj in kwargs['test_objects']:
             tests.append(obj['file_relpath'])
         kwargs['tests'] = tests
     elif not kwargs.get('tests'):
         # If no tests have been selected, set default ones
         kwargs['tests'] = [os.path.join(fxui_dir, 'tests', test)
                            for test in test_types[testtype]['default_tests']]
 
-    kwargs['logger'] = commandline.setup_logging('Firefox UI - {} Tests'.format(testtype),
-                                                 {"mach": sys.stdout})
+    kwargs['logger'] = kwargs.pop('log', None)
+    if not kwargs['logger']:
+        kwargs['logger'] = commandline.setup_logging('Firefox UI - {} Tests'.format(testtype),
+                                                     {"mach": sys.stdout})
 
     args = Namespace()
 
     for k, v in kwargs.iteritems():
         setattr(args, k, v)
 
     parser.verify_usage(args)