mirror of
https://github.com/henrydcase/pqc.git
synced 2024-11-26 09:21:28 +00:00
Add returncode support to helper.make
This commit is contained in:
parent
d503a712ba
commit
dc1f7e204a
@ -26,11 +26,12 @@ def run_subprocess(command, working_dir='.', env=None, expected_returncode=0):
|
||||
env=env,
|
||||
)
|
||||
print(result.stdout.decode('utf-8'))
|
||||
assert(result.returncode == expected_returncode)
|
||||
assert result.returncode == expected_returncode, \
|
||||
"Got unexpected return code {}".format(result.returncode)
|
||||
return result.stdout.decode('utf-8')
|
||||
|
||||
|
||||
def make(*args, working_dir='.', env=None, **kwargs):
|
||||
def make(*args, working_dir='.', env=None, expected_returncode=0, **kwargs):
|
||||
"""
|
||||
Runs a make target in the specified working directory
|
||||
|
||||
@ -54,6 +55,7 @@ def make(*args, working_dir='.', env=None, **kwargs):
|
||||
],
|
||||
working_dir=working_dir,
|
||||
env=env,
|
||||
expected_returncode=expected_returncode,
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user