未验证 提交 5939f596 编写于 作者: O openharmony_ci 提交者: Gitee

!531 编译失败的时候,跳过后续的打包、显示 rom 空间占用等操作

Merge pull request !531 from ZhangPeng/do-not-execute-postbuild-when-build-failed
......@@ -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.
先完成此消息的编辑!
想要评论请 注册