From ac7e3694182dacfe317380530e5e4685c5028643 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Wed, 26 Oct 2022 19:19:03 +0200 Subject: [PATCH] Makefile: add target for unit tests --- CMakeLists.txt | 2 +- Makefile | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 408b0f417c..27086225a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -410,7 +410,7 @@ if(BUILD_TESTING) include(gtest) add_custom_target(test_results - COMMAND GTEST_COLOR=1 ${CMAKE_CTEST_COMMAND} --output-on-failure -T Test -R ${TESTFILTER} USES_TERMINAL + COMMAND GTEST_COLOR=1 ${CMAKE_CTEST_COMMAND} --output-on-failure -T Test -R \"${TESTFILTER}\" USES_TERMINAL DEPENDS px4 examples__dyn_hello diff --git a/Makefile b/Makefile index 86b6239ab1..799748fba5 100644 --- a/Makefile +++ b/Makefile @@ -386,6 +386,8 @@ tests_coverage: @mkdir -p coverage @lcov --directory build/px4_sitl_test --base-directory build/px4_sitl_test --gcov-tool gcov --capture -o coverage/lcov.info +test_unit: + @$(MAKE) tests TESTFILTER="unit\|functional" rostest: px4_sitl_default @$(MAKE) --no-print-directory px4_sitl_default sitl_gazebo