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

Merge remote-tracking branch 'lmr/fix-issue-486-2ndtry'

......@@ -30,10 +30,15 @@ class PluginList(plugin.Plugin):
self.parser = parser.subcommands.add_parser(
'plugins',
help='List all plugins loaded')
self.parser.add_argument('--disable-paginator',
dest='disable_paginator',
action='store_true',
help='Disable paginator usage')
super(PluginList, self).configure(self.parser)
def run(self, args):
view = output.View(app_args=args, use_paginator=True)
view = output.View(app_args=args,
use_paginator=not args.disable_paginator)
pm = get_plugin_manager()
view.notify(event='message', msg='Plugins loaded:')
blength = 0
......
......@@ -54,6 +54,10 @@ class TestList(plugin.Plugin):
help='Whether to show extra information '
'(headers and summary). Current: %('
'default)s')
self.parser.add_argument('--disable-paginator',
dest='disable_paginator',
action='store_true',
help='Disable paginator usage')
super(TestList, self).configure(self.parser)
def _run(self, args):
......@@ -62,7 +66,8 @@ class TestList(plugin.Plugin):
:param args: Command line args received from the list subparser.
"""
self.view = output.View(app_args=args, use_paginator=True)
self.view = output.View(app_args=args,
use_paginator=not args.disable_paginator)
paths = [data_dir.get_test_dir()]
if args.paths:
......
......@@ -69,8 +69,9 @@ class RemoteTestRunner(TestRunner):
'avocado installed')
urls_str = " ".join(urls)
avocado_check_urls_cmd = 'cd %s; avocado list %s' % (self.remote_test_dir,
urls_str)
avocado_check_urls_cmd = ('cd %s; avocado list %s '
'--disable-paginator' % (self.remote_test_dir,
urls_str))
check_urls_result = self.result.remote.run(avocado_check_urls_cmd,
ignore_status=True,
timeout=None)
......
......@@ -41,7 +41,7 @@ class RemoteTestRunnerTest(unittest.TestCase):
.with_args(args, ignore_status=True, timeout=None)
.once().and_return(version_result))
args = 'cd ~/avocado/tests; avocado list sleeptest'
args = 'cd ~/avocado/tests; avocado list sleeptest --disable-paginator'
urls_result = flexmock(exit_status=0)
(Remote.should_receive('run')
.with_args(args, timeout=None, ignore_status=True)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册