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
1 changed files with 5 additions and 0 deletions
|
@ -273,6 +273,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 +307,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…
Add table
Add a link
Reference in a new issue