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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user