mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-06-04 11:13:58 +08:00
Work on better CI integration.
This commit is contained in:
parent
2a15f1833f
commit
8b37292acb
10
.travis.yml
10
.travis.yml
@ -77,11 +77,15 @@ script:
|
|||||||
if [ "${GHC_COVERAGE}" = "1" ]; then
|
if [ "${GHC_COVERAGE}" = "1" ]; then
|
||||||
cmake --build . --config ${CONFIG} --target filesystem_test
|
cmake --build . --config ${CONFIG} --target filesystem_test
|
||||||
test/filesystem_test
|
test/filesystem_test
|
||||||
lcov --compat-libtool --directory . --capture --output-file coverage_output.info
|
|
||||||
lcov --remove coverage_output.info '/usr/*' '*/c++/*' '*.h' '*/catch.hpp' -o coverage.info
|
|
||||||
coveralls-lcov coverage.info
|
|
||||||
else
|
else
|
||||||
cmake --build . --config ${CONFIG}
|
cmake --build . --config ${CONFIG}
|
||||||
ctest -C ${CONFIG} -E Windows
|
ctest -C ${CONFIG} -E Windows
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
after_success:
|
||||||
|
- |
|
||||||
|
if [ "${GHC_COVERAGE}" = "1" ]; then
|
||||||
|
lcov --compat-libtool --directory . --capture --output-file coverage_output.info
|
||||||
|
lcov --remove coverage_output.info '/usr/*' '*/c++/*' '*.h' '*/catch.hpp' -o coverage.info
|
||||||
|
coveralls-lcov coverage.info
|
||||||
|
fi
|
||||||
|
@ -4,6 +4,11 @@ set(PARSE_CATCH_TESTS_ADD_TO_CONFIGURE_DEPENDS ON)
|
|||||||
include(ParseAndAddCatchTests)
|
include(ParseAndAddCatchTests)
|
||||||
|
|
||||||
if(GHC_COVERAGE)
|
if(GHC_COVERAGE)
|
||||||
|
message("Generating test runner for coverage run...")
|
||||||
|
add_executable(filesystem_test filesystem_test.cpp catch.hpp)
|
||||||
|
target_compile_options(filesystem_test PUBLIC --coverage)
|
||||||
|
target_link_libraries(filesystem_test PUBLIC ghc_filesystem --coverage)
|
||||||
|
else()
|
||||||
message("Generating test runner for normal test...")
|
message("Generating test runner for normal test...")
|
||||||
add_executable(filesystem_test filesystem_test.cpp catch.hpp)
|
add_executable(filesystem_test filesystem_test.cpp catch.hpp)
|
||||||
target_link_libraries(filesystem_test ghc_filesystem)
|
target_link_libraries(filesystem_test ghc_filesystem)
|
||||||
@ -16,11 +21,6 @@ if(GHC_COVERAGE)
|
|||||||
endif()
|
endif()
|
||||||
ParseAndAddCatchTests(filesystem_test filesystem_test)
|
ParseAndAddCatchTests(filesystem_test filesystem_test)
|
||||||
AddExecutableWithStdFS(std_filesystem_test filesystem_test.cpp catch.hpp)
|
AddExecutableWithStdFS(std_filesystem_test filesystem_test.cpp catch.hpp)
|
||||||
else()
|
|
||||||
message("Generating test runner for coverage run...")
|
|
||||||
add_executable(filesystem_test filesystem_test.cpp catch.hpp)
|
|
||||||
target_compile_options(filesystem_test PUBLIC --coverage)
|
|
||||||
target_link_libraries(filesystem_test PUBLIC ghc_filesystem --coverage)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(multifile_test multi1.cpp multi2.cpp catch.hpp)
|
add_executable(multifile_test multi1.cpp multi2.cpp catch.hpp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user