From dfce571c7f10f42d676f5efb52b1722d86dcb68b Mon Sep 17 00:00:00 2001 From: zhangchunle Date: Mon, 31 May 2021 20:52:30 +0800 Subject: [PATCH] add files need exec all cases (#33226) --- tools/get_pr_ut.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/tools/get_pr_ut.py b/tools/get_pr_ut.py index 24fbdca2df1..5d15443e384 100644 --- a/tools/get_pr_ut.py +++ b/tools/get_pr_ut.py @@ -138,16 +138,16 @@ class PRChecker(object): def get_is_white_file(self, filename): """ judge is white file in pr's files. """ isWhiteFile = False - white_files = (PADDLE_ROOT + 'cmake/', PADDLE_ROOT + 'patches/', - PADDLE_ROOT + 'tools/dockerfile/', - PADDLE_ROOT + 'tools/windows/', - PADDLE_ROOT + 'tools/test_runner.py', - PADDLE_ROOT + 'tools/parallel_UT_rule.py', - PADDLE_ROOT + 'paddle/scripts/paddle_build.sh', - PADDLE_ROOT + 'paddle/scripts/paddle_build.bat') + not_white_files = (PADDLE_ROOT + 'cmake/', PADDLE_ROOT + 'patches/', + PADDLE_ROOT + 'tools/dockerfile/', + PADDLE_ROOT + 'tools/windows/', + PADDLE_ROOT + 'tools/test_runner.py', + PADDLE_ROOT + 'tools/parallel_UT_rule.py', + PADDLE_ROOT + 'paddle/scripts/paddle_build.sh', + PADDLE_ROOT + 'paddle/scripts/paddle_build.bat') if 'cmakelist' in filename.lower(): isWhiteFile = False - elif filename.startswith((white_files)): + elif filename.startswith((not_white_files)): isWhiteFile = False else: isWhiteFile = True @@ -286,11 +286,14 @@ class PRChecker(object): (PADDLE_ROOT + 'python/', PADDLE_ROOT + 'paddle/fluid/')): file_list.append(filename) else: - isWhiteFile = self.get_is_white_file(filename) - if isWhiteFile == False: + if file_dict[filename] == 'added': file_list.append(filename) else: - filterFiles.append(filename) + isWhiteFile = self.get_is_white_file(filename) + if isWhiteFile == False: + file_list.append(filename) + else: + filterFiles.append(filename) if len(file_list) == 0: ut_list.append('filterfiles_placeholder') ret = self.__urlretrieve( -- GitLab