diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 4cffd7ffa135be1dd080c2d8ea9141cb044800e6..71df05912ee9d61f71286ce8ea89a98f0cd4c834 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -1051,6 +1051,7 @@ set -x python3.7 $PADDLE_ROOT/tools/get_pr_ut.py if [[ -f "ut_list" ]]; then set +x + echo "PREC length: "`wc -l ut_list` precision_cases=`cat ut_list` set -x fi diff --git a/tools/get_pr_ut.py b/tools/get_pr_ut.py index 71bdc36215eacc0923d04003889f22d3a77a1102..6b26ede908e48e0e342cafe2bc52f38b832412aa 100644 --- a/tools/get_pr_ut.py +++ b/tools/get_pr_ut.py @@ -242,15 +242,6 @@ class PRChecker(object): else: ut_list.extend(file_ut_map.get(f)) ut_list = list(set(ut_list)) - ret = self.__wget_with_retry( - 'https://sys-p0.bj.bcebos.com/prec/prec_delta{}'.format( - self.suffix)) - if ret: - with open('prec_delta' + self.suffix) as delta: - for ut in delta: - ut_list.append(ut.rstrip('\r\n')) - else: - print('PREC download prec_delta failed') if check_added_ut: with open('{}/added_ut'.format(PADDLE_ROOT)) as utfile: @@ -258,6 +249,18 @@ class PRChecker(object): print('PREC NEW UT: {}'.format(ut.rstrip('\r\n'))) ut_list.append(ut.rstrip('\r\n')) + if ut_list: + ret = self.__wget_with_retry( + 'https://sys-p0.bj.bcebos.com/prec/prec_delta{}'.format( + self.suffix)) + if ret: + with open('prec_delta' + self.suffix) as delta: + for ut in delta: + ut_list.append(ut.rstrip('\r\n')) + else: + print('PREC download prec_delta failed') + exit(1) + return '\n'.join(ut_list)