Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
ecd38f65
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,发现更多精彩内容 >>
未验证
提交
ecd38f65
编写于
1月 10, 2018
作者:
A
Amador Pahim
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'clebergnu-misc_improvs'
Signed-off-by:
N
Amador Pahim
<
apahim@redhat.com
>
上级
7bc7d9cf
6323773d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
28 addition
and
16 deletion
+28
-16
avocado/core/job.py
avocado/core/job.py
+16
-11
avocado/utils/process.py
avocado/utils/process.py
+11
-5
setup.py
setup.py
+1
-0
未找到文件。
avocado/core/job.py
浏览文件 @
ecd38f65
...
...
@@ -329,23 +329,28 @@ class Job(object):
@
staticmethod
def
_get_avocado_git_version
():
# if running from git sources, there will be a ".git" directory
# 3 levels up
base_dir
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
__file__
)))
git_dir
=
os
.
path
.
join
(
base_dir
,
'.git'
)
if
not
os
.
path
.
isdir
(
git_dir
):
return
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
base_dir
,
'python-avocado.spec'
)):
return
try
:
git
=
path
.
find_command
(
'git'
)
except
path
.
CmdNotFoundError
:
return
# We need to get git root as `py2to3` creates this file in BUILD
olddir
=
os
.
getcwd
()
try
:
os
.
chdir
(
os
.
path
.
dirname
(
__file__
))
git_root
=
process
.
run
(
'%s rev-parse --show-toplevel'
%
git
,
ignore_status
=
True
,
verbose
=
False
)
if
git_root
.
exit_status
==
0
and
os
.
path
.
exists
(
os
.
path
.
join
(
git_root
.
stdout
.
strip
(),
'python-avocado.spec'
)):
cmd
=
"%s show --summary --pretty='%%H'"
%
git
res
=
process
.
run
(
cmd
,
ignore_status
=
True
,
verbose
=
False
)
if
res
.
exit_status
==
0
:
top_commit
=
res
.
stdout
.
splitlines
()[
0
][:
8
]
return
" (GIT commit %s)"
%
top_commit
os
.
chdir
(
base_dir
)
cmd
=
"%s show --summary --pretty='%%H'"
%
git
res
=
process
.
run
(
cmd
,
ignore_status
=
True
,
verbose
=
False
)
if
res
.
exit_status
==
0
:
top_commit
=
res
.
stdout
.
splitlines
()[
0
][:
8
]
return
" (GIT commit %s)"
%
top_commit
finally
:
os
.
chdir
(
olddir
)
...
...
avocado/utils/process.py
浏览文件 @
ecd38f65
...
...
@@ -257,12 +257,18 @@ class CmdResult(object):
"""
Command execution result.
:param command: String containing the command line itself
:param exit_status: Integer exit code of the process
:param stdout: String containing stdout of the process
:param stderr: String containing stderr of the process
:param duration: Elapsed wall clock time running the process
:param command: the command line itself
:type command: str
:param exit_status: exit code of the process
:type exit_status: int
:param stdout: content of the process stdout
:type stdout: str
:param stderr: content of the process stderr
:type stderr: str
:param duration: elapsed wall clock time running the process
:type duration: float
:param pid: ID of the process
:type pid: int
"""
def
__init__
(
self
,
command
=
""
,
stdout
=
""
,
stderr
=
""
,
...
...
setup.py
浏览文件 @
ecd38f65
...
...
@@ -154,6 +154,7 @@ if __name__ == '__main__':
"Operating System :: POSIX"
,
"Topic :: Software Development :: Quality Assurance"
,
"Topic :: Software Development :: Testing"
,
"Programming Language :: Python :: 2.7"
,
],
packages
=
find_packages
(
exclude
=
(
'selftests*'
,)),
data_files
=
get_data_files
(),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录