Testing: hotfix to recover test coverage CI

CMAKE_TESTING should automatically be enabled
but I hoped to do that in the test.cmake
target specific options and not in the main
CMakeLists. I have to see if I can make that
order work. Here the hotfix to make CI work
again.
This commit is contained in:
Matthias Grob 2019-05-09 21:31:24 +01:00 committed by Daniel Agar
parent 415b366c54
commit f8db8650d0
No known key found for this signature in database
GPG Key ID: FD3CBA98017A69DE
2 changed files with 3 additions and 1 deletions

View File

@ -415,6 +415,9 @@ endif()
# optionally enable cmake testing (supported only on posix)
option(CMAKE_TESTING "Configure test targets" OFF)
if (${PX4_CONFIG} STREQUAL "px4_sitl_test")
set(CMAKE_TESTING ON)
endif()
if(CMAKE_TESTING)
include(CTest) # sets BUILD_TESTING variable
endif()

View File

@ -344,7 +344,6 @@ format:
.PHONY: rostest python_coverage
tests:
$(eval CMAKE_ARGS += -DCMAKE_TESTING=ON)
$(eval CMAKE_ARGS += -DCONFIG=px4_sitl_test)
$(eval CMAKE_ARGS += -DTESTFILTER=$(TESTFILTER))
$(eval ARGS += test_results)