mirror of
https://github.com/catchorg/Catch2.git
synced 2025-01-15 22:58:02 +00:00
Compare commits
3 Commits
1ee0940427
...
3afea8128a
Author | SHA1 | Date | |
---|---|---|---|
|
3afea8128a | ||
|
749d953712 | ||
|
4b50b13970 |
21
.github/workflows/linux-builds.yml
vendored
21
.github/workflows/linux-builds.yml
vendored
@ -38,6 +38,17 @@ jobs:
|
||||
std: 14
|
||||
other_pkgs: clang-10
|
||||
surrogates: ON
|
||||
# Clang 10 + C++17
|
||||
- cxx: clang++-10
|
||||
build_type: Debug
|
||||
std: 17
|
||||
other_pkgs: clang-10
|
||||
surrogates: OFF
|
||||
- cxx: clang++-10
|
||||
build_type: Release
|
||||
std: 17
|
||||
other_pkgs: clang-10
|
||||
surrogates: OFF
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -53,9 +64,13 @@ jobs:
|
||||
# Note: $GITHUB_WORKSPACE is distinct from ${{runner.workspace}}.
|
||||
# This is important
|
||||
run: |
|
||||
cmake -Bbuild -H$GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
|
||||
-DCMAKE_CXX_STANDARD=${{matrix.std}} -DCATCH_DEVELOPMENT_BUILD=ON \
|
||||
-DCATCH_BUILD_SURROGATES=${{matrix.surrogates}} -G Ninja
|
||||
cmake -Bbuild -H$GITHUB_WORKSPACE \
|
||||
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
|
||||
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
|
||||
-DCMAKE_CXX_EXTENSIONS=OFF \
|
||||
-DCATCH_DEVELOPMENT_BUILD=ON \
|
||||
-DCATCH_BUILD_SURROGATES=${{matrix.surrogates}} \
|
||||
-G Ninja
|
||||
|
||||
- name: Build tests + lib
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
|
@ -11,11 +11,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.245 [min_duration_test])
|
||||
add_test(NAME MinDuration::SimpleThreshold COMMAND $<TARGET_FILE:SelfTest> --min-duration 0.950 [min_duration_test])
|
||||
set_tests_properties(
|
||||
MinDuration::SimpleThreshold
|
||||
PROPERTIES
|
||||
PASS_REGULAR_EXPRESSION "s: sleep_for_250ms"
|
||||
PASS_REGULAR_EXPRESSION "s: sleep_for_1000ms"
|
||||
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
|
||||
|
@ -16,8 +16,8 @@ TEST_CASE( "sleep_for_100ms", "[.min_duration_test][approvals]" )
|
||||
CHECK( true );
|
||||
}
|
||||
|
||||
TEST_CASE( "sleep_for_250ms", "[.min_duration_test][approvals]" )
|
||||
TEST_CASE( "sleep_for_1000ms", "[.min_duration_test][approvals]" )
|
||||
{
|
||||
std::this_thread::sleep_for( std::chrono::milliseconds( 250 ) );
|
||||
std::this_thread::sleep_for( std::chrono::milliseconds( 1'000 ) );
|
||||
CHECK( true );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user