From 06b1a6a6805c43bd1415493c4d28c2f787fb7614 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Wed, 11 Jan 2017 11:39:07 +0800 Subject: [PATCH] Fix unittest --- paddle/capi/tests/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/paddle/capi/tests/CMakeLists.txt b/paddle/capi/tests/CMakeLists.txt index d81453982..d73f6b773 100644 --- a/paddle/capi/tests/CMakeLists.txt +++ b/paddle/capi/tests/CMakeLists.txt @@ -3,8 +3,12 @@ add_unittest(capi_test_mats test_Vector.cpp target_include_directories(capi_test_mats PUBLIC ${PADDLE_CAPI_INC_PATH}) target_link_libraries(capi_test_mats paddle_capi) -add_unittest(capi_test_gradientMachine test_GradientMachine.cpp) + +add_unittest_without_exec(capi_test_gradientMachine test_GradientMachine.cpp) target_include_directories(capi_test_gradientMachine PUBLIC ${PADDLE_CAPI_INC_PATH}) target_link_libraries(capi_test_gradientMachine paddle_capi) +add_test(NAME capi_test_gradientMachine + COMMAND ${PROJ_ROOT}/paddle/.set_python_path.sh -d ${PROJ_ROOT}/python ${CMAKE_CURRENT_BINARY_DIR}/capi_test_gradientMachine + WORKING_DIRECTORY ${PROJ_ROOT}/paddle/capi/tests) -- GitLab