mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-23 16:20:49 +00:00
code_size_compare.py: run make clean before build libraries
If we don't remove all executable files in current working directory, we might measure code size between different architecture and configuration. This generates a wrong code size comparison report. This commit guarantees it runs `make clean` before build libraries for code size comparison. Signed-off-by: Yanray Wang <yanray.wang@arm.com>
This commit is contained in:
parent
443589ac53
commit
4c26db0845
@ -273,6 +273,7 @@ class CodeSizeComparison(CodeSizeBase):
|
||||
self.old_rev = old_revision
|
||||
self.new_rev = new_revision
|
||||
self.git_command = "git"
|
||||
self.make_clean = 'make clean'
|
||||
self.make_command = code_size_info.make_command
|
||||
self.fname_suffix = "-" + code_size_info.arch + "-" +\
|
||||
code_size_info.config
|
||||
@ -306,6 +307,10 @@ class CodeSizeComparison(CodeSizeBase):
|
||||
|
||||
my_environment = os.environ.copy()
|
||||
try:
|
||||
subprocess.check_output(
|
||||
self.make_clean, env=my_environment, shell=True,
|
||||
cwd=git_worktree_path, stderr=subprocess.STDOUT,
|
||||
)
|
||||
subprocess.check_output(
|
||||
self.make_command, env=my_environment, shell=True,
|
||||
cwd=git_worktree_path, stderr=subprocess.STDOUT,
|
||||
|
Loading…
x
Reference in New Issue
Block a user