From 7b0c2062290c83a048e88f61395c026551b55cdc Mon Sep 17 00:00:00 2001 From: YUNSHEN XIE <1084314248@qq.com> Date: Mon, 13 Sep 2021 20:04:46 +0800 Subject: [PATCH] fix bug for added ut check (#35539) --- paddle/scripts/paddle_build.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index fc59478137b..3da903b5efd 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; -- GitLab