Bug 1448533 - Honour the 'test.format' machrc config setting in |mach xpcshell-test|, r=gbrown
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Mon, 26 Mar 2018 11:51:21 -0400
changeset 410575 fe56904f1c56b61ae895b7742f7e4b0dc67003a9
parent 410574 c5ab4533710cc2a151495340c712ba66c7acc1ec
child 410576 e3613e0e4fe2984ec6dac9a22b03ec49740067b9
push id101523
push userdluca@mozilla.com
push dateThu, 29 Mar 2018 09:58:15 +0000
treeherdermozilla-inbound@a3f1872c22ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgbrown
bugs1448533
milestone61.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 1448533 - Honour the 'test.format' machrc config setting in |mach xpcshell-test|, r=gbrown Since |mach xpcshell-test| was already defaulting to the 'mach' format, this will be a no-op for most people. For anyone who had: [test] format=tbpl in their machrc file, this will start working for xpcshell tests. MozReview-Commit-ID: LwIlh0lefN6
testing/xpcshell/mach_commands.py
--- a/testing/xpcshell/mach_commands.py
+++ b/testing/xpcshell/mach_commands.py
@@ -229,20 +229,23 @@ class MachCommands(MachCommandBase):
         driver.install_tests(test_objects)
 
         # We should probably have a utility function to ensure the tree is
         # ready to run tests. Until then, we just create the state dir (in
         # case the tree wasn't built with mach).
         self._ensure_state_subdir_exists('.')
 
         if not params.get('log'):
-            params['log'] = structured.commandline.setup_logging("XPCShellTests",
-                                                                 params,
-                                                                 {"mach": sys.stdout},
-                                                                 {"verbose": True})
+            log_defaults = {self._mach_context.settings['test']['format']: sys.stdout}
+            fmt_defaults = {
+                "level": self._mach_context.settings['test']['level'],
+                "verbose": True
+            }
+            params['log'] = structured.commandline.setup_logging(
+                "XPCShellTests", params, log_defaults, fmt_defaults)
 
         if not params['threadCount']:
             params['threadCount'] = int((cpu_count() * 3) / 2)
 
         if conditions.is_android(self):
             from mozrunner.devices.android_device import verify_android_device, get_adb_path
             verify_android_device(self)
             if not params['adbPath']: