Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
fb1700e8
A
avocado
项目概览
openeuler
/
avocado
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
avocado
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fb1700e8
编写于
10月 04, 2016
作者:
L
Lukáš Doktor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
avocado.plugins: Few cleanups and style improvements
Signed-off-by:
N
Lukáš Doktor
<
ldoktor@redhat.com
>
上级
3423ca96
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
42 addition
and
41 deletion
+42
-41
avocado/plugins/multiplex.py
avocado/plugins/multiplex.py
+1
-1
avocado/plugins/run.py
avocado/plugins/run.py
+41
-40
未找到文件。
avocado/plugins/multiplex.py
浏览文件 @
fb1700e8
...
...
@@ -29,7 +29,7 @@ class Multiplex(CLICmd):
"""
name
=
'multiplex'
description
=
'Generate a list of dictionaries with params from a multiplex file'
description
=
"Tool to analyze and visualize test variants and params"
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
Multiplex
,
self
).
__init__
(
*
args
,
**
kwargs
)
...
...
avocado/plugins/run.py
浏览文件 @
fb1700e8
...
...
@@ -37,7 +37,8 @@ class Run(CLICmd):
"""
name
=
'run'
description
=
'Run one or more tests (native test, test alias, binary or script)'
description
=
(
"Runs one or more tests (native test, test alias, binary"
"or script)"
)
def
configure
(
self
,
parser
):
"""
...
...
@@ -55,15 +56,16 @@ class Run(CLICmd):
help
=
"Instead of running the test only "
"list them and log their params."
)
parser
.
add_argument
(
'-z'
,
'--archive'
,
action
=
'store_true'
,
default
=
False
,
help
=
'Archive (ZIP) files generated by tests'
)
parser
.
add_argument
(
'-z'
,
'--archive'
,
action
=
'store_true'
,
default
=
False
,
help
=
'Archive (ZIP) files generated'
' by tests'
)
parser
.
add_argument
(
'--force-job-id'
,
dest
=
'unique_job_id'
,
type
=
str
,
default
=
None
,
help
=
(
'Forces the use of a particular job ID. Used '
'internally when interacting with an avocado '
'server. You should not use this option '
'unless you know exactly what you
\'
re doing'
)
)
help
=
'Forces the use of a particular job ID. Used '
'internally when interacting with an avocado '
'server. You should not use this option '
'unless you know exactly what you
\'
re doing'
)
parser
.
add_argument
(
'--job-results-dir'
,
action
=
'store'
,
dest
=
'logdir'
,
default
=
None
,
metavar
=
'DIRECTORY'
,
...
...
@@ -72,37 +74,37 @@ class Run(CLICmd):
parser
.
add_argument
(
'--job-timeout'
,
action
=
'store'
,
default
=
None
,
metavar
=
'SECONDS'
,
help
=
(
'Set the maximum amount of time (in SECONDS) that
'
'
tests are allowed to execute. '
'Values <= zero means "no timeout". '
'You can also use suffixes, like: '
' s (seconds), m (minutes), h (hours). '
)
)
help
=
'Set the maximum amount of time (in SECONDS)
'
'that
tests are allowed to execute. '
'Values <= zero means "no timeout". '
'You can also use suffixes, like: '
' s (seconds), m (minutes), h (hours). '
)
parser
.
add_argument
(
'--failfast'
,
choices
=
(
'on'
,
'off'
),
help
=
'Enable or disable the job interruption on '
'first failed test.'
)
'first failed test.'
)
sysinfo_default
=
settings
.
get_value
(
'sysinfo.collect'
,
'enabled'
,
key_type
=
'bool'
,
default
=
True
)
sysinfo_default
=
'on'
if
sysinfo_default
is
True
else
'off'
parser
.
add_argument
(
'--sysinfo'
,
choices
=
(
'on'
,
'off'
),
default
=
sysinfo_default
,
help
=
(
'Enable or disable system information '
'(hardware details, profilers, etc.). '
'Current: %(default)s'
)
)
parser
.
add_argument
(
'--sysinfo'
,
choices
=
(
'on'
,
'off'
),
default
=
sysinfo_default
,
help
=
"Enable or disable "
"system information (hardware details, profilers, "
"etc.). Current: %(default)s"
)
parser
.
output
=
parser
.
add_argument_group
(
'output and result format'
)
parser
.
output
.
add_argument
(
'-s'
,
'--silent'
,
action
=
"store_true"
,
default
=
argparse
.
SUPPRESS
,
help
=
'Silence stdout'
)
parser
.
output
.
add_argument
(
'-s'
,
'--silent'
,
action
=
"store_true"
,
default
=
argparse
.
SUPPRESS
,
help
=
'Silence stdout'
)
parser
.
output
.
add_argument
(
'--show-job-log'
,
action
=
'store_true'
,
default
=
False
,
help
=
(
'Display only the job log on stdout. Useful '
'for test debugging purposes. No output will '
'be displayed if you also specify --silent'
)
)
parser
.
output
.
add_argument
(
'--show-job-log'
,
action
=
'store_true'
,
default
=
False
,
help
=
"Display only the job "
"log on stdout. Useful for test debugging "
"purposes. No output will be displayed if "
"you also specify --silent"
)
parser
.
output
.
add_argument
(
"--store-logging-stream"
,
nargs
=
"*"
,
default
=
[],
metavar
=
"STREAM[:LEVEL]"
,
...
...
@@ -114,21 +116,20 @@ class Run(CLICmd):
out_check
.
add_argument
(
'--output-check-record'
,
choices
=
(
'none'
,
'all'
,
'stdout'
,
'stderr'
),
default
=
'none'
,
help
=
(
'Record output streams of your tests '
'to reference files (valid options: '
'none (do not record output streams), '
'all (record both stdout and stderr), '
'stdout (record only stderr), '
'stderr (record only stderr). '
'Current: %(default)s'
))
help
=
"Record output streams of your tests "
"to reference files (valid options: none (do "
"not record output streams), all (record both "
"stdout and stderr), stdout (record only "
"stderr), stderr (record only stderr). "
'Current: %(default)s'
)
out_check
.
add_argument
(
'--output-check'
,
choices
=
(
'on'
,
'off'
),
default
=
'on'
,
help
=
(
'Enable or disable test output (stdout/stderr) check. '
'If this option is off, no output will '
'be checked, even if there are reference files '
'present for the test. '
'Current: on (output check enabled)'
)
)
help
=
"Enable or disable test output (stdout/"
"stderr) check. If this option is off, no "
"output will be checked, even if there are "
"reference files present for the test. "
"Current: on (output check enabled)"
)
loader
.
add_loader_options
(
parser
)
...
...
@@ -173,9 +174,9 @@ class Run(CLICmd):
job_run
=
job_instance
.
run
()
result_dispatcher
=
ResultDispatcher
()
if
result_dispatcher
.
extensions
:
# At this point job_instance doesn't have a single results
attribute
#
which is the end goal. For now, we pick any of the plugin classes
# added to the result proxy.
# At this point job_instance doesn't have a single results
#
attribute which is the end goal. For now, we pick any of the
#
plugin classes
added to the result proxy.
if
len
(
job_instance
.
result_proxy
.
output_plugins
)
>
0
:
result
=
job_instance
.
result_proxy
.
output_plugins
[
0
]
result_dispatcher
.
map_method
(
'render'
,
result
,
job_instance
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录