提交 cf5e67c1 编写于 作者: R Rudá Moura 提交者: Ruda Moura

avocado.plugins.runner: Option --silent exclusive to run.

Remove generic option --silent and turn it to subcommand run.
Signed-off-by: NRuda Moura <rmoura@redhat.com>
上级 347d461e
......@@ -114,6 +114,9 @@ class TestRunner(plugin.Plugin):
help=('Unique Job id. Used by a server when job '
'was created at the server and run on a '
'different test machine'))
self.parser.add_argument('-s', '--silent', action='store_true', default=False,
help='Silent output, do not display results.')
super(TestRunner, self).configure(self.parser)
def run(self, args):
......
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See LICENSE for more details.
#
# Copyright: Red Hat Inc. 2014
# Author: Ruda Moura <rmoura@redhat.com>
"""
Silent output module.
"""
from avocado.plugins import plugin
class Silent(plugin.Plugin):
"""
Silent output plugin.
"""
name = 'silent_output'
enabled = True
def configure(self, parser):
self.parser = parser.application.add_argument(
'--silent', action='store_true', default=False,
help='Silent output, do not display results.')
self.configured = True
......@@ -150,7 +150,7 @@ class RunnerOperationTest(unittest.TestCase):
def test_silent_output(self):
os.chdir(basedir)
cmd_line = './scripts/avocado --silent run sleeptest'
cmd_line = './scripts/avocado run --silent sleeptest'
result = process.run(cmd_line, ignore_status=True)
expected_rc = 0
expected_output = ''
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册