Changeset 1069:b1b534ddb539 in lemon for test
- Timestamp:
- 08/04/11 21:19:55 (13 years ago)
- Branch:
- 1.1
- Parents:
- 1064:40bbb450143e (diff), 1067:54464584b157 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Phase:
- public
- Location:
- test
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
test/CMakeLists.txt
r1061 r1069 32 32 heap_test 33 33 kruskal_test 34 lgf_test 34 35 maps_test 35 36 matching_test -
test/CMakeLists.txt
r1067 r1069 1 1 INCLUDE_DIRECTORIES( 2 ${ CMAKE_SOURCE_DIR}2 ${PROJECT_SOURCE_DIR} 3 3 ${PROJECT_BINARY_DIR} 4 4 ) 5 5 6 LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon) 6 LINK_DIRECTORIES( 7 ${PROJECT_BINARY_DIR}/lemon 8 ) 9 10 SET(TEST_WITH_VALGRIND "NO" CACHE STRING 11 "Run the test with valgrind (YES/NO).") 12 SET(VALGRIND_FLAGS "" CACHE STRING "Valgrind flags used by the tests.") 7 13 8 14 SET(TESTS 15 adaptors_test 9 16 bfs_test 17 circulation_test 18 connectivity_test 10 19 counter_test 11 20 dfs_test … … 13 22 dijkstra_test 14 23 dim_test 24 edge_set_test 15 25 error_test 26 euler_test 27 gomory_hu_test 16 28 graph_copy_test 17 29 graph_test 18 30 graph_utils_test 31 hao_orlin_test 19 32 heap_test 20 33 kruskal_test 21 34 lgf_test 22 35 maps_test 36 matching_test 37 min_cost_arborescence_test 38 min_cost_flow_test 39 path_test 40 preflow_test 41 radix_sort_test 23 42 random_test 24 path_test43 suurballe_test 25 44 time_measure_test 26 unionfind_test) 45 unionfind_test 46 ) 47 48 IF(LEMON_HAVE_LP) 49 IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") 50 ADD_EXECUTABLE(lp_test lp_test.cc) 51 ELSE() 52 ADD_EXECUTABLE(lp_test EXCLUDE_FROM_ALL lp_test.cc) 53 ENDIF() 54 55 SET(LP_TEST_LIBS lemon) 56 57 IF(LEMON_HAVE_GLPK) 58 SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES}) 59 ENDIF() 60 IF(LEMON_HAVE_CPLEX) 61 SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES}) 62 ENDIF() 63 IF(LEMON_HAVE_CLP) 64 SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES}) 65 ENDIF() 66 67 TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS}) 68 ADD_TEST(lp_test lp_test) 69 ADD_DEPENDENCIES(check lp_test) 70 71 IF(WIN32 AND LEMON_HAVE_GLPK) 72 GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) 73 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) 74 ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD 75 COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} 76 COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} 77 COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} 78 ) 79 ENDIF() 80 81 IF(WIN32 AND LEMON_HAVE_CPLEX) 82 GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) 83 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) 84 ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD 85 COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} 86 ) 87 ENDIF() 88 ENDIF() 89 90 IF(LEMON_HAVE_MIP) 91 IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") 92 ADD_EXECUTABLE(mip_test mip_test.cc) 93 ELSE() 94 ADD_EXECUTABLE(mip_test EXCLUDE_FROM_ALL mip_test.cc) 95 ENDIF() 96 97 SET(MIP_TEST_LIBS lemon) 98 99 IF(LEMON_HAVE_GLPK) 100 SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES}) 101 ENDIF() 102 IF(LEMON_HAVE_CPLEX) 103 SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES}) 104 ENDIF() 105 IF(LEMON_HAVE_CBC) 106 SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES}) 107 ENDIF() 108 109 TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS}) 110 ADD_TEST(mip_test mip_test) 111 ADD_DEPENDENCIES(check mip_test) 112 113 IF(WIN32 AND LEMON_HAVE_GLPK) 114 GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) 115 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) 116 ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD 117 COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} 118 COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} 119 COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} 120 ) 121 ENDIF() 122 123 IF(WIN32 AND LEMON_HAVE_CPLEX) 124 GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) 125 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) 126 ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD 127 COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} 128 ) 129 ENDIF() 130 ENDIF() 27 131 28 132 FOREACH(TEST_NAME ${TESTS}) 29 ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc) 133 IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") 134 ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc) 135 ELSE() 136 ADD_EXECUTABLE(${TEST_NAME} EXCLUDE_FROM_ALL ${TEST_NAME}.cc) 137 ENDIF() 30 138 TARGET_LINK_LIBRARIES(${TEST_NAME} lemon) 31 ADD_TEST(${TEST_NAME} ${TEST_NAME}) 32 ENDFOREACH(TEST_NAME) 139 IF(TEST_WITH_VALGRIND) 140 ADD_TEST(${TEST_NAME} 141 valgrind --error-exitcode=1 ${VALGRIND_FLAGS} 142 ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME} ) 143 ELSE() 144 ADD_TEST(${TEST_NAME} ${TEST_NAME}) 145 ENDIF() 146 ADD_DEPENDENCIES(check ${TEST_NAME}) 147 ENDFOREACH() -
test/Makefile.am
r696 r1069 26 26 test/heap_test \ 27 27 test/kruskal_test \ 28 test/lgf_test \ 28 29 test/maps_test \ 29 30 test/matching_test \ … … 68 69 test_graph_test_SOURCES = test/graph_test.cc 69 70 test_graph_utils_test_SOURCES = test/graph_utils_test.cc 71 test_hao_orlin_test_SOURCES = test/hao_orlin_test.cc 70 72 test_heap_test_SOURCES = test/heap_test.cc 71 73 test_kruskal_test_SOURCES = test/kruskal_test.cc 72 test_ hao_orlin_test_SOURCES = test/hao_orlin_test.cc74 test_lgf_test_SOURCES = test/lgf_test.cc 73 75 test_lp_test_SOURCES = test/lp_test.cc 74 76 test_maps_test_SOURCES = test/maps_test.cc -
test/Makefile.am
r1067 r1069 4 4 noinst_HEADERS += \ 5 5 test/graph_test.h \ 6 6 test/test_tools.h 7 7 8 8 check_PROGRAMS += \ 9 test/adaptors_test \ 9 10 test/bfs_test \ 10 test/counter_test \ 11 test/circulation_test \ 12 test/connectivity_test \ 13 test/counter_test \ 11 14 test/dfs_test \ 12 15 test/digraph_test \ 13 16 test/dijkstra_test \ 14 test/dim_test \ 17 test/dim_test \ 18 test/edge_set_test \ 15 19 test/error_test \ 20 test/euler_test \ 21 test/gomory_hu_test \ 16 22 test/graph_copy_test \ 17 23 test/graph_test \ 18 24 test/graph_utils_test \ 25 test/hao_orlin_test \ 19 26 test/heap_test \ 20 27 test/kruskal_test \ 21 28 test/lgf_test \ 22 test/maps_test \ 23 test/random_test \ 24 test/path_test \ 25 test/test_tools_fail \ 26 test/test_tools_pass \ 27 test/time_measure_test \ 29 test/maps_test \ 30 test/matching_test \ 31 test/min_cost_arborescence_test \ 32 test/min_cost_flow_test \ 33 test/path_test \ 34 test/preflow_test \ 35 test/radix_sort_test \ 36 test/random_test \ 37 test/suurballe_test \ 38 test/test_tools_fail \ 39 test/test_tools_pass \ 40 test/time_measure_test \ 28 41 test/unionfind_test 42 43 test_test_tools_pass_DEPENDENCIES = demo 44 45 if HAVE_LP 46 check_PROGRAMS += test/lp_test 47 endif HAVE_LP 48 if HAVE_MIP 49 check_PROGRAMS += test/mip_test 50 endif HAVE_MIP 29 51 30 52 TESTS += $(check_PROGRAMS) 31 53 XFAIL_TESTS += test/test_tools_fail$(EXEEXT) 32 54 55 test_adaptors_test_SOURCES = test/adaptors_test.cc 33 56 test_bfs_test_SOURCES = test/bfs_test.cc 57 test_circulation_test_SOURCES = test/circulation_test.cc 34 58 test_counter_test_SOURCES = test/counter_test.cc 59 test_connectivity_test_SOURCES = test/connectivity_test.cc 35 60 test_dfs_test_SOURCES = test/dfs_test.cc 36 61 test_digraph_test_SOURCES = test/digraph_test.cc 37 62 test_dijkstra_test_SOURCES = test/dijkstra_test.cc 38 63 test_dim_test_SOURCES = test/dim_test.cc 64 test_edge_set_test_SOURCES = test/edge_set_test.cc 39 65 test_error_test_SOURCES = test/error_test.cc 66 test_euler_test_SOURCES = test/euler_test.cc 67 test_gomory_hu_test_SOURCES = test/gomory_hu_test.cc 40 68 test_graph_copy_test_SOURCES = test/graph_copy_test.cc 41 69 test_graph_test_SOURCES = test/graph_test.cc 42 70 test_graph_utils_test_SOURCES = test/graph_utils_test.cc 71 test_hao_orlin_test_SOURCES = test/hao_orlin_test.cc 43 72 test_heap_test_SOURCES = test/heap_test.cc 44 73 test_kruskal_test_SOURCES = test/kruskal_test.cc 45 74 test_lgf_test_SOURCES = test/lgf_test.cc 75 test_lp_test_SOURCES = test/lp_test.cc 46 76 test_maps_test_SOURCES = test/maps_test.cc 77 test_mip_test_SOURCES = test/mip_test.cc 78 test_matching_test_SOURCES = test/matching_test.cc 79 test_min_cost_arborescence_test_SOURCES = test/min_cost_arborescence_test.cc 80 test_min_cost_flow_test_SOURCES = test/min_cost_flow_test.cc 47 81 test_path_test_SOURCES = test/path_test.cc 82 test_preflow_test_SOURCES = test/preflow_test.cc 83 test_radix_sort_test_SOURCES = test/radix_sort_test.cc 84 test_suurballe_test_SOURCES = test/suurballe_test.cc 48 85 test_random_test_SOURCES = test/random_test.cc 49 86 test_test_tools_fail_SOURCES = test/test_tools_fail.cc
Note: See TracChangeset
for help on using the changeset viewer.