CMakeLists.txt 2.6 KB
Newer Older
Z
zhangjinchao01 已提交
1 2 3 4
################# test_Compare ############################
add_unittest_without_exec(test_Compare
    test_Compare.cpp)
add_test(NAME test_Compare
5
  COMMAND ${PADDLE_SOURCE_DIR}/paddle/.set_python_path.sh -d ${PADDLE_SOURCE_DIR}/python
Z
zhangjinchao01 已提交
6
        ${CMAKE_CURRENT_BINARY_DIR}/test_Compare
7
    WORKING_DIRECTORY ${PADDLE_SOURCE_DIR}/paddle/)
Z
zhangjinchao01 已提交
8 9 10 11 12

################# test_Trainer ###########################
add_unittest_without_exec(test_Trainer
    test_Trainer.cpp)
add_test(NAME test_Trainer
13 14
  COMMAND ${PADDLE_SOURCE_DIR}/paddle/.set_python_path.sh -d ${PADDLE_SOURCE_DIR}/python/
        ${PADDLE_SOURCE_DIR}/paddle/.set_python_path.sh -d ${PADDLE_SOURCE_DIR}/python/
Z
zhangjinchao01 已提交
15
        ${CMAKE_CURRENT_BINARY_DIR}/test_Trainer
16
    WORKING_DIRECTORY ${PADDLE_SOURCE_DIR}/paddle/)
Z
zhangjinchao01 已提交
17 18

############### test_TrainerOnePass ##########################
19 20 21 22 23 24
if(WITH_PYTHON)
  # only run test_TrainerOnePass when PYTHON is enabled, because train one pass
  # is using PyDataProvider2.
  add_unittest_without_exec(test_TrainerOnePass
      test_TrainerOnePass.cpp)
  add_test(NAME test_TrainerOnePass
25 26 27 28
    COMMAND  ${PADDLE_SOURCE_DIR}/paddle/.set_python_path.sh -d
          ${PADDLE_SOURCE_DIR}/python/:${PADDLE_SOURCE_DIR}/paddle/trainer/tests
          ${PADDLE_SOURCE_DIR}/paddle/.set_port.sh -p port ${CMAKE_CURRENT_BINARY_DIR}/test_TrainerOnePass
      WORKING_DIRECTORY ${PADDLE_SOURCE_DIR}/paddle/)
29
endif()
Z
zhangjinchao01 已提交
30 31 32 33 34

################# test_recurrent_machine_generation ###############
add_unittest_without_exec(test_recurrent_machine_generation
    test_recurrent_machine_generation.cpp)
add_test(NAME test_recurrent_machine_generation
35
  COMMAND ${PADDLE_SOURCE_DIR}/paddle/.set_python_path.sh -d ${PADDLE_SOURCE_DIR}/python/
Z
zhangjinchao01 已提交
36
        ${CMAKE_CURRENT_BINARY_DIR}/test_recurrent_machine_generation
37
    WORKING_DIRECTORY ${PADDLE_SOURCE_DIR}/paddle/)
Z
zhangjinchao01 已提交
38 39 40 41 42 43

#################### test_PyDataProviderWrapper #########################
add_unittest_without_exec(test_PyDataProviderWrapper
    test_PyDataProviderWrapper.cpp)

add_test(NAME test_PyDataProviderWrapper
44 45
  COMMAND ${PADDLE_SOURCE_DIR}/paddle/.set_python_path.sh -d
        ${PADDLE_SOURCE_DIR}/python/:${PADDLE_SOURCE_DIR}/paddle/trainer/tests
Z
zhangjinchao01 已提交
46
        ${CMAKE_CURRENT_BINARY_DIR}/test_PyDataProviderWrapper
47
    WORKING_DIRECTORY ${PADDLE_SOURCE_DIR}/paddle/)
Z
zhangjinchao01 已提交
48 49 50

#################### test_config_parser #########################
add_test(NAME test_config_parser
51 52 53
  COMMAND ${PADDLE_SOURCE_DIR}/paddle/.set_python_path.sh -d ${PADDLE_SOURCE_DIR}/python/
        ${PYTHON_EXECUTABLE} ${PADDLE_SOURCE_DIR}/paddle/trainer/tests/config_parser_test.py
    WORKING_DIRECTORY ${PADDLE_SOURCE_DIR}/paddle/)