提交 a7b725b3 编写于 作者: L Lucas Meneghel Rodrigues

avocado.plugin: Visual plugin output tweaks

Get to a more toned down output for the subcommands
'datadir', 'plugins' and 'list'.
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 45a9828e
......@@ -36,9 +36,10 @@ class DataDirList(plugin.Plugin):
def run(self, args):
view = output.View()
view.notify(event="message", msg='Config file path: %s' % settings.config_path)
view.notify(event="message", msg='')
view.notify(event="message", msg='Avocado Data Directories:')
view.notify(event="message", msg=' base dir ' + data_dir.get_base_dir())
view.notify(event="message", msg=' tests dir ' + data_dir.get_test_dir())
view.notify(event="message", msg=' data dir ' + data_dir.get_data_dir())
view.notify(event="message", msg=' logs dir ' + data_dir.get_logs_dir())
view.notify(event="message", msg=' tmp dir ' + data_dir.get_tmp_dir())
view.notify(event="minor", msg=' base dir ' + data_dir.get_base_dir())
view.notify(event="minor", msg=' tests dir ' + data_dir.get_test_dir())
view.notify(event="minor", msg=' data dir ' + data_dir.get_data_dir())
view.notify(event="minor", msg=' logs dir ' + data_dir.get_logs_dir())
view.notify(event="minor", msg=' tmp dir ' + data_dir.get_tmp_dir())
......@@ -42,7 +42,7 @@ class PluginsList(plugin.Plugin):
if clength > blength:
blength = clength
format_str = " %-" + str(blength) + "s - %s %s"
format_str = " %-" + str(blength) + "s %s %s"
for plug in sorted(pm.plugins):
if plug.enabled:
status = "(Enabled)"
......
......@@ -68,13 +68,14 @@ class TestLister(plugin.Plugin):
test_dirs.append((t.split('.')[0], os.path.join(base_test_dir, t)))
format_string = " %-" + str(blength) + "s %s"
view.notify(event="message", msg='Config file path: %s' % settings.config_path)
view.notify(event='message', msg='Tests dir: %s' % base_test_dir)
view.notify(event="minor", msg='')
view.notify(event="message", msg='Tests dir: %s' % base_test_dir)
if len(test_dirs) > 0:
view.notify(event='message', msg=format_string % ('Alias', 'Path'))
view.notify(event="minor", msg=format_string % ('Alias', 'Path'))
for test_dir in test_dirs:
view.notify(event='minor', msg=format_string % test_dir)
view.notify(event="minor", msg=format_string % test_dir)
else:
view.notify(event='error', msg='No tests were found on current tests dir')
view.notify(event="error", msg='No tests were found on current tests dir')
class TestRunner(plugin.Plugin):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册