CMakeLists.txt 3.9 KB
Newer Older
Z
zhangjinchao01 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
################# test_Prediction ######################
add_unittest_without_exec(test_Prediction
    test_Prediction.cpp)
add_test(NAME test_Prediction
  COMMAND ${PROJ_ROOT}/paddle/.set_python_path.sh -d ${PROJ_ROOT}/python
        ${CMAKE_CURRENT_BINARY_DIR}/test_Prediction --merger=${CMAKE_CURRENT_BINARY_DIR}/../paddle_merge_model
    WORKING_DIRECTORY ${PROJ_ROOT}/paddle/)

################# test_Compare ############################
add_unittest_without_exec(test_Compare
    test_Compare.cpp)
add_test(NAME test_Compare
  COMMAND ${PROJ_ROOT}/paddle/.set_python_path.sh -d ${PROJ_ROOT}/python
        ${CMAKE_CURRENT_BINARY_DIR}/test_Compare
    WORKING_DIRECTORY ${PROJ_ROOT}/paddle/)

################# test_Trainer ###########################
add_unittest_without_exec(test_Trainer
    test_Trainer.cpp)
set(diy_dll_dir ${CMAKE_CURRENT_BINARY_DIR}/../../gserver/tests)
add_test(NAME test_Trainer
  COMMAND ${PROJ_ROOT}/paddle/.set_python_path.sh -d ${PROJ_ROOT}/python/
        ${CMAKE_CURRENT_BINARY_DIR}/test_Trainer
    WORKING_DIRECTORY ${PROJ_ROOT}/paddle/)

############### test_TrainerOnePass ##########################
add_unittest_without_exec(test_TrainerOnePass
    test_TrainerOnePass.cpp)
add_test(NAME test_TrainerOnePass
  COMMAND  ${PROJ_ROOT}/paddle/.set_python_path.sh -d ${PROJ_ROOT}/python/
        ${PROJ_ROOT}/paddle/.set_port.sh -p port ${CMAKE_CURRENT_BINARY_DIR}/test_TrainerOnePass
    WORKING_DIRECTORY ${PROJ_ROOT}/paddle/)

################ test_CompareTwoNets ######################
add_unittest_without_exec(test_CompareTwoNets
    test_CompareTwoNets.cpp)
add_test(NAME test_CompareTwoNets
  COMMAND ${PROJ_ROOT}/paddle/.set_python_path.sh -d ${PROJ_ROOT}/python/
        ${CMAKE_CURRENT_BINARY_DIR}/test_CompareTwoNets
            --config_file_a=trainer/tests/sample_trainer_config_qb_rnn.conf --config_file_b=trainer/tests/sample_trainer_config_rnn.conf
    WORKING_DIRECTORY ${PROJ_ROOT}/paddle/)

############### test_CompareTwoOpts ###################
add_unittest_without_exec(test_CompareTwoOpts
    test_CompareTwoOpts.cpp)
add_test(NAME test_CompareTwoOpts
  COMMAND ${PROJ_ROOT}/paddle/.set_python_path.sh -d ${PROJ_ROOT}/python/
        ${CMAKE_CURRENT_BINARY_DIR}/test_CompareTwoOpts
            --config_file_a=trainer/tests/sample_trainer_config_opt_a.conf --config_file_b=trainer/tests/sample_trainer_config_opt_b.conf
50
            --num_passes=1 --need_high_accuracy=0
Z
zhangjinchao01 已提交
51 52 53 54 55
    WORKING_DIRECTORY ${PROJ_ROOT}/paddle/)

################# test_CompareSparse ##################
add_unittest_without_exec(test_CompareSparse
    test_CompareSparse.cpp)
Y
Yu Yang 已提交
56 57 58 59 60
if(NOT ON_TRAVIS)
  add_test(NAME test_CompareSparse
    COMMAND ${PROJ_ROOT}/paddle/.set_python_path.sh -d ${PROJ_ROOT}/python/
              ./.set_port.sh -p port -n 6
                  ${CMAKE_CURRENT_BINARY_DIR}/test_CompareSparse
Z
zhangjinchao01 已提交
61
    WORKING_DIRECTORY ${PROJ_ROOT}/paddle/)
Y
Yu Yang 已提交
62
endif()
Z
zhangjinchao01 已提交
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
################# test_recurrent_machine_generation ###############
add_unittest_without_exec(test_recurrent_machine_generation
    test_recurrent_machine_generation.cpp)
add_test(NAME test_recurrent_machine_generation
  COMMAND ${PROJ_ROOT}/paddle/.set_python_path.sh -d ${PROJ_ROOT}/python/
        ${CMAKE_CURRENT_BINARY_DIR}/test_recurrent_machine_generation
    WORKING_DIRECTORY ${PROJ_ROOT}/paddle/)

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

add_test(NAME test_PyDataProviderWrapper
  COMMAND ${PROJ_ROOT}/paddle/.set_python_path.sh -d
        ${PROJ_ROOT}/python/:${PROJ_ROOT}/paddle/trainer/tests
        ${CMAKE_CURRENT_BINARY_DIR}/test_PyDataProviderWrapper
    WORKING_DIRECTORY ${PROJ_ROOT}/paddle/)

#################### test_config_parser #########################
add_test(NAME test_config_parser
  COMMAND ${PROJ_ROOT}/paddle/.set_python_path.sh -d ${PROJ_ROOT}/python/
        python ${PROJ_ROOT}/paddle/trainer/tests/config_parser_test.py
    WORKING_DIRECTORY ${PROJ_ROOT}/paddle/)