mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-29 03:32:39 +00:00
code_size_compare: make sure _remove_worktree executed
Add try and finally to make sure we remove worktree as expected even if we hit errors by accident. Signed-off-by: Yanray Wang <yanray.wang@arm.com>
This commit is contained in:
parent
9e8b671b1c
commit
6ae94a0a72
@ -423,9 +423,11 @@ class CodeSizeCalculator:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
git_worktree_path = self._create_git_worktree()
|
git_worktree_path = self._create_git_worktree()
|
||||||
self._build_libraries(git_worktree_path)
|
try:
|
||||||
res = self._gen_raw_code_size(git_worktree_path)
|
self._build_libraries(git_worktree_path)
|
||||||
self._remove_worktree(git_worktree_path)
|
res = self._gen_raw_code_size(git_worktree_path)
|
||||||
|
finally:
|
||||||
|
self._remove_worktree(git_worktree_path)
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user