Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
ecefbc60
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,发现更多精彩内容 >>
未验证
提交
ecefbc60
编写于
7月 13, 2018
作者:
C
Cleber Rosa
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'ldoktor/tags-for-remote-runner2'
Signed-off-by:
N
Cleber Rosa
<
crosa@redhat.com
>
上级
523abf6c
89e2f83c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
25 addition
and
7 deletion
+25
-7
optional_plugins/runner_remote/avocado_runner_remote/__init__.py
...l_plugins/runner_remote/avocado_runner_remote/__init__.py
+20
-5
optional_plugins/runner_remote/tests/test_remote.py
optional_plugins/runner_remote/tests/test_remote.py
+5
-2
未找到文件。
optional_plugins/runner_remote/avocado_runner_remote/__init__.py
浏览文件 @
ecefbc60
...
...
@@ -432,13 +432,28 @@ class RemoteTestRunner(TestRunner):
:param references: a string with test references.
:return: a dictionary with test results.
"""
def
arg_to_dest
(
arg
):
"""
Turns long argparse arguments into default dest
"""
return
arg
[
2
:].
replace
(
'-'
,
'_'
)
extra_params
=
[]
mux_files
=
getattr
(
self
.
job
.
args
,
'mux_yaml'
,
[])
if
mux_files
:
extra_params
.
append
(
"-m %s"
%
" "
.
join
(
mux_files
))
# bool or nargs
for
arg
in
[
"--mux-yaml"
,
"--dry-run"
,
"--filter-by-tags-include-empty"
]:
value
=
getattr
(
self
.
job
.
args
,
arg_to_dest
(
arg
),
None
)
if
value
is
True
:
extra_params
.
append
(
arg
)
elif
value
:
extra_params
.
append
(
"%s %s"
%
(
arg
,
" "
.
join
(
value
)))
# append
for
arg
in
[
"--filter-by-tags"
]:
value
=
getattr
(
self
.
job
.
args
,
arg_to_dest
(
arg
),
None
)
if
value
:
join
=
' %s '
%
arg
extra_params
.
append
(
"%s %s"
%
(
arg
,
join
.
join
(
value
)))
if
getattr
(
self
.
job
.
args
,
"dry_run"
,
False
):
extra_params
.
append
(
"--dry-run"
)
references_str
=
" "
.
join
(
references
)
avocado_cmd
=
(
'avocado run --force-job-id %s --json - '
...
...
optional_plugins/runner_remote/tests/test_remote.py
浏览文件 @
ecefbc60
...
...
@@ -58,6 +58,8 @@ class RemoteTestRunnerTest(unittest.TestCase):
show_job_log
=
False
,
mux_yaml
=
[
'~/avocado/tests/foo.yaml'
,
'~/avocado/tests/bar/baz.yaml'
],
filter_by_tags
=
[
"-foo"
,
"-bar"
],
filter_by_tags_include_empty
=
False
,
dry_run
=
True
,
env_keep
=
None
,
reference
=
[
'/tests/sleeptest.py'
,
...
...
@@ -98,8 +100,9 @@ class RemoteTestRunnerTest(unittest.TestCase):
cmd_line
=
(
'avocado run --force-job-id '
'0000000000000000000000000000000000000000 --json - '
'--archive /tests/sleeptest.py /tests/other/test '
'passtest.py -m ~/avocado/tests/foo.yaml '
'~/avocado/tests/bar/baz.yaml --dry-run'
)
'passtest.py --mux-yaml ~/avocado/tests/foo.yaml '
'~/avocado/tests/bar/baz.yaml --dry-run --filter-'
'by-tags -foo --filter-by-tags -bar'
)
runner
.
remote
.
run
.
assert_called_with
(
cmd_line
,
ignore_status
=
True
,
timeout
=
61
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录