From 146a3866c0c1d433ec36063c381d07ea10c63961 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Thu, 9 May 2019 21:31:24 +0100 Subject: [PATCH] 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. --- CMakeLists.txt | 3 +++ Makefile | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e6be184ab..ee42c30777 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/Makefile b/Makefile index 0c378cffe0..d88572e7af 100644 --- a/Makefile +++ b/Makefile @@ -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)