The new unit test cannot have the same name as the existing unit test (#29878)

* check UT Duplicate name

* fix error

* Optimized log display

* modified exit code
revert-31068-fix_conv3d_windows
YUNSHEN XIE 4 years ago committed by GitHub
parent ff25c5b36f
commit bbea5a1fa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1072,6 +1072,18 @@ set -x
set -x
fi
fi
if [ -a "$PADDLE_ROOT/duplicate_ut" ];then
duplicate_uts=$(cat $PADDLE_ROOT/duplicate_ut|sed -e 's/\r//g')
if [[ "$duplicate_uts" != "" ]];then
set +x
echo "========================================"
echo "The new unit test has the same name as the existing unit test"
cat "$PADDLE_ROOT/duplicate_ut"
echo "========================================"
exit 102;
set -x
fi
fi
if [ -a "$PADDLE_ROOT/added_ut" ];then
added_uts=^$(awk BEGIN{RS=EOF}'{gsub(/\n/,"$|^");print}' $PADDLE_ROOT/added_ut)$
ctest -R "(${added_uts})" --output-on-failure --repeat-until-fail 3 --timeout 15;added_ut_error=$?

@ -36,6 +36,7 @@ cd $PADDLE_ROOT/build
ctest -N | awk -F ':' '{print $2}' | sed '/^$/d' | sed '$d' | sed 's/ //g' > /$PADDLE_ROOT/pr-ut
cd $PADDLE_ROOT
grep -F -x -v -f br-ut pr-ut > $PADDLE_ROOT/added_ut
sort pr-ut |uniq -d > $PADDLE_ROOT/duplicate_ut
echo "New-UT:"
cat $PADDLE_ROOT/added_ut
rm -rf prec_build

Loading…
Cancel
Save