Skip to content

Commit 7f38146

Browse files
author
betterpig
committed
delete test code
1 parent 57d4b79 commit 7f38146

File tree

5 files changed

+44
-26
lines changed

5 files changed

+44
-26
lines changed

ci_scripts/check_api_cn.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ else
4646
for file in $need_check_files;do
4747
python chinese_samplecode_processor.py ../docs/$file
4848
if [ $? -ne 0 ];then
49-
echo "chinese sample code failed, the file is ${file}"
50-
exit 5
49+
EXIT_CODE=5
5150
fi
5251
done
52+
exit ${EXIT_CODE}
5353

5454
#if [ "${need_check_cn_doc_files}" != "" ];then
5555
# cd ../docs/paddle/api

ci_scripts/check_code.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ function check_style(){
5050
fi
5151
done
5252
if [ $commit_files == 'off' ];then
53-
echo "code format error"
53+
echo "======================================================================="
54+
echo "Code style check failed! Please check the error info above carefully."
55+
echo "======================================================================="
5456
exit 1
5557
fi
5658
trap 0

ci_scripts/checkapproval.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ for API_FILE in ${API_FILES[*]}; do
1616
fi
1717
if [ "${APPROVALS}" == "FALSE" ]; then
1818
if [ "${API_FILE}" == "docs/api/paddle" ];then
19+
set +x
20+
echo "=========================================================================================="
1921
echo "You must have one TPM (jzhang533/ZhangJun or dingjiaweiww/DingJiaWei or TCChenlong/ChenLong or Ligoml/LiMengLiu) approval for the api change! ${API_FILE} for the management reason of API interface and API document."
22+
echo "=========================================================================================="
23+
set -x
2024
fi
2125
exit 1
2226
fi

ci_scripts/ci_start.sh

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,7 @@ fi
3333
export PADDLE_WHL
3434
echo "PADDLE_WHL=${PADDLE_WHL}"
3535

36-
# 2 check code style/format.
37-
/bin/bash ${DIR_PATH}/check_code.sh
38-
if [ $? -ne 0 ];then
39-
echo "code format error"
40-
exit 1
41-
fi
42-
43-
need_check_cn_doc_files=$(find_all_cn_api_files_modified_by_pr)
44-
echo $need_check_cn_doc_files
45-
# 3 Chinese api docs check
46-
if [ "${need_check_cn_doc_files}" = "" ] ; then
47-
echo "chinese api doc fileslist is empty, skip check."
48-
else
49-
/bin/bash -x ${DIR_PATH}/check_api_cn.sh "${need_check_cn_doc_files}"
50-
if [ $? -ne 0 ];then
51-
exit 1
52-
fi
53-
fi
54-
55-
# 4 build all the Chinese and English docs, and upload them. Controlled with Env BUILD_DOC and UPLOAD_DOC
36+
# 2 build all the Chinese and English docs, and upload them. Controlled with Env BUILD_DOC and UPLOAD_DOC
5637
PREVIEW_URL_PROMPT="ipipe_log_param_preview_url: None"
5738
if [ "${BUILD_DOC}" = "true" ] && [ -x /usr/local/bin/sphinx-build ] ; then
5839
export OUTPUTDIR=/docs
@@ -98,8 +79,10 @@ if [ "${BUILD_DOC}" = "true" ] && [ -x /usr/local/bin/sphinx-build ] ; then
9879
fi
9980
fi
10081

101-
if [ "${need_check_cn_doc_files}" = "" ] ; then
102-
echo "chinese api doc fileslist is empty, skip check."
82+
check_parameters=OFF
83+
if [ "${check_parameters}" = "OFF" ] ; then
84+
#echo "chinese api doc fileslist is empty, skip check."
85+
echo "check_api_parameters is not stable, close it temporarily."
10386
else
10487
jsonfn=${OUTPUTDIR}/en/${VERSIONSTR}/gen_doc_output/api_info_all.json
10588
if [ -f $jsonfn ] ; then
@@ -113,6 +96,35 @@ else
11396
exit 1
11497
fi
11598
fi
99+
100+
EXIT_CODE=0
101+
# 3 check code style/format.
102+
/bin/bash ${DIR_PATH}/check_code.sh
103+
if [ $? -ne 0 ];then
104+
EXIT_CODE=1
105+
fi
106+
107+
need_check_cn_doc_files=$(find_all_cn_api_files_modified_by_pr)
108+
echo $need_check_cn_doc_files
109+
# 4 Chinese api docs check
110+
if [ "${need_check_cn_doc_files}" = "" ] ; then
111+
echo "chinese api doc fileslist is empty, skip check."
112+
else
113+
/bin/bash -x ${DIR_PATH}/check_api_cn.sh "${need_check_cn_doc_files}"
114+
if [ $? -ne 0 ];then
115+
EXIT_CODE=1
116+
fi
117+
fi
118+
119+
if [ ${EXIT_CODE} -ne 0 ]; then
120+
set +x
121+
echo "=========================================================================================="
122+
echo "Code style check or API Chinese doc check failed! Please check the error info above carefully."
123+
echo "=========================================================================================="
124+
set -x
125+
exit ${EXIT_CODE}
126+
fi
127+
116128
# 5 Approval check
117129
/bin/bash ${DIR_PATH}/checkapproval.sh
118130
if [ $? -ne 0 ];then

ci_scripts/utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function get_paddle_pr_num_from_docs_pr_info(){
7979
function install_paddle() {
8080
# try to download paddle, and install
8181
# PADDLE_WHL is defined in ci_start.sh
82-
pip install --no-cache-dir -i https://mirror.baidu.com/pypi/simple ${PADDLE_WHL}
82+
pip install --no-cache-dir -i https://mirror.baidu.com/pypi/simple ${PADDLE_WHL} 1>nul
8383
# if failed, build paddle
8484
if [ $? -ne 0 ];then
8585
build_paddle

0 commit comments

Comments
 (0)