From: Russ Combs (rucombs) Date: Fri, 30 Oct 2015 16:55:49 +0000 (-0400) Subject: Merge pull request #110 in SNORT/snort3 from stream_cmake_unittest_patch to master X-Git-Tag: 3.0.0-233~757 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df046c4fbe075a60e8ed0d15695f2d72db420fc7;p=thirdparty%2Fsnort3.git Merge pull request #110 in SNORT/snort3 from stream_cmake_unittest_patch to master Squashed commit of the following: commit 68198703ab394c60eba2755b3e06158e726f103f Author: davis mcpherson Date: Thu Oct 29 21:15:43 2015 -0400 update cmake build file to work with add_cpputest macro reanme test_tcp to test --- diff --git a/src/stream/tcp/CMakeLists.txt b/src/stream/tcp/CMakeLists.txt index 8aff43d30..0f3495e18 100644 --- a/src/stream/tcp/CMakeLists.txt +++ b/src/stream/tcp/CMakeLists.txt @@ -27,9 +27,3 @@ add_library( stream_tcp STATIC ips_stream_reassemble.cc ips_stream_size.cc ) - -if (BUILD_UNIT_TESTS) - add_subdirectory(test_tcp) -endif (BUILD_UNIT_TESTS) - - diff --git a/src/stream/tcp/test/CMakeLists.txt b/src/stream/tcp/test/CMakeLists.txt new file mode 100644 index 000000000..591124fea --- /dev/null +++ b/src/stream/tcp/test/CMakeLists.txt @@ -0,0 +1,9 @@ +include_directories( ../../../network_inspectors ) +add_library( stream_tcp_test + ../tcp_normalizer.cc + ../tcp_normalizers.cc + ../../../protocols/tcp_options.cc + ../../../main/snort_debug.cc +) + +add_cpputest( tcp_normalizer_test stream_tcp_test ) diff --git a/src/stream/tcp/test_tcp/Makefile.am b/src/stream/tcp/test/Makefile.am similarity index 100% rename from src/stream/tcp/test_tcp/Makefile.am rename to src/stream/tcp/test/Makefile.am diff --git a/src/stream/tcp/test_tcp/tcp_normalizer_test.cc b/src/stream/tcp/test/tcp_normalizer_test.cc similarity index 100% rename from src/stream/tcp/test_tcp/tcp_normalizer_test.cc rename to src/stream/tcp/test/tcp_normalizer_test.cc diff --git a/src/stream/tcp/test_tcp/CMakeLists.txt b/src/stream/tcp/test_tcp/CMakeLists.txt deleted file mode 100644 index 9d6a78903..000000000 --- a/src/stream/tcp/test_tcp/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -enable_testing() -add_executable( tcp_normalizer_test - tcp_normalizer_test.cc - ../tcp_normalizer.cc - ../tcp_normalizers.cc - ../../../protocols/tcp_options.cc - ../../../main/snort_debug.cc -) -target_link_libraries(tcp_normalizer_test ${LIBS}) -target_link_libraries(tcp_normalizer_test CppUTest ) -target_link_libraries(tcp_normalizer_test CppUTestExt ) -add_test(tcp_normalizer_test ${CMAKE_CURRENT_BINARY_DIR}/tcp_normalizer_test)