未验证 提交 d067e66d 编写于 作者: L LoveAn 提交者: GitHub

Show more possible problems with build_and_check in file paddle_build.sh (#26846)

* Show more possible problems with build_and_check in file paddle_build.sh, test=develop

* Remove test codes modified in file device.py for build_and_check, test=document_fix

* Fix missing blank space in file device.py, test=document_fix

* Final process via summary_check_problems function, test=document_fix
上级 d0962abd
...@@ -1395,6 +1395,26 @@ function example() { ...@@ -1395,6 +1395,26 @@ function example() {
fi fi
} }
function summary_check_problems() {
set +x
local check_style_code=$1
local example_code=$2
if [ $check_style_code -ne 0 -o $example_code -ne 0 ];then
echo "========================================"
echo "summary problems:"
echo "========================================"
if [ $check_style_code -ne 0 ];then
echo "- Check code style failed! Please check the log and fix problems."
fi
if [ $example_code -ne 0 ];then
echo "- Check example code failed! Please check the log and fix problems."
fi
[ $check_style_code -ne 0 ] && exit $check_style_code
[ $example_code -ne 0 ] && exit $example_code
fi
set -x
}
function main() { function main() {
local CMD=$1 local CMD=$1
local parallel_number=$2 local parallel_number=$2
...@@ -1407,12 +1427,15 @@ function main() { ...@@ -1407,12 +1427,15 @@ function main() {
cmake_gen_and_build ${PYTHON_ABI:-""} ${parallel_number} cmake_gen_and_build ${PYTHON_ABI:-""} ${parallel_number}
;; ;;
build_and_check) build_and_check)
check_style $(check_style >&2)
check_style_code=$?
generate_upstream_develop_api_spec ${PYTHON_ABI:-""} ${parallel_number} generate_upstream_develop_api_spec ${PYTHON_ABI:-""} ${parallel_number}
cmake_gen_and_build ${PYTHON_ABI:-""} ${parallel_number} cmake_gen_and_build ${PYTHON_ABI:-""} ${parallel_number}
check_sequence_op_unittest check_sequence_op_unittest
generate_api_spec ${PYTHON_ABI:-""} "PR" generate_api_spec ${PYTHON_ABI:-""} "PR"
example $(example >&2)
example_code=$?
summary_check_problems $check_style_code $example_code
assert_api_spec_approvals assert_api_spec_approvals
;; ;;
build) build)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册