提交 f663f34a 编写于 作者: L liu zhengxi 提交者: Tao Luo

Add CI rule to check unittests inplace_atol (#21528)

上级 3a7caf48
...@@ -39,15 +39,14 @@ function check_approval(){ ...@@ -39,15 +39,14 @@ function check_approval(){
person_num=`echo $@|awk '{for (i=2;i<=NF;i++)print $i}'` person_num=`echo $@|awk '{for (i=2;i<=NF;i++)print $i}'`
APPROVALS=`echo ${approval_line}|python ${PADDLE_ROOT}/tools/check_pr_approval.py $1 $person_num` APPROVALS=`echo ${approval_line}|python ${PADDLE_ROOT}/tools/check_pr_approval.py $1 $person_num`
if [ "${APPROVALS}" == "FALSE" ]; then if [ "${APPROVALS}" == "FALSE" ]; then
add_failed $failed_num $echo_line add_failed "${failed_num}. ${echo_line}"
fi fi
} }
function add_failed(){ function add_failed(){
failed_num=`expr $failed_num + 1` failed_num=`expr $failed_num + 1`
add_line=`echo $@|awk '{for (i=2;i<=NF;i++)print $i}'` echo_list="${echo_list[@]}$1"
echo_list=(${echo_list[@]}$1 "." $add_line)
} }
...@@ -147,6 +146,12 @@ if [ "${NEW_OP_ADDED}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then ...@@ -147,6 +146,12 @@ if [ "${NEW_OP_ADDED}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then
fi fi
fi fi
HAS_INPLACE_TESTS=`git diff -U0 upstream/$BRANCH |grep "+" |grep -E "inplace_atol[[:space:]]*=.*" || true`
if [ "${HAS_INPLACE_TESTS}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then
echo_line="The calculation results of setting inplace enabled and disabled must be equal, that is, it's not recommended to set inplace_atol.\n If you do need to use inplace_atol, you must have one RD (XiaoguangHu01, lanxianghit, phlrain, luotao1) approval for the usage of inplace_atol.\nThe corresponding lines are as follows:\n${HAS_INPLACE_TESTS}\n"
check_approval 1 46782768 47554610 43953930 6836917
fi
if [ -n "${echo_list}" ];then if [ -n "${echo_list}" ];then
echo "****************" echo "****************"
echo -e "${echo_list[@]}" echo -e "${echo_list[@]}"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册