提交 c7be5605 编写于 作者: P Praveen K Pandey

rename make to run_make which using process.run

Signed-off-by: NPraveen K Pandey <praveen@linux.vnet.ibm.com>
上级 cc048a40
......@@ -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.
先完成此消息的编辑!
想要评论请 注册