未验证 提交 f8673765 编写于 作者: Z Zhang Peng

skip post-build processes when build failed

Signed-off-by: NZhang Peng <zhangpeng280@huawei.com>
Change-Id: I41de65f6356266ef8c77744b7b89c7299612fad8
上级 5c31835e
......@@ -132,7 +132,7 @@ class Build():
def build(self, full_compile, patch=False, ninja=True, cmd_args=None):
if 'target_cpu' in str(cmd_args):
self.config.target_cpu = cmd_args["target_cpu"]
self.config.target_cpu = cmd_args["target_cpu"]
if 'compile_config' in str(cmd_args):
self.config.compile_config = cmd_args["compile_config"]
cmd_list = self.get_cmd(full_compile, patch, ninja, cmd_args)
......@@ -151,12 +151,15 @@ class Build():
raise
except Exception:
raise
finally:
else:
post_build = PostBuild(self.config)
post_build.clean(self.start_time)
post_build.patch_ohos_para(cmd_args)
post_build.package_image()
output_part_rom_status(self.config.root_path)
finally:
if 'post_build' not in locals():
post_build = PostBuild(self.config)
post_build.clean(self.start_time)
hb_info(f'{os.path.basename(self.config.out_path)} build success')
hb_info(f'cost time: {self.build_time}')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册