mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
gtest cmake: fix unit test filter
This commit is contained in:
parent
129c0f188a
commit
1aadbf85af
@ -408,14 +408,15 @@ include(px4_add_gtest)
|
||||
if(BUILD_TESTING)
|
||||
include(gtest)
|
||||
|
||||
set(TESTFILTERARG "")
|
||||
|
||||
# Ensure there's no -R without any filter expression since that trips newer ctest versions
|
||||
if(TESTFILTER)
|
||||
set(TESTFILTERARG "-R ${TESTFILTER}")
|
||||
set(TESTFILTERARG "-R")
|
||||
else()
|
||||
set(TESTFILTERARG "")
|
||||
endif()
|
||||
|
||||
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
|
||||
px4
|
||||
examples__dyn_hello
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user