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

@@ -133,7 +133,7 @@ usually extra Buildroot targets.
if os.path.isdir(package_dir_abs):
br2_external_dirs.append(self._path_relative_to_buildroot(package_dir_abs))
br2_external_str = ':'.join(br2_external_dirs)
assert common.run_cmd(
common.run_cmd(
[
'make',
'O={}'.format(common.buildroot_build_dir),
@@ -141,7 +141,7 @@ usually extra Buildroot targets.
defconfig,
],
cwd=common.buildroot_src_dir,
) == 0
)
buildroot_configs = args.buildroot_config
buildroot_configs.extend([
'BR2_JLEVEL={}'.format(nproc),
@@ -241,20 +241,20 @@ usually extra Buildroot targets.
buildroot_kernel_config_fragment_str = 'BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{}"'.format(' '.join(kernel_config_fragments))
buildroot_configs.append(buildroot_kernel_config_fragment_str)
common.write_configs(common.buildroot_config_file, buildroot_configs, buildroot_config_fragments)
assert common.run_cmd(
common.run_cmd(
[
'make',
'O={}'.format(common.buildroot_build_dir),
'olddefconfig',
],
cwd=common.buildroot_src_dir,
) == 0
)
# Do the actual build.
common.make_build_dirs()
if not args.no_all:
extra_make_args.append('all')
assert common.run_cmd(
common.run_cmd(
[
'make',
'LKMC_GEM5_SRCDIR="{}"'.format(common.gem5_src_dir),
@@ -267,7 +267,7 @@ usually extra Buildroot targets.
out_file=os.path.join(common.buildroot_build_dir, 'lkmc.log'),
delete_env=['LD_LIBRARY_PATH'],
cwd=common.buildroot_src_dir,
) == 0
)
# Create the qcow2 from ext2.
# Skip if qemu is not present, because gem5 does not need the qcow2.