提交 a30e786e 编写于 作者: C Cleber Rosa

Runner plugins: standardize option group names, metavars and others

This is a collection of little small touches that, IMHO, add a little
bit more consistency to the plugins involved in the Avocado `run`
command.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 ff102f1d
......@@ -279,8 +279,8 @@ class HTML(plugin.Plugin):
self.parser = parser
self.parser.runner.output.add_argument(
'--html', type=str,
dest='html_output',
help=('Enable HTML output to the file where the result should be '
dest='html_output', metavar='FILE',
help=('Enable HTML output to the FILE where the result should be '
'written. The value - (output to stdout) is not supported '
'since not all HTML resources can be embedded into a '
'single file (page resources will be copied to the '
......
......@@ -104,8 +104,8 @@ class JSON(plugin.Plugin):
self.parser = parser
self.parser.runner.output.add_argument(
'--json', type=str,
dest='json_output',
help='Enable JSON output to the file where the result should be written. '
dest='json_output', metavar='FILE',
help='Enable JSON result format and write it to FILE. '
"Use '-' to redirect to the standard output.")
self.configured = True
......
......@@ -37,7 +37,7 @@ class RunRemote(plugin.Plugin):
self.enabled = False
return
username = getpass.getuser()
msg = 'run on a remote machine arguments'
msg = 'test execution on a remote machine'
self.remote_parser = parser.runner.add_argument_group(msg)
self.remote_parser.add_argument('--remote-hostname',
dest='remote_hostname', default=None,
......
......@@ -82,7 +82,7 @@ class TestRunner(plugin.Plugin):
'(hardware details, profilers, etc.). '
'Current: %(default)s'))
self.parser.output = self.parser.add_argument_group('output related arguments')
self.parser.output = self.parser.add_argument_group('output and result format')
self.parser.output.add_argument(
'-s', '--silent', action='store_true', default=False,
......@@ -116,10 +116,11 @@ class TestRunner(plugin.Plugin):
'Current: on (output check enabled)'))
if multiplexer.MULTIPLEX_CAPABLE:
mux = self.parser.add_argument_group('multiplex arguments')
mux.add_argument('-m', '--multiplex-files', nargs='*', default=None,
help='Path(s) to a avocado multiplex (.yaml) '
'file(s) (order dependent)')
mux = self.parser.add_argument_group('multiplexer use on test execution')
mux.add_argument('-m', '--multiplex-files', nargs='*',
default=None, metavar='FILE',
help='Location of one or more Avocado multiplex (.yaml) '
'FILE(s) (order dependent)')
mux.add_argument('--filter-only', nargs='*', default=[],
help='Filter only path(s) from multiplexing')
mux.add_argument('--filter-out', nargs='*', default=[],
......
......@@ -38,9 +38,8 @@ class RunVM(plugin.Plugin):
return
username = getpass.getuser()
default_hypervisor_uri = 'qemu:///system'
self.vm_parser = parser.runner.add_argument_group('run on a libvirt '
'domain arguments')
msg = 'test execution on a Virtual Machine'
self.vm_parser = parser.runner.add_argument_group(msg)
self.vm_parser.add_argument('--vm-domain', dest='vm_domain',
help=('Specify Libvirt Domain Name'))
self.vm_parser.add_argument('--vm-hypervisor-uri',
......
......@@ -33,7 +33,7 @@ class Wrapper(plugin.Plugin):
def configure(self, parser):
self.parser = parser
wrap_group = self.parser.runner.add_argument_group(
'Wrapper support')
'wrapper support')
wrap_group.add_argument('--wrapper', action='append', default=[],
metavar='SCRIPT[:EXECUTABLE]',
help='Use a script to wrap executables run by '
......
......@@ -228,8 +228,8 @@ class XUnit(plugin.Plugin):
def configure(self, parser):
self.parser = parser
self.parser.runner.output.add_argument(
'--xunit', type=str, dest='xunit_output',
help=('Enable xUnit output to the file where the result should be written. '
'--xunit', type=str, dest='xunit_output', metavar='FILE',
help=('Enable xUnit result format and write it to FILE. '
"Use '-' to redirect to the standard output."))
self.configured = True
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册