From 3ff585d36e23e1601574b477339a5f01b8b63699 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Tue, 20 Jun 2017 16:56:28 -0700 Subject: [PATCH] Only run the tests under ubasan --- CMakeLists.txt | 6 +-- test/CMakeLists.txt | 9 ++-- test/benchmarks/CMakeLists.txt | 40 ++++++++--------- test/server/CMakeLists.txt | 78 ++++++++++++++++------------------ 4 files changed, 64 insertions(+), 69 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 48b73232..1758403e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -191,8 +191,8 @@ file(GLOB_RECURSE SERVER_INCLUDES ) add_subdirectory (test) -if (NOT "${VARIANT}" STREQUAL "coverage") + +if ((NOT "${VARIANT}" STREQUAL "coverage") AND + (NOT "${VARIANT}" STREQUAL "ubasan")) add_subdirectory (example) endif() - - diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 701c9687..1f934e98 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,13 +1,16 @@ # Part of Beast -add_subdirectory (benchmarks) add_subdirectory (core) add_subdirectory (http) -add_subdirectory (server) add_subdirectory (websocket) add_subdirectory (zlib) -if (NOT "${VARIANT}" STREQUAL "coverage") +if ((NOT "${VARIANT}" STREQUAL "coverage") AND + (NOT "${VARIANT}" STREQUAL "ubasan")) + + add_subdirectory (benchmarks) + add_subdirectory (server) + GroupSources(extras/beast extras) GroupSources(include/beast beast) GroupSources(test "/") diff --git a/test/benchmarks/CMakeLists.txt b/test/benchmarks/CMakeLists.txt index 59773639..8cead07b 100644 --- a/test/benchmarks/CMakeLists.txt +++ b/test/benchmarks/CMakeLists.txt @@ -1,27 +1,23 @@ # Part of Beast -if (NOT "${VARIANT}" STREQUAL "coverage") +GroupSources(extras/beast extras) +GroupSources(include/beast beast) +GroupSources(test/benchmarks "/") +GroupSources(test/http "/") - GroupSources(extras/beast extras) - GroupSources(include/beast beast) - GroupSources(test/benchmarks "/") - GroupSources(test/http "/") +add_executable (benchmarks + ${BEAST_INCLUDES} + ${EXTRAS_INCLUDES} + ../../extras/beast/unit_test/main.cpp + ../http/message_fuzz.hpp + nodejs_parser.hpp + buffers.cpp + nodejs_parser.cpp + parser.cpp +) - add_executable (benchmarks - ${BEAST_INCLUDES} - ${EXTRAS_INCLUDES} - ../../extras/beast/unit_test/main.cpp - ../http/message_fuzz.hpp - nodejs_parser.hpp - buffers.cpp - nodejs_parser.cpp - parser.cpp +target_link_libraries(benchmarks + Beast + ${Boost_PROGRAM_OPTIONS_LIBRARY} + ${Boost_FILESYSTEM_LIBRARY} ) - - target_link_libraries(benchmarks - Beast - ${Boost_PROGRAM_OPTIONS_LIBRARY} - ${Boost_FILESYSTEM_LIBRARY} - ) - -endif() diff --git a/test/server/CMakeLists.txt b/test/server/CMakeLists.txt index 4989f4f7..73b73dce 100644 --- a/test/server/CMakeLists.txt +++ b/test/server/CMakeLists.txt @@ -1,50 +1,46 @@ # Part of Beast -if (NOT "${VARIANT}" STREQUAL "coverage") +GroupSources(example/server-framework framework) +GroupSources(extras/beast extras) +GroupSources(include/beast beast) - GroupSources(example/server-framework framework) - GroupSources(extras/beast extras) - GroupSources(include/beast beast) +GroupSources(test/server "/") - GroupSources(test/server "/") +if (OPENSSL_FOUND) + include_directories(${OPENSSL_INCLUDE_DIR}) +endif() - if (OPENSSL_FOUND) - include_directories(${OPENSSL_INCLUDE_DIR}) - endif() +add_executable (server-test + ${BEAST_INCLUDES} + ${SERVER_INCLUDES} + ../../extras/beast/unit_test/main.cpp + file_body.cpp + file_service.cpp + framework.cpp + http_async_port.cpp + http_base.cpp + http_sync_port.cpp + https_ports.cpp + multi_port.cpp + rfc7231.cpp + server.cpp + service_list.cpp + ssl_certificate + ssl_stream.cpp + tests.cpp + write_msg.cpp + ws_async_port.cpp + ws_sync_port.cpp + ws_upgrade_service.cpp + wss_ports.cpp +) - add_executable (server-test - ${BEAST_INCLUDES} - ${SERVER_INCLUDES} - ../../extras/beast/unit_test/main.cpp - file_body.cpp - file_service.cpp - framework.cpp - http_async_port.cpp - http_base.cpp - http_sync_port.cpp - https_ports.cpp - multi_port.cpp - rfc7231.cpp - server.cpp - service_list.cpp - ssl_certificate - ssl_stream.cpp - tests.cpp - write_msg.cpp - ws_async_port.cpp - ws_sync_port.cpp - ws_upgrade_service.cpp - wss_ports.cpp +target_link_libraries(server-test + Beast + ${Boost_PROGRAM_OPTIONS_LIBRARY} + ${Boost_FILESYSTEM_LIBRARY} ) - target_link_libraries(server-test - Beast - ${Boost_PROGRAM_OPTIONS_LIBRARY} - ${Boost_FILESYSTEM_LIBRARY} - ) - - if (OPENSSL_FOUND) - target_link_libraries(server-test ${OPENSSL_LIBRARIES}) - endif() - +if (OPENSSL_FOUND) + target_link_libraries(server-test ${OPENSSL_LIBRARIES}) endif()