@@ -164,6 +164,9 @@ function cmake_gen() {
164
164
INFERENCE_DEMO_INSTALL_DIR=${INFERENCE_DEMO_INSTALL_DIR:-/ root/ .cache/ inference_demo}
165
165
fi
166
166
167
+ distibuted_flag=${WITH_DISTRIBUTE:- OFF}
168
+ grpc_flag=${WITH_GRPC:- ${distibuted_flag} }
169
+
167
170
cat << EOF
168
171
========================================
169
172
Configuring cmake in /paddle/build ...
@@ -173,7 +176,7 @@ function cmake_gen() {
173
176
-DWITH_DOC=${WITH_DOC:- OFF}
174
177
-DWITH_GPU=${WITH_GPU:- OFF}
175
178
-DWITH_AMD_GPU=${WITH_AMD_GPU:- OFF}
176
- -DWITH_DISTRIBUTE=${WITH_DISTRIBUTE :- OFF }
179
+ -DWITH_DISTRIBUTE=${distibuted_flag }
177
180
-DWITH_MKL=${WITH_MKL:- ON}
178
181
-DWITH_NGRAPH=${WITH_NGRAPH:- OFF}
179
182
-DWITH_AVX=${WITH_AVX:- OFF}
@@ -194,7 +197,8 @@ function cmake_gen() {
194
197
-DANAKIN_BUILD_CROSS_PLANTFORM=${ANAKIN_BUILD_CROSS_PLANTFORM: ON}
195
198
-DPY_VERSION=${PY_VERSION:- 2.7}
196
199
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX:-/ paddle/ build}
197
- -DWITH_JEMALLOC=${WITH_JEMALLOC:- OFF}
200
+ -DWITH_JEMALLOC=${WITH_JEMALLOC:- OFF}
201
+ -DWITH_GRPC=${grpc_flag}
198
202
========================================
199
203
EOF
200
204
# Disable UNITTEST_USE_VIRTUALENV in docker because
207
211
-DWITH_DOC=${WITH_DOC:- OFF} \
208
212
-DWITH_GPU=${WITH_GPU:- OFF} \
209
213
-DWITH_AMD_GPU=${WITH_AMD_GPU:- OFF} \
210
- -DWITH_DISTRIBUTE=${WITH_DISTRIBUTE :- OFF } \
214
+ -DWITH_DISTRIBUTE=${distibuted_flag } \
211
215
-DWITH_MKL=${WITH_MKL:- ON} \
212
216
-DWITH_NGRAPH=${WITH_NGRAPH:- OFF} \
213
217
-DWITH_AVX=${WITH_AVX:- OFF} \
227
231
-DANAKIN_BUILD_CROSS_PLANTFORM=${ANAKIN_BUILD_CROSS_PLANTFORM: ON} \
228
232
-DPY_VERSION=${PY_VERSION:- 2.7} \
229
233
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX:-/ paddle/ build} \
230
- -DWITH_JEMALLOC=${WITH_JEMALLOC:- OFF}
234
+ -DWITH_JEMALLOC=${WITH_JEMALLOC:- OFF} \
235
+ -DWITH_GRPC=${grpc_flag}
231
236
232
237
}
233
238
311
316
fi
312
317
}
313
318
319
+ function run_brpc_test() {
320
+ mkdir -p ${PADDLE_ROOT} /build
321
+ cd ${PADDLE_ROOT} /build
322
+ if [[ ${WITH_TESTING:- ON} == " ON" \
323
+ && ${WITH_DISTRIBUTE:- OFF} == " ON" \
324
+ && ${WITH_GRPC:- OFF} == " OFF" ]] ; then
325
+ cat << EOF
326
+ ========================================
327
+ Running brpc unit tests ...
328
+ ========================================
329
+ EOF
330
+ set +x
331
+ declare -a other_tests=(" test_listen_and_serv_op" " system_allocator_test" )
332
+ all_tests=` ctest -N`
333
+
334
+ for t in " ${other_tests[@]} "
335
+ do
336
+ if [[ ${all_tests} != * $t * ]]; then
337
+ continue
338
+ fi
339
+
340
+ if [[ ${TESTING_DEBUG_MODE:- OFF} == " ON" ]] ; then
341
+ ctest -V -R $t
342
+ else
343
+ ctest --output-on-failure -R $t
344
+ fi
345
+ done
346
+ set -x
347
+
348
+ if [[ ${TESTING_DEBUG_MODE:- OFF} == " ON" ]] ; then
349
+ ctest -V -R test_dist_*
350
+ else
351
+ ctest --output-on-failure -R test_dist_*
352
+ fi
353
+ fi
354
+ }
355
+
356
+
357
+
314
358
function run_mac_test() {
315
359
mkdir -p ${PADDLE_ROOT} /build
316
360
cd ${PADDLE_ROOT} /build
@@ -788,6 +832,11 @@ function main() {
788
832
test_fluid_lib
789
833
assert_api_spec_approvals
790
834
;;
835
+ cicheck_brpc)
836
+ cmake_gen ${PYTHON_ABI:- " " }
837
+ build
838
+ run_brpc_test
839
+ ;;
791
840
assert_api)
792
841
assert_api_not_changed ${PYTHON_ABI:- " " }
793
842
assert_api_spec_approvals
0 commit comments