Second optimization of retry method (#31646)

* Second optimization of retry method

* fix show_ut_retry_result repeat execuate
test_benchmark_ci
YUNSHEN XIE 4 years ago committed by GitHub
parent 41e9ecfd1f
commit 1a6e3b04cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -637,6 +637,13 @@ EOF
do
retry_unittests_record="$retry_unittests_record$failed_test_lists"
failed_test_lists_ult=`echo "${failed_test_lists}"`
if [[ "${exec_times}" == "1" ]];then
if [[ "${failed_test_lists}" == "" ]];then
break
else
read retry_unittests <<< $(echo "$failed_test_lists" | grep -oEi "\-.+\(.+\)" | sed 's/(.\+)//' | sed 's/- //' )
fi
fi
echo "========================================="
echo "This is the ${exec_time_array[$exec_times]} time to re-run"
echo "========================================="
@ -1250,6 +1257,13 @@ set +x
do
retry_unittests_record="$retry_unittests_record$failed_test_lists"
failed_test_lists_ult=`echo "${failed_test_lists}" |grep -Po '[^ ].*$'`
if [[ "${exec_times}" == "1" ]];then
if [[ "${failed_test_lists}" == "" ]];then
break
else
read retry_unittests <<< $(echo "$failed_test_lists" | grep -oEi "\-.+\(.+\)" | sed 's/(.\+)//' | sed 's/- //' )
fi
fi
echo "========================================="
echo "This is the ${exec_time_array[$exec_times]} time to re-run"
echo "========================================="

@ -305,6 +305,12 @@ function unittests_retry(){
cur_order='first'
elif ( [[ "$exec_times" == "1" ]] );then
cur_order='second'
if [[ "$failed_test_lists" == "" ]]; then
break
else
retry_unittests=$(echo "${failed_test_lists}" | grep -oEi "\-.+\(" | sed 's/(//' | sed 's/- //' )
retry_unittests_regular=$(echo "$retry_unittests" |awk -F ' ' '{print }' | awk 'BEGIN{ all_str=""}{if (all_str==""){all_str=$1}else{all_str=all_str"$|^"$1}} END{print "^"all_str"$"}')
fi
elif ( [[ "$exec_times" == "2" ]] );then
cur_order='third'
fi

Loading…
Cancel
Save