Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
c7be5605
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,发现更多精彩内容 >>
提交
c7be5605
编写于
9月 09, 2016
作者:
P
Praveen K Pandey
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename make to run_make which using process.run
Signed-off-by:
N
Praveen K Pandey
<
praveen@linux.vnet.ibm.com
>
上级
cc048a40
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
37 addition
and
7 deletion
+37
-7
avocado/utils/build.py
avocado/utils/build.py
+37
-7
未找到文件。
avocado/utils/build.py
浏览文件 @
c7be5605
...
...
@@ -18,9 +18,8 @@ import os
from
.
import
process
def
make
(
path
,
make
=
'make'
,
env
=
None
,
extra_args
=
''
,
ignore_status
=
False
,
def
run_
make
(
path
,
make
=
'make'
,
env
=
None
,
extra_args
=
''
,
ignore_status
=
False
,
allow_output_check
=
'none'
):
"""
Run make, adding MAKEOPTS to the list of options.
...
...
@@ -40,6 +39,7 @@ def make(path, make='make', env=None, extra_args='', ignore_status=False,
to use the compilation output as a reference
in tests.
:type allow_output_check: str
:returns: the make command result object
"""
cwd
=
os
.
getcwd
()
os
.
chdir
(
path
)
...
...
@@ -58,9 +58,39 @@ def make(path, make='make', env=None, extra_args='', ignore_status=False,
cmd
+=
' %s'
%
makeopts
if
extra_args
:
cmd
+=
' %s'
%
extra_args
make_process
=
process
.
system
(
cmd
,
make_process
=
process
.
run
(
cmd
,
env
=
env
,
ignore_status
=
ignore_status
,
allow_output_check
=
allow_output_check
)
os
.
chdir
(
cwd
)
return
make_process
def
make
(
path
,
make
=
'make'
,
env
=
None
,
extra_args
=
''
,
ignore_status
=
False
,
allow_output_check
=
'none'
):
"""
Run make, adding MAKEOPTS to the list of options.
:param make: what make command name to use.
:param env: dictionary with environment variables to be set before
calling make (e.g.: CFLAGS).
:param extra: extra command line arguments to pass to make.
:param allow_output_check: Whether to log the command stream outputs
(stdout and stderr) of the make process in
the test stream files. Valid values: 'stdout',
for allowing only standard output, 'stderr',
to allow only standard error, 'all',
to allow both standard output and error,
and 'none', to allow none to be
recorded (default). The default here is
'none', because usually we don't want
to use the compilation output as a reference
in tests.
:type allow_output_check: str
:returns: exit status of the make process
"""
result
=
run_make
(
path
,
make
,
env
,
extra_args
,
ignore_status
,
allow_output_check
)
return
result
.
exit_status
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录