common.run_cmd: assert result == 0 by default

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-10-23 00:00:01 +00:00
parent 4cd9c533b8
commit 4b99e522dd
12 changed files with 81 additions and 74 deletions

View File

@@ -17,22 +17,22 @@ class CrosstoolNgComponent(common.Component):
# Bootstrap out-ot-tree WONTFIX. I've tried.
# https://github.com/crosstool-ng/crosstool-ng/issues/1021
os.chdir(common.crosstool_ng_src_dir)
assert common.run_cmd(
common.run_cmd(
[os.path.join(common.crosstool_ng_src_dir, 'bootstrap')],
) == 0
)
os.chdir(common.crosstool_ng_util_dir)
assert common.run_cmd(
common.run_cmd(
[
os.path.join(common.crosstool_ng_src_dir, 'configure'),
'--enable-local',
],
) == 0
assert common.run_cmd(
)
common.run_cmd(
[
'make',
'-j', str(nproc),
],
) == 0
)
# Build the toolchain.
common.cp(
@@ -47,14 +47,14 @@ class CrosstoolNgComponent(common.Component):
'CT_LOCAL_TARBALLS_DIR="{}"'.format(common.crosstool_ng_download_dir),
]
)
assert common.run_cmd(
common.run_cmd(
[
common.crosstool_ng_executable,
'defconfig',
],
) == 0
)
os.unlink(defconfig_dest)
assert common.run_cmd(
common.run_cmd(
[
common.crosstool_ng_executable,
'build',
@@ -63,7 +63,7 @@ class CrosstoolNgComponent(common.Component):
out_file=os.path.join(build_dir, 'lkmc.log'),
delete_env=['LD_LIBRARY_PATH'],
extra_paths=[common.ccache_dir],
) == 0
)
def get_argparse_args(self):
return {