提交 2f3e2a84 编写于 作者: Z zhouwei25 提交者: Tao Luo

fix ci rule to show Shell variables (#22177)

上级 433973d6
......@@ -520,15 +520,15 @@ function generate_api_spec() {
}
function check_approvals_of_unittest() {
set +x
if [ "$GITHUB_API_TOKEN" == "" ] || [ "$GIT_PR_ID" == "" ]; then
return 0
fi
# approval_user_list: XiaoguangHu01 46782768,luotao1 6836917,phlrain 43953930,lanxianghit 47554610, zhouwei25 52485244, kolinwei 22165420
approval_line=`curl -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/PaddlePaddle/Paddle/pulls/${GIT_PR_ID}/reviews?per_page=10000`
check_times=$1
if [ $1 == 1 ]; then
if [ $check_times == 1 ]; then
approval_line=`curl -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/PaddlePaddle/Paddle/pulls/${GIT_PR_ID}/reviews?per_page=10000`
APPROVALS=`echo ${approval_line}|python ${PADDLE_ROOT}/tools/check_pr_approval.py 1 22165420 52485244 6836917`
set +x
echo "current pr ${GIT_PR_ID} got approvals: ${APPROVALS}"
if [ "${APPROVALS}" == "TRUE" ]; then
echo "==================================="
......@@ -536,12 +536,12 @@ function check_approvals_of_unittest() {
echo "==================================="
exit 0
fi
elif [ $1 == 2 ]; then
set -x
elif [ $check_times == 2 ]; then
unittest_spec_diff=`python ${PADDLE_ROOT}/tools/diff_unittest.py ${PADDLE_ROOT}/paddle/fluid/UNITTEST_DEV.spec ${PADDLE_ROOT}/paddle/fluid/UNITTEST_PR.spec`
set +x
if [ "$unittest_spec_diff" != "" ]; then
approval_line=`curl -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/PaddlePaddle/Paddle/pulls/${GIT_PR_ID}/reviews?per_page=10000`
APPROVALS=`echo ${approval_line}|python ${PADDLE_ROOT}/tools/check_pr_approval.py 1 22165420 52485244 6836917`
set +x
echo "current pr ${GIT_PR_ID} got approvals: ${APPROVALS}"
if [ "${APPROVALS}" == "FALSE" ]; then
echo "************************************"
......@@ -1209,7 +1209,6 @@ function main() {
run_mac_test ${PYTHON_ABI:-""} ${PROC_RUN:-1}
;;
maccheck_py35)
check_approvals_of_unittest 1
cmake_gen ${PYTHON_ABI:-""}
build_mac
run_mac_test ${PYTHON_ABI:-""} ${PROC_RUN:-1}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册