mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
common.run_cmd: assert result == 0 by default
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user