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

@@ -36,7 +36,7 @@ class BaremetalComponent(common.Component):
uart_address = 0x09000000
os.makedirs(build_dir, exist_ok=True)
os.makedirs(common.baremetal_build_lib_dir, exist_ok=True)
assert common.run_cmd(
common.run_cmd(
[gcc] +
cflags +
[
@@ -44,8 +44,8 @@ class BaremetalComponent(common.Component):
'-o', bootloader_obj,
os.path.join(common.baremetal_src_lib_dir, '{}{}'.format(args.arch, common.asm_ext)),
]
) == 0
assert common.run_cmd(
)
common.run_cmd(
[gcc] +
cflags +
[
@@ -55,7 +55,7 @@ class BaremetalComponent(common.Component):
'-o', common_obj,
os.path.join(common.baremetal_src_lib_dir, 'common' + common.c_ext),
]
) == 0
)
self._build_dir(
'',
gcc=gcc,
@@ -126,7 +126,7 @@ Build the baremetal examples with crosstool-NG.
if os.path.isfile(in_path) and os.path.splitext(in_basename)[1] in (common.c_ext, common.asm_ext):
in_name = os.path.splitext(in_basename)[0]
main_obj = os.path.join(common.baremetal_build_dir, subpath, '{}{}'.format(in_name, common.obj_ext))
assert common.run_cmd(
common.run_cmd(
[gcc] +
cflags +
[
@@ -134,8 +134,8 @@ Build the baremetal examples with crosstool-NG.
'-o', main_obj,
os.path.join(common.baremetal_src_dir, in_path),
]
) == 0
assert common.run_cmd(
)
common.run_cmd(
[gcc] +
cflags +
[
@@ -148,7 +148,7 @@ Build the baremetal examples with crosstool-NG.
common_obj,
main_obj,
]
) == 0
)
if __name__ == '__main__':
BaremetalComponent().build()