Don't run slow tests on certain targets

This commit is contained in:
Vinnie Falco
2017-06-19 08:34:14 -07:00
parent 2ee6646c60
commit abed397bc0
8 changed files with 15 additions and 5 deletions

View File

@ -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:

View File

@ -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)

View File

@ -56,7 +56,7 @@ variant coverage
:
release
:
<cxxflags>"-DBEAST_NO_BUFFER_BENCH=1 -fprofile-arcs -ftest-coverage"
<cxxflags>"-DBEAST_NO_SLOW_TESTS=1 -fprofile-arcs -ftest-coverage"
<linkflags>"-lgcov"
;
@ -64,7 +64,7 @@ variant ubasan
:
release
:
<cxxflags>"-DBEAST_NO_BUFFER_BENCH=1 -funsigned-char -fno-omit-frame-pointer -fsanitize=address,undefined -fsanitize-blacklist=scripts/blacklist.supp"
<cxxflags>"-DBEAST_NO_SLOW_TESTS=1 -funsigned-char -fno-omit-frame-pointer -fsanitize=address,undefined -fsanitize-blacklist=scripts/blacklist.supp"
<linkflags>"-fsanitize=address,undefined"
;

View File

@ -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

View File

@ -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
}
};

View File

@ -403,7 +403,9 @@ public:
}
};
#if defined(NDEBUG) && ! BEAST_NO_SLOW_TESTS
BEAST_DEFINE_TESTSUITE(utf8_checker,websocket,beast);
#endif
} // detail
} // websocket

View File

@ -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

View File

@ -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.