未验证 提交 9f5108a6 编写于 作者: G gongweibao 提交者: GitHub

Add cicheck_brpc (#15468)

上级 eaad3e4c
......@@ -164,6 +164,9 @@ function cmake_gen() {
INFERENCE_DEMO_INSTALL_DIR=${INFERENCE_DEMO_INSTALL_DIR:-/root/.cache/inference_demo}
fi
distibuted_flag=${WITH_DISTRIBUTE:-OFF}
grpc_flag=${WITH_GRPC:-${distibuted_flag}}
cat <<EOF
========================================
Configuring cmake in /paddle/build ...
......@@ -173,7 +176,7 @@ function cmake_gen() {
-DWITH_DOC=${WITH_DOC:-OFF}
-DWITH_GPU=${WITH_GPU:-OFF}
-DWITH_AMD_GPU=${WITH_AMD_GPU:-OFF}
-DWITH_DISTRIBUTE=${WITH_DISTRIBUTE:-OFF}
-DWITH_DISTRIBUTE=${distibuted_flag}
-DWITH_MKL=${WITH_MKL:-ON}
-DWITH_NGRAPH=${WITH_NGRAPH:-OFF}
-DWITH_AVX=${WITH_AVX:-OFF}
......@@ -195,6 +198,7 @@ function cmake_gen() {
-DPY_VERSION=${PY_VERSION:-2.7}
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX:-/paddle/build}
-DWITH_JEMALLOC=${WITH_JEMALLOC:-OFF}
-DWITH_GRPC=${grpc_flag}
========================================
EOF
# Disable UNITTEST_USE_VIRTUALENV in docker because
......@@ -207,7 +211,7 @@ EOF
-DWITH_DOC=${WITH_DOC:-OFF} \
-DWITH_GPU=${WITH_GPU:-OFF} \
-DWITH_AMD_GPU=${WITH_AMD_GPU:-OFF} \
-DWITH_DISTRIBUTE=${WITH_DISTRIBUTE:-OFF} \
-DWITH_DISTRIBUTE=${distibuted_flag} \
-DWITH_MKL=${WITH_MKL:-ON} \
-DWITH_NGRAPH=${WITH_NGRAPH:-OFF} \
-DWITH_AVX=${WITH_AVX:-OFF} \
......@@ -227,7 +231,8 @@ EOF
-DANAKIN_BUILD_CROSS_PLANTFORM=${ANAKIN_BUILD_CROSS_PLANTFORM:ON}\
-DPY_VERSION=${PY_VERSION:-2.7} \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX:-/paddle/build} \
-DWITH_JEMALLOC=${WITH_JEMALLOC:-OFF}
-DWITH_JEMALLOC=${WITH_JEMALLOC:-OFF} \
-DWITH_GRPC=${grpc_flag}
}
......@@ -311,6 +316,45 @@ EOF
fi
}
function run_brpc_test() {
mkdir -p ${PADDLE_ROOT}/build
cd ${PADDLE_ROOT}/build
if [[ ${WITH_TESTING:-ON} == "ON" \
&& ${WITH_DISTRIBUTE:-OFF} == "ON" \
&& ${WITH_GRPC:-OFF} == "OFF" ]] ; then
cat <<EOF
========================================
Running brpc unit tests ...
========================================
EOF
set +x
declare -a other_tests=("test_listen_and_serv_op" "system_allocator_test")
all_tests=`ctest -N`
for t in "${other_tests[@]}"
do
if [[ ${all_tests} != *$t* ]]; then
continue
fi
if [[ ${TESTING_DEBUG_MODE:-OFF} == "ON" ]] ; then
ctest -V -R $t
else
ctest --output-on-failure -R $t
fi
done
set -x
if [[ ${TESTING_DEBUG_MODE:-OFF} == "ON" ]] ; then
ctest -V -R test_dist_*
else
ctest --output-on-failure -R test_dist_*
fi
fi
}
function run_mac_test() {
mkdir -p ${PADDLE_ROOT}/build
cd ${PADDLE_ROOT}/build
......@@ -788,6 +832,11 @@ function main() {
test_fluid_lib
assert_api_spec_approvals
;;
cicheck_brpc)
cmake_gen ${PYTHON_ABI:-""}
build
run_brpc_test
;;
assert_api)
assert_api_not_changed ${PYTHON_ABI:-""}
assert_api_spec_approvals
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册