@ -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() {
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)