未验证 提交 7e27b5aa 编写于 作者: Z zhangchunle 提交者: GitHub

handle remove files in pr (#32940)

上级 14949521
......@@ -130,6 +130,9 @@ class PRChecker(object):
if not files:
break
for f in files:
if f.status == 'removed':
file_list.append('removed')
else:
file_list.append(PADDLE_ROOT + f.filename)
page += 1
return file_list
......@@ -257,7 +260,13 @@ class PRChecker(object):
notHitMapFiles = []
hitMapFiles = []
onlyCommentsFilesOrXpu = []
for f in self.get_pr_files():
file_list = self.get_pr_files()
if 'removed' in file_list:
print("ipipe_log_param_PRECISION_TEST: false")
print("notHitMapFiles: [rm file]")
return ''
else:
for f in file_list:
if current_system == "Darwin" or current_system == "Windows" or self.suffix == ".py3":
f_judge = f.replace(PADDLE_ROOT, '/paddle/', 1)
f_judge = f_judge.replace('//', '/')
......@@ -313,7 +322,8 @@ class PRChecker(object):
print("ipipe_log_param_PRECISION_TEST_Cases_count: %s" %
len(ut_list))
PRECISION_TEST_Cases_ratio = format(
float(len(ut_list)) / float(self.get_all_count()), '.2f')
float(len(ut_list)) / float(self.get_all_count()),
'.2f')
print("ipipe_log_param_PRECISION_TEST_Cases_ratio: %s" %
PRECISION_TEST_Cases_ratio)
return '\n'.join(ut_list)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册