Skip to content

Commit 146a386

Browse files
MaEtUgRLorenzMeier
authored andcommitted
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.
1 parent 61512f0 commit 146a386

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,9 @@ endif()
415415

416416
# optionally enable cmake testing (supported only on posix)
417417
option(CMAKE_TESTING "Configure test targets" OFF)
418+
if (${PX4_CONFIG} STREQUAL "px4_sitl_test")
419+
set(CMAKE_TESTING ON)
420+
endif()
418421
if(CMAKE_TESTING)
419422
include(CTest) # sets BUILD_TESTING variable
420423
endif()

Makefile

-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ format:
344344
.PHONY: rostest python_coverage
345345

346346
tests:
347-
$(eval CMAKE_ARGS += -DCMAKE_TESTING=ON)
348347
$(eval CMAKE_ARGS += -DCONFIG=px4_sitl_test)
349348
$(eval CMAKE_ARGS += -DTESTFILTER=$(TESTFILTER))
350349
$(eval ARGS += test_results)

0 commit comments

Comments
 (0)