Bug 1056952 - Expose xpcshell's verbose option to xpcshell's mach_commands.py. r=ahal

This commit is contained in:
Chris Manchester 2014-08-21 16:34:55 -04:00
parent 9bd3b0b779
commit d2519c2968

View File

@ -68,7 +68,7 @@ class XPCShellRunner(MozbuildObject):
def run_test(self, test_paths, interactive=False,
keep_going=False, sequential=False, shuffle=False,
debugger=None, debuggerArgs=None, debuggerInteractive=None,
rerun_failures=False, test_objects=None,
rerun_failures=False, test_objects=None, verbose=False,
# ignore parameters from other platforms' options
**kwargs):
"""Runs an individual xpcshell test."""
@ -85,7 +85,8 @@ class XPCShellRunner(MozbuildObject):
keep_going=keep_going, shuffle=shuffle, sequential=sequential,
debugger=debugger, debuggerArgs=debuggerArgs,
debuggerInteractive=debuggerInteractive,
rerun_failures=rerun_failures)
rerun_failures=rerun_failures,
verbose=verbose)
return
elif test_paths:
test_paths = [self._wrap_path_argument(p).relpath() for p in test_paths]
@ -116,6 +117,7 @@ class XPCShellRunner(MozbuildObject):
'debuggerInteractive': debuggerInteractive,
'rerun_failures': rerun_failures,
'manifest': manifest,
'verbose': verbose,
}
return self._run_xpcshell_harness(**args)
@ -124,7 +126,7 @@ class XPCShellRunner(MozbuildObject):
test_path=None, shuffle=False, interactive=False,
keep_going=False, sequential=False,
debugger=None, debuggerArgs=None, debuggerInteractive=None,
rerun_failures=False):
rerun_failures=False, verbose=False):
# Obtain a reference to the xpcshell test runner.
import runxpcshelltests
@ -140,8 +142,10 @@ class XPCShellRunner(MozbuildObject):
modules_dir = os.path.join(self.topobjdir, '_tests', 'modules')
# We want output from the test to be written immediately if we are only
# running a single test.
verbose_output = test_path is not None or (manifest and len(manifest.test_paths())==1)
verbose_output = (test_path is not None or
(manifest and len(manifest.test_paths())==1) or
verbose)
# We need to attach the '.exe' extension on Windows for the debugger to
# work properly.
xpcsExecutable = 'xpcshell'
@ -420,6 +424,8 @@ class MachCommands(MachCommandBase):
@CommandArgument('test_paths', default='all', nargs='*', metavar='TEST',
help='Test to run. Can be specified as a single JS file, a directory, '
'or omitted. If omitted, the entire test suite is executed.')
@CommandArgument('--verbose', '-v', action='store_true',
help='Provide full output from each test process.')
@CommandArgument("--debugger", default=None, metavar='DEBUGGER',
help = "Run xpcshell under the given debugger.")
@CommandArgument("--debugger-args", default=None, metavar='ARGS', type=str,