diff --git a/CHANGELOG.md b/CHANGELOG.md index 359160f0..0e87078a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Version 61: * Add multi_port to server-framework * Tidy up resolver calls * Use one job on CI +* Don't run slow tests on certain targets API Changes: diff --git a/CMakeLists.txt b/CMakeLists.txt index 34e58d31..59e8cf59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,13 +103,13 @@ endfunction() if ("${VARIANT}" STREQUAL "coverage") set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -DBEAST_NO_BUFFER_BENCH=1 -fprofile-arcs -ftest-coverage") + "${CMAKE_CXX_FLAGS} -DBEAST_NO_SLOW_TESTS=1 -fprofile-arcs -ftest-coverage") set (CMAKE_BUILD_TYPE RELWITHDEBINFO) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov") elseif ("${VARIANT}" STREQUAL "ubasan") set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -DBEAST_NO_BUFFER_BENCH=1 -funsigned-char -fno-omit-frame-pointer -fsanitize=address,undefined -fsanitize-blacklist=${PROJECT_SOURCE_DIR}/scripts/blacklist.supp") + "${CMAKE_CXX_FLAGS} -DBEAST_NO_SLOW_TESTS=1 -funsigned-char -fno-omit-frame-pointer -fsanitize=address,undefined -fsanitize-blacklist=${PROJECT_SOURCE_DIR}/scripts/blacklist.supp") set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address,undefined") set(CMAKE_BUILD_TYPE RELWITHDEBINFO) diff --git a/Jamroot b/Jamroot index bc67dc5f..114ce53a 100644 --- a/Jamroot +++ b/Jamroot @@ -56,7 +56,7 @@ variant coverage : release : - "-DBEAST_NO_BUFFER_BENCH=1 -fprofile-arcs -ftest-coverage" + "-DBEAST_NO_SLOW_TESTS=1 -fprofile-arcs -ftest-coverage" "-lgcov" ; @@ -64,7 +64,7 @@ variant ubasan : release : - "-DBEAST_NO_BUFFER_BENCH=1 -funsigned-char -fno-omit-frame-pointer -fsanitize=address,undefined -fsanitize-blacklist=scripts/blacklist.supp" + "-DBEAST_NO_SLOW_TESTS=1 -funsigned-char -fno-omit-frame-pointer -fsanitize=address,undefined -fsanitize-blacklist=scripts/blacklist.supp" "-fsanitize=address,undefined" ; diff --git a/test/core/buffer_bench.cpp b/test/core/buffer_bench.cpp index cf02edfe..8e22d5d6 100644 --- a/test/core/buffer_bench.cpp +++ b/test/core/buffer_bench.cpp @@ -233,7 +233,7 @@ public: } }; -#if defined(NDEBUG) && ! BEAST_NO_BUFFER_BENCH +#if defined(NDEBUG) && ! BEAST_NO_SLOW_TESTS BEAST_DEFINE_TESTSUITE(buffer_bench,core,beast); #endif diff --git a/test/websocket/stream.cpp b/test/websocket/stream.cpp index 91f06a7a..76efc091 100644 --- a/test/websocket/stream.cpp +++ b/test/websocket/stream.cpp @@ -1912,6 +1912,7 @@ public: pmd.server_enable = false; doClientTests(pmd); + #if ! BEAST_NO_SLOW_TESTS pmd.client_enable = true; pmd.server_enable = true; pmd.client_max_window_bits = 10; @@ -1923,6 +1924,7 @@ public: pmd.client_max_window_bits = 10; pmd.client_no_context_takeover = true; doClientTests(pmd); + #endif } }; diff --git a/test/websocket/utf8_checker.cpp b/test/websocket/utf8_checker.cpp index bbc9c3e3..558d9f6d 100644 --- a/test/websocket/utf8_checker.cpp +++ b/test/websocket/utf8_checker.cpp @@ -403,7 +403,9 @@ public: } }; +#if defined(NDEBUG) && ! BEAST_NO_SLOW_TESTS BEAST_DEFINE_TESTSUITE(utf8_checker,websocket,beast); +#endif } // detail } // websocket diff --git a/test/zlib/deflate_stream.cpp b/test/zlib/deflate_stream.cpp index a8276592..c1b2b38f 100644 --- a/test/zlib/deflate_stream.cpp +++ b/test/zlib/deflate_stream.cpp @@ -305,6 +305,7 @@ public: { doMatrix("1.beast ", "Hello, world!", &self::doDeflate1_beast); doMatrix("1.zlib ", "Hello, world!", &self::doDeflate1_zlib); + #if ! BEAST_NO_SLOW_TESTS doMatrix("2.beast ", "Hello, world!", &self::doDeflate2_beast); doMatrix("2.zlib ", "Hello, world!", &self::doDeflate2_zlib); { @@ -317,6 +318,7 @@ public: doMatrix("4.beast ", s, &self::doDeflate1_beast); doMatrix("4.zlib ", s, &self::doDeflate1_zlib); } + #endif } void diff --git a/test/zlib/inflate_stream.cpp b/test/zlib/inflate_stream.cpp index 31f14ac5..1af12d7f 100644 --- a/test/zlib/inflate_stream.cpp +++ b/test/zlib/inflate_stream.cpp @@ -325,6 +325,8 @@ public: m("1. beast", Beast{half, half}, check); m("1. zlib ", ZLib {half, half}, check); } + + #if ! BEAST_NO_SLOW_TESTS { Matrix m{*this}; auto const check = corpus1(50000); @@ -380,6 +382,7 @@ public: m("8. beast", Beast{full, once, Flush::block}, check); m("8. zlib ", ZLib {full, once, Z_BLOCK}, check); } + #endif // VFALCO Fails, but I'm unsure of what the correct // behavior of Z_TREES/Flush::trees is.