Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
8934b9b0
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,发现更多精彩内容 >>
未验证
提交
8934b9b0
编写于
3月 08, 2017
作者:
A
Amador Pahim
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'clebergnu-review_avocado_job_fail'
Signed-off-by:
N
Amador Pahim
<
apahim@redhat.com
>
上级
d2e34f90
d20ce0bb
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
21 addition
and
15 deletion
+21
-15
avocado/core/exit_codes.py
avocado/core/exit_codes.py
+2
-2
avocado/core/restclient/cli/app.py
avocado/core/restclient/cli/app.py
+2
-2
avocado/plugins/diff.py
avocado/plugins/diff.py
+1
-1
avocado/plugins/multiplex.py
avocado/plugins/multiplex.py
+1
-1
avocado/plugins/replay.py
avocado/plugins/replay.py
+5
-5
avocado/plugins/yaml_to_mux.py
avocado/plugins/yaml_to_mux.py
+8
-2
selftests/functional/test_multiplex.py
selftests/functional/test_multiplex.py
+1
-1
selftests/functional/test_replay_basic.py
selftests/functional/test_replay_basic.py
+1
-1
未找到文件。
avocado/core/exit_codes.py
浏览文件 @
8934b9b0
...
...
@@ -26,8 +26,8 @@ AVOCADO_ALL_OK = 0x0000
#: Job went fine, but some tests FAILed or ERRORed
AVOCADO_TESTS_FAIL
=
0x0001
#: Something went wrong with
the Job itself, by explicit
#: :class:`avocado.core.exceptions.JobError` exception.
#: Something went wrong with
an Avocado Job execution, usually by
#:
an explicit
:class:`avocado.core.exceptions.JobError` exception.
AVOCADO_JOB_FAIL
=
0x0002
#: Something else went wrong and avocado failed (or crashed). Commonly
...
...
avocado/core/restclient/cli/app.py
浏览文件 @
8934b9b0
...
...
@@ -62,13 +62,13 @@ class App(object):
password
=
self
.
args
.
password
)
except
connection
.
InvalidConnectionError
:
self
.
log
.
error
(
"Error: could not connect to the server"
)
sys
.
exit
(
exit_codes
.
AVOCADO_
JOB_
FAIL
)
sys
.
exit
(
exit_codes
.
AVOCADO_FAIL
)
except
connection
.
InvalidServerVersionError
:
self
.
log
.
error
(
"REST server version is higher than "
"than this client can support."
)
self
.
log
.
error
(
"Please use a more recent version "
"of the REST client application."
)
sys
.
exit
(
exit_codes
.
AVOCADO_
JOB_
FAIL
)
sys
.
exit
(
exit_codes
.
AVOCADO_FAIL
)
def
dispatch_action
(
self
):
"""
...
...
avocado/plugins/diff.py
浏览文件 @
8934b9b0
...
...
@@ -343,7 +343,7 @@ class Diff(CLICmd):
resultsdir
=
jobdata
.
get_resultsdir
(
logdir
,
job_id
)
except
ValueError
as
exception
:
LOG
.
error
(
exception
.
message
)
sys
.
exit
(
exit_codes
.
AVOCADO_
JOB_
FAIL
)
sys
.
exit
(
exit_codes
.
AVOCADO_FAIL
)
if
resultsdir
is
None
:
LOG
.
error
(
"Can't find job results directory for '%s' in '%s'"
,
...
...
avocado/plugins/multiplex.py
浏览文件 @
8934b9b0
...
...
@@ -91,7 +91,7 @@ class Multiplex(CLICmd):
varianter
.
parse
(
args
)
except
(
IOError
,
ValueError
)
as
details
:
log
.
error
(
"Unable to parse varianter: %s"
,
details
)
sys
.
exit
(
exit_codes
.
AVOCADO_
JOB_
FAIL
)
sys
.
exit
(
exit_codes
.
AVOCADO_FAIL
)
use_utf8
=
settings
.
get_value
(
"runner.output"
,
"utf8"
,
key_type
=
bool
,
default
=
None
)
summary
=
args
.
summary
or
0
...
...
avocado/plugins/replay.py
浏览文件 @
8934b9b0
...
...
@@ -142,11 +142,11 @@ class Replay(CLI):
resultsdir
=
jobdata
.
get_resultsdir
(
logdir
,
args
.
replay_jobid
)
except
ValueError
as
exception
:
log
.
error
(
exception
.
message
)
sys
.
exit
(
exit_codes
.
AVOCADO_
JOB_
FAIL
)
sys
.
exit
(
exit_codes
.
AVOCADO_FAIL
)
if
resultsdir
is
None
:
log
.
error
(
"Can't find job results directory in '%s'"
,
logdir
)
sys
.
exit
(
exit_codes
.
AVOCADO_
JOB_
FAIL
)
sys
.
exit
(
exit_codes
.
AVOCADO_FAIL
)
sourcejob
=
jobdata
.
get_id
(
os
.
path
.
join
(
resultsdir
,
'id'
),
args
.
replay_jobid
)
...
...
@@ -154,7 +154,7 @@ class Replay(CLI):
msg
=
(
"Can't find matching job id '%s' in '%s' directory."
%
(
args
.
replay_jobid
,
resultsdir
))
log
.
error
(
msg
)
sys
.
exit
(
exit_codes
.
AVOCADO_
JOB_
FAIL
)
sys
.
exit
(
exit_codes
.
AVOCADO_FAIL
)
setattr
(
args
,
'replay_sourcejob'
,
sourcejob
)
replay_args
=
jobdata
.
retrieve_args
(
resultsdir
)
...
...
@@ -186,7 +186,7 @@ class Replay(CLI):
references
=
jobdata
.
retrieve_references
(
resultsdir
)
if
references
is
None
:
log
.
error
(
'Source job test references data not found. Aborting.'
)
sys
.
exit
(
exit_codes
.
AVOCADO_
JOB_
FAIL
)
sys
.
exit
(
exit_codes
.
AVOCADO_FAIL
)
else
:
setattr
(
args
,
'reference'
,
references
)
...
...
@@ -203,7 +203,7 @@ class Replay(CLI):
variants
=
jobdata
.
retrieve_variants
(
resultsdir
)
if
variants
is
None
:
log
.
error
(
'Source job variants data not found. Aborting.'
)
sys
.
exit
(
exit_codes
.
AVOCADO_
JOB_
FAIL
)
sys
.
exit
(
exit_codes
.
AVOCADO_FAIL
)
else
:
# Ignore data manipulation. This is necessary, because
# we replaced the unparsed object with parsed one. There
...
...
avocado/plugins/yaml_to_mux.py
浏览文件 @
8934b9b0
...
...
@@ -335,7 +335,10 @@ class YamlToMux(mux.MuxPlugin, Varianter):
except
IOError
as
details
:
error_msg
=
"%s : %s"
%
(
details
.
strerror
,
details
.
filename
)
logging
.
getLogger
(
"avocado.app"
).
error
(
error_msg
)
sys
.
exit
(
exit_codes
.
AVOCADO_JOB_FAIL
)
if
args
.
subcommand
==
'run'
:
sys
.
exit
(
exit_codes
.
AVOCADO_JOB_FAIL
)
else
:
sys
.
exit
(
exit_codes
.
AVOCADO_FAIL
)
# Deprecated --multiplex option
multiplex_files
=
getattr
(
args
,
"multiplex"
,
None
)
...
...
@@ -348,7 +351,10 @@ class YamlToMux(mux.MuxPlugin, Varianter):
except
IOError
as
details
:
error_msg
=
"%s : %s"
%
(
details
.
strerror
,
details
.
filename
)
logging
.
getLogger
(
"avocado.app"
).
error
(
error_msg
)
sys
.
exit
(
exit_codes
.
AVOCADO_JOB_FAIL
)
if
args
.
subcommand
==
'run'
:
sys
.
exit
(
exit_codes
.
AVOCADO_JOB_FAIL
)
else
:
sys
.
exit
(
exit_codes
.
AVOCADO_FAIL
)
# Extend default multiplex tree of --mux-inject values
for
inject
in
getattr
(
args
,
"mux_inject"
,
[]):
...
...
selftests/functional/test_multiplex.py
浏览文件 @
8934b9b0
...
...
@@ -49,7 +49,7 @@ class MultiplexTests(unittest.TestCase):
def
test_mplex_plugin_nonexistent
(
self
):
cmd_line
=
'./scripts/avocado multiplex -m nonexist'
expected_rc
=
exit_codes
.
AVOCADO_
JOB_
FAIL
expected_rc
=
exit_codes
.
AVOCADO_FAIL
result
=
self
.
run_and_check
(
cmd_line
,
expected_rc
)
self
.
assertIn
(
'No such file or directory'
,
result
.
stderr
)
...
...
selftests/functional/test_replay_basic.py
浏览文件 @
8934b9b0
...
...
@@ -44,7 +44,7 @@ class ReplayTests(unittest.TestCase):
cmd_line
=
(
'./scripts/avocado run --replay %s '
'--job-results-dir %s --sysinfo=off'
%
(
'foo'
,
self
.
tmpdir
))
expected_rc
=
exit_codes
.
AVOCADO_
JOB_
FAIL
expected_rc
=
exit_codes
.
AVOCADO_FAIL
self
.
run_and_check
(
cmd_line
,
expected_rc
)
def
test_run_replay_latest
(
self
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录