未验证 提交 048ffd88 编写于 作者: J jiajingbin 提交者: GitHub

Update common.py

上级 25fdea4a
...@@ -137,8 +137,10 @@ class Common: ...@@ -137,8 +137,10 @@ class Common:
''' '''
recreate jmeter report path recreate jmeter report path
''' '''
if config["jmeter"]["clean_aggregate_report"]:
self.exec_local_cmd(f'sudo rm -rf {self.log_dir}/testcase*')
if os.path.exists(path): if os.path.exists(path):
self.exec_local_cmd(f'ls {path} | grep -v performance_ | xargs rm -rf') self.exec_local_cmd(f'rm -rf {path}/*')
else: else:
os.makedirs(path) os.makedirs(path)
...@@ -170,4 +172,4 @@ class Common: ...@@ -170,4 +172,4 @@ class Common:
t.join() t.join()
if __name__ == '__main__': if __name__ == '__main__':
com = Common() com = Common()
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册