Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
5e1eb794
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,发现更多精彩内容 >>
提交
5e1eb794
编写于
5月 07, 2015
作者:
C
Cleber Rosa
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'ruda/mux_exception3'
上级
7b27d00f
66f14136
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
8 deletion
+18
-8
avocado/core/job.py
avocado/core/job.py
+4
-1
avocado/core/plugins/multiplexer.py
avocado/core/plugins/multiplexer.py
+6
-2
avocado/core/tree.py
avocado/core/tree.py
+8
-5
未找到文件。
avocado/core/job.py
浏览文件 @
5e1eb794
...
...
@@ -307,7 +307,10 @@ class Job(object):
"filters, typos)"
)
raise
exceptions
.
OptionValidationError
(
e_msg
)
mux
=
multiplexer
.
Mux
(
self
.
args
)
try
:
mux
=
multiplexer
.
Mux
(
self
.
args
)
except
IOError
,
details
:
raise
exceptions
.
OptionValidationError
(
details
.
strerror
)
self
.
args
.
test_result_total
=
mux
.
get_number_of_tests
(
test_suite
)
self
.
_make_test_result
()
...
...
avocado/core/plugins/multiplexer.py
浏览文件 @
5e1eb794
...
...
@@ -64,7 +64,11 @@ class Multiplexer(plugin.Plugin):
multiplex_files
=
args
.
multiplex_files
if
args
.
tree
:
view
.
notify
(
event
=
'message'
,
msg
=
'Config file tree structure:'
)
t
=
tree
.
create_from_yaml
(
multiplex_files
)
try
:
t
=
tree
.
create_from_yaml
(
multiplex_files
)
except
IOError
,
details
:
view
.
notify
(
event
=
'error'
,
msg
=
details
.
strerror
)
sys
.
exit
(
exit_codes
.
AVOCADO_JOB_FAIL
)
t
=
tree
.
apply_filters
(
t
,
args
.
filter_only
,
args
.
filter_out
)
view
.
notify
(
event
=
'minor'
,
msg
=
t
.
get_ascii
(
attributes
=
args
.
attr
))
...
...
@@ -77,7 +81,7 @@ class Multiplexer(plugin.Plugin):
args
.
debug
)
except
IOError
,
details
:
view
.
notify
(
event
=
'error'
,
msg
=
"%s: '%s'"
%
(
details
.
strerror
,
details
.
filename
)
)
msg
=
details
.
strerror
)
sys
.
exit
(
exit_codes
.
AVOCADO_JOB_FAIL
)
view
.
notify
(
event
=
'message'
,
msg
=
'Variants generated:'
)
...
...
avocado/core/tree.py
浏览文件 @
5e1eb794
...
...
@@ -487,14 +487,17 @@ def create_from_yaml(paths, debug=False):
data
=
tree_debug
.
TreeNodeDebug
()
merge
=
_merge_debug
path
=
None
try
:
for
path
in
paths
:
merge
(
data
,
path
)
except
(
yaml
.
scanner
.
ScannerError
,
yaml
.
parser
.
ParserError
)
as
err
:
if
'mapping values are not allowed in this context'
in
str
(
err
):
err
=
(
"%s
\n\n
Make sure !tags and colons are separated by a space "
"(eg. !include :)"
%
err
)
raise
SyntaxError
(
err
)
# Yaml can raise IndexError on some files
except
(
yaml
.
YAMLError
,
IndexError
)
as
details
:
if
'mapping values are not allowed in this context'
in
str
(
details
):
details
=
(
"%s
\n
Make sure !tags and colons are separated by a "
"space (eg. !include :)"
%
details
)
msg
=
"Invalid multiplex file '%s': %s"
%
(
path
,
details
)
raise
IOError
(
2
,
msg
,
path
)
return
data
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录