From 9fb3296d5cce8aed5efbb2cd1ab034d298f3f506 Mon Sep 17 00:00:00 2001 From: andy <1414772332@qq.com> Date: Wed, 18 Dec 2024 11:15:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=AF=91=E5=89=8D=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E4=B8=8A=E6=AC=A1=E7=94=9F=E6=88=90=E7=9A=84=E4=B8=AD=E9=97=B4?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=92=8C=E5=9B=BA=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/build_time_cost_test.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build/build_time_cost_test.py b/build/build_time_cost_test.py index 4454d0a..ddd2afd 100755 --- a/build/build_time_cost_test.py +++ b/build/build_time_cost_test.py @@ -5,12 +5,19 @@ import os import sys import time +import shutil if __name__ == "__main__": time_start=time.time() - cmd=f"{' '.join(sys.argv[1:])} > build_log.log" + if(len(sys.argv)>2): + cmd=f"{' '.join(sys.argv[1:])} > build_log.log" + os.system("python3 ../clear_output.py > /dev/null") + path="../tools/gen_img/customer" + if os.path.exists(path): + shutil.rmtree(path) + else: + cmd=' '.join(sys.argv[1:]) print(cmd) - os.system("python3 ../clear_output.py") os.system(cmd) time_end=time.time() print(f"build end, cost {time_end-time_start} s")