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

fix ci rule to show Shell variables (#22177)

上级 433973d6
...@@ -520,15 +520,15 @@ function generate_api_spec() { ...@@ -520,15 +520,15 @@ function generate_api_spec() {
} }
function check_approvals_of_unittest() { function check_approvals_of_unittest() {
set +x
if [ "$GITHUB_API_TOKEN" == "" ] || [ "$GIT_PR_ID" == "" ]; then if [ "$GITHUB_API_TOKEN" == "" ] || [ "$GIT_PR_ID" == "" ]; then
return 0 return 0
fi fi
# approval_user_list: XiaoguangHu01 46782768,luotao1 6836917,phlrain 43953930,lanxianghit 47554610, zhouwei25 52485244, kolinwei 22165420 # 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 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` 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}" echo "current pr ${GIT_PR_ID} got approvals: ${APPROVALS}"
if [ "${APPROVALS}" == "TRUE" ]; then if [ "${APPROVALS}" == "TRUE" ]; then
echo "===================================" echo "==================================="
...@@ -536,12 +536,12 @@ function check_approvals_of_unittest() { ...@@ -536,12 +536,12 @@ function check_approvals_of_unittest() {
echo "===================================" echo "==================================="
exit 0 exit 0
fi fi
elif [ $1 == 2 ]; then elif [ $check_times == 2 ]; then
set -x
unittest_spec_diff=`python ${PADDLE_ROOT}/tools/diff_unittest.py ${PADDLE_ROOT}/paddle/fluid/UNITTEST_DEV.spec ${PADDLE_ROOT}/paddle/fluid/UNITTEST_PR.spec` 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 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` 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}" echo "current pr ${GIT_PR_ID} got approvals: ${APPROVALS}"
if [ "${APPROVALS}" == "FALSE" ]; then if [ "${APPROVALS}" == "FALSE" ]; then
echo "************************************" echo "************************************"
...@@ -1209,7 +1209,6 @@ function main() { ...@@ -1209,7 +1209,6 @@ function main() {
run_mac_test ${PYTHON_ABI:-""} ${PROC_RUN:-1} run_mac_test ${PYTHON_ABI:-""} ${PROC_RUN:-1}
;; ;;
maccheck_py35) maccheck_py35)
check_approvals_of_unittest 1
cmake_gen ${PYTHON_ABI:-""} cmake_gen ${PYTHON_ABI:-""}
build_mac build_mac
run_mac_test ${PYTHON_ABI:-""} ${PROC_RUN:-1} 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.
先完成此消息的编辑!
想要评论请 注册