diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index fc59478137bc66f6e67df8bab4785e8283114435..3da903b5efda976071bde1a1b7219243a00c0f5b 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -1180,13 +1180,14 @@ set -x 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=$? - #if [ "$added_ut_error" != 0 ];then - # echo "========================================" - # echo "Added UT should not exceed 15 seconds" - # echo "========================================" - # exit 8; - #fi + env CUDA_VISIBLE_DEVICES=0 ctest -R "(${added_uts})" -LE "RUN_TYPE=DIST|RUN_TYPE=EXCLUSIVE" --output-on-failure --repeat-until-fail 3 --timeout 15;added_ut_error=$? + ctest -R "(${added_uts})" -L "RUN_TYPE=DIST|RUN_TYPE=EXCLUSIVE" --output-on-failure --repeat-until-fail 3 --timeout 15;added_ut_error_1=$? + if [ "$added_ut_error" != 0 ] && [ "$added_ut_error_1" != 0 ];then + echo "========================================" + echo "Added UT should not exceed 15 seconds" + echo "========================================" + exit 8; + fi fi set +x EXIT_CODE=0;