mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 11:06:04 +08:00
gtest cmake: fix unit test filter
This commit is contained in:
committed by
Daniel Agar
parent
129c0f188a
commit
1aadbf85af
+5
-4
@@ -408,14 +408,15 @@ include(px4_add_gtest)
|
|||||||
if(BUILD_TESTING)
|
if(BUILD_TESTING)
|
||||||
include(gtest)
|
include(gtest)
|
||||||
|
|
||||||
set(TESTFILTERARG "")
|
# Ensure there's no -R without any filter expression since that trips newer ctest versions
|
||||||
|
|
||||||
if(TESTFILTER)
|
if(TESTFILTER)
|
||||||
set(TESTFILTERARG "-R ${TESTFILTER}")
|
set(TESTFILTERARG "-R")
|
||||||
|
else()
|
||||||
|
set(TESTFILTERARG "")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_custom_target(test_results
|
add_custom_target(test_results
|
||||||
COMMAND GTEST_COLOR=1 ${CMAKE_CTEST_COMMAND} --output-on-failure -T Test ${TESTFILTERARG}
|
COMMAND GTEST_COLOR=1 ${CMAKE_CTEST_COMMAND} --output-on-failure -T Test ${TESTFILTERARG} ${TESTFILTER}
|
||||||
DEPENDS
|
DEPENDS
|
||||||
px4
|
px4
|
||||||
examples__dyn_hello
|
examples__dyn_hello
|
||||||
|
|||||||
Reference in New Issue
Block a user