Changeset 2414
- Timestamp:
- 03/12/10 21:32:22 (5 months ago)
- Location:
- trunk/test
- Files:
-
- 2 edited
-
CMakeLists.txt (modified) (2 diffs)
-
RunUnitTest.cmake.in (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/CMakeLists.txt
r2387 r2414 45 45 46 46 set(tcpreplay_tests replay_basic replay_cache replay_pps replay_rate replay_top 47 replay_config replay_multi replay_pps_multi )47 replay_config replay_multi replay_pps_multi replay_precache) 48 48 49 49 ######################################################### … … 76 76 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test 77 77 DEPENDS Tests.cmake 78 COMMENT "Run all unit tests" 78 79 VERBATIM) 80 foreach(__test @tcpprep_tests@ @tcpreplay_tests@ @tcprewrite_tests@) 81 add_custom_target(${__test}) 82 add_custom_command(TARGET ${__test} 83 COMMAND cmake -D RUN_SINGLE:STRING=${__test} -P Tests.cmake 84 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test 85 DEPENDS Tests.cmake 86 COMMENT "Run single unit test: ${__test}" 87 VERBATIM) 88 endforeach(__test) 79 89 80 90 # Add output files of tests to ADDITIONAL_MAKE_CLEAN_FILES -
trunk/test/RunUnitTest.cmake.in
r2271 r2414 47 47 set(replay_multi "-i @NIC1@ --multiplier=25.0 test.pcap") 48 48 set(replay_pps_multi "-i @NIC1@ --pps=100 --pps-multi=5 test.pcap") 49 set(replay_precache "-i @NIC1@ --preload-pcap test.pcap") 49 50 50 51 set(DIFF @DIFF@) … … 69 70 string(REPLACE __file__ ${output_file} new_command "${${__test}}") 70 71 endif(standard) 71 72 72 73 73 set(stderr "") 74 74 set(stdout "") 75 75 set(rcode 0) 76 77 76 78 77 if(__test MATCHES "rewrite_") 79 78 # tcprewrite test! … … 118 117 OUTPUT_STRIP_TRAILING_WHITESPACE) 119 118 endif(__test MATCHES "rewrite_") 120 119 121 120 if(NOT standard) 122 121 if(rcode EQUAL 0) … … 125 124 execute_process(COMMAND @DIFF@ ${standard_file} ${output_file} 126 125 RESULT_VARIABLE diff_rcode) 127 126 128 127 if(${diff_rcode} EQUAL 0) 129 128 message(STATUS "Running ${__test}: OK!") … … 135 134 endif(DIFF) 136 135 else(EXISTS ${output_file}) 137 message(STATUS "Running ${__test}: OK!") 136 message(STATUS "Running ${__test}: OK!") 138 137 endif(EXISTS ${output_file}) 139 138 140 139 else(rcode EQUAL 0) 141 140 message(STATUS "Running ${__test}: FAILED! Error code: ${rcode}")
Note: See TracChangeset
for help on using the changeset viewer.
