]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #110 in SNORT/snort3 from stream_cmake_unittest_patch to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Fri, 30 Oct 2015 16:55:49 +0000 (12:55 -0400)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Fri, 30 Oct 2015 16:55:49 +0000 (12:55 -0400)
Squashed commit of the following:

commit 68198703ab394c60eba2755b3e06158e726f103f
Author: davis mcpherson <davis.mcpherson@gmail.com>
Date:   Thu Oct 29 21:15:43 2015 -0400

    update cmake build file to work with add_cpputest macro
    reanme test_tcp to test

src/stream/tcp/CMakeLists.txt
src/stream/tcp/test/CMakeLists.txt [new file with mode: 0644]
src/stream/tcp/test/Makefile.am [moved from src/stream/tcp/test_tcp/Makefile.am with 100% similarity]
src/stream/tcp/test/tcp_normalizer_test.cc [moved from src/stream/tcp/test_tcp/tcp_normalizer_test.cc with 100% similarity]
src/stream/tcp/test_tcp/CMakeLists.txt [deleted file]

index 8aff43d30a219682602f6b83ac3caa576ac0359e..0f3495e1801b9796fc7c7239ddd89a497f25a66f 100644 (file)
@@ -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 (file)
index 0000000..591124f
--- /dev/null
@@ -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/CMakeLists.txt b/src/stream/tcp/test_tcp/CMakeLists.txt
deleted file mode 100644 (file)
index 9d6a789..0000000
+++ /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)