未验证 提交 c1c3e217 编写于 作者: Y YUNSHEN XIE 提交者: GitHub

retry will not be executed when the number of failed ut is greater than 20 (#28374)

* retry will not be executed when the number of failed ut is greater than 20

* add log display

* fix some error

* fix some error

* fix some error

* fix some error
上级 ea851796
......@@ -568,8 +568,13 @@ EOF
retry_time=3
exec_times=0
exec_time_array=('first' 'second' 'third')
exec_retry_threshold=20
if [ -n "$failed_test_lists" ];then
mactest_error=1
read need_retry_ut_str <<< $(echo "$failed_test_lists" | grep -oEi "\-.+\(" | sed 's/(//' | sed 's/- //' )
need_retry_ut_arr=(${need_retry_ut_str})
need_retry_ut_count=${#need_retry_ut_arr[@]}
if [ $need_retry_ut_count -lt $exec_retry_threshold ];then
while ( [ $exec_times -lt $retry_time ] && [ -n "${failed_test_lists}" ] )
do
retry_unittests_record="$retry_unittests_record$failed_test_lists"
......@@ -597,6 +602,12 @@ EOF
collect_failed_tests
exec_times=$[$exec_times+1]
done
else
echo "========================================="
echo "There are more than 20 failed unit tests, so no unit test retry!!!"
echo "========================================="
fi
fi
#mactest_error=$?
ut_endTime_s=`date +%s`
......@@ -1080,7 +1091,12 @@ set +x
retry_unittests_record=''
retry_time=3
exec_time_array=('first' 'second' 'third')
exec_retry_threshold=20
if [ -n "$failed_test_lists" ];then
read need_retry_ut_str <<< $(echo "$failed_test_lists" | grep -oEi "\-.+\(.+\)" | sed 's/(.\+)//' | sed 's/- //' )
need_retry_ut_arr=(${need_retry_ut_str})
need_retry_ut_count=${#need_retry_ut_arr[@]}
if [ $need_retry_ut_count -lt $exec_retry_threshold ];then
while ( [ $exec_times -lt $retry_time ] && [ -n "${failed_test_lists}" ] )
do
......@@ -1145,6 +1161,11 @@ set +x
exclusive_retry=''
retry_unittests=''
done
else
echo "========================================="
echo "There are more than 20 failed unit tests, so no unit test retry!!!"
echo "========================================="
fi
fi
if [[ "$EXIT_CODE" != "0" ]]; then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册