mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Merge branch 'dev-appveyor-fixup-coverage-scripts'
This commit is contained in:
commit
a212fb440b
@ -8,6 +8,8 @@ cmake_minimum_required( VERSION 3.0 )
|
|||||||
|
|
||||||
project( CatchExamples CXX )
|
project( CatchExamples CXX )
|
||||||
|
|
||||||
|
message( STATUS "Examples included" )
|
||||||
|
|
||||||
# define folders used:
|
# define folders used:
|
||||||
|
|
||||||
set( EXAMPLES_DIR ${CATCH_DIR}/examples )
|
set( EXAMPLES_DIR ${CATCH_DIR}/examples )
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
SETLOCAL EnableDelayedExpansion
|
||||||
|
|
||||||
@REM # Possibilities:
|
@REM # Possibilities:
|
||||||
@REM # Debug build + coverage
|
@REM # Debug build + coverage
|
||||||
@ -7,21 +8,15 @@
|
|||||||
if "%CONFIGURATION%"=="Debug" (
|
if "%CONFIGURATION%"=="Debug" (
|
||||||
if "%coverage%"=="1" (
|
if "%coverage%"=="1" (
|
||||||
@REM # coverage needs to build the special helper as well as the main
|
@REM # coverage needs to build the special helper as well as the main
|
||||||
cmake -Hmisc -Bbuild-misc -A%PLATFORM%
|
cmake -Hmisc -Bbuild-misc -A%PLATFORM% || exit /b !ERRORLEVEL!
|
||||||
cmake --build build-misc
|
cmake --build build-misc || exit /b !ERRORLEVEL!
|
||||||
cmake -H. -BBuild -A%PLATFORM% -DUSE_WMAIN=%wmain% -DMEMORYCHECK_COMMAND=build-misc\Debug\CoverageHelper.exe -DMEMORYCHECK_COMMAND_OPTIONS=--sep-- -DMEMORYCHECK_TYPE=Valgrind
|
cmake -H. -BBuild -A%PLATFORM% -DUSE_WMAIN=%wmain% -DMEMORYCHECK_COMMAND=build-misc\Debug\CoverageHelper.exe -DMEMORYCHECK_COMMAND_OPTIONS=--sep-- -DMEMORYCHECK_TYPE=Valgrind || exit /b !ERRORLEVEL! || exit /b !ERRORLEVEL!
|
||||||
) else (
|
) else (
|
||||||
@REM # We know that coverage is 0
|
@REM # We know that coverage is 0
|
||||||
if "%examples%"=="1" (
|
python scripts\generateSingleHeader.py || exit /b !ERRORLEVEL!
|
||||||
@REM # Examples live off the single header, so it needs to be regenerated
|
cmake -H. -BBuild -A%PLATFORM% -DUSE_WMAIN=%wmain% -DCATCH_BUILD_EXAMPLES=%examples% -DCATCH_BUILD_EXTRA_TESTS=%examples% || exit /b !ERRORLEVEL!
|
||||||
python scripts\generateSingleHeader.py
|
|
||||||
cmake -H. -BBuild -A%PLATFORM% -DUSE_WMAIN=%wmain% -DCATCH_BUILD_EXAMPLES=ON -DCATCH_BUILD_EXTRA_TESTS=ON
|
|
||||||
) else (
|
|
||||||
@REM # This is just a plain debug build
|
|
||||||
cmake -H. -BBuild -A%PLATFORM% -DUSE_WMAIN=%wmain%
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if "%CONFIGURATION%"=="Release" (
|
if "%CONFIGURATION%"=="Release" (
|
||||||
cmake -H. -BBuild -A%PLATFORM% -DUSE_WMAIN=%wmain%
|
cmake -H. -BBuild -A%PLATFORM% -DUSE_WMAIN=%wmain% || exit /b !ERRORLEVEL!
|
||||||
)
|
)
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
|
SETLOCAL EnableDelayedExpansion
|
||||||
|
|
||||||
cd Build
|
cd Build
|
||||||
if "%CONFIGURATION%"=="Debug" (
|
if "%CONFIGURATION%"=="Debug" (
|
||||||
if "%coverage%"=="1" (
|
if "%coverage%"=="1" (
|
||||||
ctest -j 2 -C %CONFIGURATION% -D ExperimentalMemCheck
|
ctest -j 2 -C %CONFIGURATION% -D ExperimentalMemCheck || exit /b !ERRORLEVEL!
|
||||||
python ..\misc\appveyorMergeCoverageScript.py
|
python ..\misc\appveyorMergeCoverageScript.py || exit /b !ERRORLEVEL!
|
||||||
codecov --root .. --no-color --disable gcov -f cobertura.xml -t %CODECOV_TOKEN%
|
codecov --root .. --no-color --disable gcov -f cobertura.xml -t %CODECOV_TOKEN% || exit /b !ERRORLEVEL!
|
||||||
) else (
|
) else (
|
||||||
ctest -j 2 -C %CONFIGURATION%
|
ctest -j 2 -C %CONFIGURATION% || exit /b !ERRORLEVEL!
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if "%CONFIGURATION%"=="Release" (
|
if "%CONFIGURATION%"=="Release" (
|
||||||
ctest -j 2 -C %CONFIGURATION%
|
ctest -j 2 -C %CONFIGURATION% || exit /b !ERRORLEVEL!
|
||||||
)
|
)
|
||||||
|
@ -320,7 +320,7 @@ set_tests_properties(ListTests PROPERTIES
|
|||||||
add_test(NAME ListTags COMMAND $<TARGET_FILE:SelfTest> --list-tags)
|
add_test(NAME ListTags COMMAND $<TARGET_FILE:SelfTest> --list-tags)
|
||||||
set_tests_properties(ListTags PROPERTIES
|
set_tests_properties(ListTags PROPERTIES
|
||||||
PASS_REGULAR_EXPRESSION "[0-9]+ tags"
|
PASS_REGULAR_EXPRESSION "[0-9]+ tags"
|
||||||
FAIL_REGULAR_EXPRESSION "[.]")
|
FAIL_REGULAR_EXPRESSION "\\[\\.\\]")
|
||||||
|
|
||||||
add_test(NAME ListReporters COMMAND $<TARGET_FILE:SelfTest> --list-reporters)
|
add_test(NAME ListReporters COMMAND $<TARGET_FILE:SelfTest> --list-reporters)
|
||||||
set_tests_properties(ListReporters PROPERTIES PASS_REGULAR_EXPRESSION "Available reporters:")
|
set_tests_properties(ListReporters PROPERTIES PASS_REGULAR_EXPRESSION "Available reporters:")
|
||||||
|
Loading…
Reference in New Issue
Block a user