1
0
mirror of https://github.com/catchorg/Catch2.git synced 2025-01-16 15:18:00 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Martin Hořeňovský
115d6a1c40
Increase tolerances in --min-duration tests
The underpowered and oversubscribed CI servers are hell.
2020-07-07 11:36:56 +02:00
Martin Hořeňovský
91576352f9
Fixup single_include to be consistent with last tag
Closes #1975
2020-07-07 11:32:05 +02:00
3 changed files with 5 additions and 6 deletions

View File

@ -13,11 +13,11 @@ message( STATUS "Extra tests included" )
# The MinDuration reporting tests do not need separate compilation, but
# they have non-trivial execution time, so they are categorized as
# extra tests, so that they are run less.
add_test(NAME MinDuration::SimpleThreshold COMMAND $<TARGET_FILE:SelfTest> --min-duration 0.15 [min_duration_test])
add_test(NAME MinDuration::SimpleThreshold COMMAND $<TARGET_FILE:SelfTest> --min-duration 0.22 [min_duration_test])
set_tests_properties(
MinDuration::SimpleThreshold
PROPERTIES
PASS_REGULAR_EXPRESSION "s: sleep_for_200ms"
PASS_REGULAR_EXPRESSION "s: sleep_for_250ms"
FAIL_REGULAR_EXPRESSION "sleep_for_100ms"
RUN_SERIAL ON # The test is timing sensitive, so we want to run it
# serially to avoid false positives on oversubscribed machines
@ -38,7 +38,7 @@ add_test(NAME MinDuration::DurationOverrideNo COMMAND $<TARGET_FILE:SelfTest> --
set_tests_properties(
MinDuration::DurationOverrideNo
PROPERTIES
FAIL_REGULAR_EXPRESSION "sleep_for_200ms"
FAIL_REGULAR_EXPRESSION "sleep_for_250ms"
)

View File

@ -16,8 +16,8 @@ TEST_CASE( "sleep_for_100ms", "[.min_duration_test][approvals]" )
CHECK( true );
}
TEST_CASE( "sleep_for_200ms", "[.min_duration_test][approvals]" )
TEST_CASE( "sleep_for_250ms", "[.min_duration_test][approvals]" )
{
std::this_thread::sleep_for( std::chrono::milliseconds( 200 ) );
std::this_thread::sleep_for( std::chrono::milliseconds( 250 ) );
CHECK( true );
}

View File

@ -4522,7 +4522,6 @@ namespace Catch {
virtual int abortAfter() const = 0;
virtual bool showInvisibles() const = 0;
virtual ShowDurations::OrNot showDurations() const = 0;
virtual double minDuration() const = 0;
virtual TestSpec const& testSpec() const = 0;
virtual bool hasTestFilters() const = 0;
virtual std::vector<std::string> const& getTestsOrTags() const = 0;