mirror of
https://github.com/espressif/mbedtls.git
synced 2025-06-17 22:39:22 +08:00
Merge pull request #7874 from yanrayw/7360-code-size-improvement
code_size_compare.py: run make clean before build libraries
This commit is contained in:
commit
a2eff629fc
@ -91,6 +91,7 @@ class CodeSizeInfo: # pylint: disable=too-few-public-methods
|
|||||||
"""
|
"""
|
||||||
arch: architecture to measure code size on.
|
arch: architecture to measure code size on.
|
||||||
config: configuration type to measure code size with.
|
config: configuration type to measure code size with.
|
||||||
|
sys_arch: host architecture.
|
||||||
make_command: command to build library (Inferred from arch and config).
|
make_command: command to build library (Inferred from arch and config).
|
||||||
"""
|
"""
|
||||||
self.arch = arch
|
self.arch = arch
|
||||||
@ -273,6 +274,7 @@ class CodeSizeComparison(CodeSizeBase):
|
|||||||
self.old_rev = old_revision
|
self.old_rev = old_revision
|
||||||
self.new_rev = new_revision
|
self.new_rev = new_revision
|
||||||
self.git_command = "git"
|
self.git_command = "git"
|
||||||
|
self.make_clean = 'make clean'
|
||||||
self.make_command = code_size_info.make_command
|
self.make_command = code_size_info.make_command
|
||||||
self.fname_suffix = "-" + code_size_info.arch + "-" +\
|
self.fname_suffix = "-" + code_size_info.arch + "-" +\
|
||||||
code_size_info.config
|
code_size_info.config
|
||||||
@ -306,6 +308,10 @@ class CodeSizeComparison(CodeSizeBase):
|
|||||||
|
|
||||||
my_environment = os.environ.copy()
|
my_environment = os.environ.copy()
|
||||||
try:
|
try:
|
||||||
|
subprocess.check_output(
|
||||||
|
self.make_clean, env=my_environment, shell=True,
|
||||||
|
cwd=git_worktree_path, stderr=subprocess.STDOUT,
|
||||||
|
)
|
||||||
subprocess.check_output(
|
subprocess.check_output(
|
||||||
self.make_command, env=my_environment, shell=True,
|
self.make_command, env=my_environment, shell=True,
|
||||||
cwd=git_worktree_path, stderr=subprocess.STDOUT,
|
cwd=git_worktree_path, stderr=subprocess.STDOUT,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user