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

Second optimization of retry method (#31646)

* Second optimization of retry method

* fix show_ut_retry_result repeat execuate
上级 41e9ecfd
...@@ -637,6 +637,13 @@ EOF ...@@ -637,6 +637,13 @@ EOF
do do
retry_unittests_record="$retry_unittests_record$failed_test_lists" retry_unittests_record="$retry_unittests_record$failed_test_lists"
failed_test_lists_ult=`echo "${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 "========================================="
echo "This is the ${exec_time_array[$exec_times]} time to re-run" echo "This is the ${exec_time_array[$exec_times]} time to re-run"
echo "=========================================" echo "========================================="
...@@ -1250,6 +1257,13 @@ set +x ...@@ -1250,6 +1257,13 @@ set +x
do do
retry_unittests_record="$retry_unittests_record$failed_test_lists" retry_unittests_record="$retry_unittests_record$failed_test_lists"
failed_test_lists_ult=`echo "${failed_test_lists}" |grep -Po '[^ ].*$'` 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 "========================================="
echo "This is the ${exec_time_array[$exec_times]} time to re-run" echo "This is the ${exec_time_array[$exec_times]} time to re-run"
echo "=========================================" echo "========================================="
......
...@@ -305,6 +305,12 @@ function unittests_retry(){ ...@@ -305,6 +305,12 @@ function unittests_retry(){
cur_order='first' cur_order='first'
elif ( [[ "$exec_times" == "1" ]] );then elif ( [[ "$exec_times" == "1" ]] );then
cur_order='second' 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 elif ( [[ "$exec_times" == "2" ]] );then
cur_order='third' cur_order='third'
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册