Refine precision test print message

revert-31562-mean
chalsliu 4 years ago committed by GitHub
parent e63a68feac
commit 27bdbec7fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1051,6 +1051,7 @@ set -x
python3.7 $PADDLE_ROOT/tools/get_pr_ut.py python3.7 $PADDLE_ROOT/tools/get_pr_ut.py
if [[ -f "ut_list" ]]; then if [[ -f "ut_list" ]]; then
set +x set +x
echo "PREC length: "`wc -l ut_list`
precision_cases=`cat ut_list` precision_cases=`cat ut_list`
set -x set -x
fi fi

@ -242,6 +242,14 @@ class PRChecker(object):
else: else:
ut_list.extend(file_ut_map.get(f)) ut_list.extend(file_ut_map.get(f))
ut_list = list(set(ut_list)) ut_list = list(set(ut_list))
if check_added_ut:
with open('{}/added_ut'.format(PADDLE_ROOT)) as utfile:
for ut in utfile:
print('PREC NEW UT: {}'.format(ut.rstrip('\r\n')))
ut_list.append(ut.rstrip('\r\n'))
if ut_list:
ret = self.__wget_with_retry( ret = self.__wget_with_retry(
'https://sys-p0.bj.bcebos.com/prec/prec_delta{}'.format( 'https://sys-p0.bj.bcebos.com/prec/prec_delta{}'.format(
self.suffix)) self.suffix))
@ -251,12 +259,7 @@ class PRChecker(object):
ut_list.append(ut.rstrip('\r\n')) ut_list.append(ut.rstrip('\r\n'))
else: else:
print('PREC download prec_delta failed') print('PREC download prec_delta failed')
exit(1)
if check_added_ut:
with open('{}/added_ut'.format(PADDLE_ROOT)) as utfile:
for ut in utfile:
print('PREC NEW UT: {}'.format(ut.rstrip('\r\n')))
ut_list.append(ut.rstrip('\r\n'))
return '\n'.join(ut_list) return '\n'.join(ut_list)

Loading…
Cancel
Save