Mark blacklisted tests as skipped (#90)
* support skipping tests * skip blacklisted test_graph test * deduplicate function call * rename _SKIP_TEST to SKIP_TEST * arg order
This commit is contained in:
parent
8ecb08cb6e
commit
723e561b80
2 changed files with 17 additions and 10 deletions
|
@ -60,21 +60,23 @@ function(test_target_function)
|
||||||
AMENT_DEPENDENCIES ${rmw_implementation}
|
AMENT_DEPENDENCIES ${rmw_implementation}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(SKIP_TEST "")
|
||||||
# TODO(wjwwood): remove this when the graph API works properly for FastRTPS
|
# TODO(wjwwood): remove this when the graph API works properly for FastRTPS
|
||||||
if(
|
if(
|
||||||
rmw_implementation STREQUAL "rmw_connext_dynamic_cpp" OR
|
rmw_implementation STREQUAL "rmw_connext_dynamic_cpp" OR
|
||||||
rmw_implementation STREQUAL "rmw_fastrtps_cpp"
|
rmw_implementation STREQUAL "rmw_fastrtps_cpp"
|
||||||
)
|
)
|
||||||
message(STATUS "Skipping test_graph${target_suffix} test.")
|
message(STATUS "Skipping test_graph${target_suffix} test.")
|
||||||
else()
|
set(SKIP_TEST "SKIP_TEST")
|
||||||
|
endif()
|
||||||
rcl_add_custom_gtest(test_graph${target_suffix}
|
rcl_add_custom_gtest(test_graph${target_suffix}
|
||||||
SRCS rcl/test_graph.cpp
|
SRCS rcl/test_graph.cpp
|
||||||
ENV ${extra_test_env}
|
ENV ${extra_test_env}
|
||||||
APPEND_LIBRARY_DIRS ${extra_lib_dirs}
|
APPEND_LIBRARY_DIRS ${extra_lib_dirs}
|
||||||
LIBRARIES ${PROJECT_NAME}${target_suffix} ${extra_test_libraries}
|
LIBRARIES ${PROJECT_NAME}${target_suffix} ${extra_test_libraries}
|
||||||
AMENT_DEPENDENCIES ${rmw_implementation} "example_interfaces" "std_msgs"
|
AMENT_DEPENDENCIES ${rmw_implementation} "example_interfaces" "std_msgs"
|
||||||
|
${SKIP_TEST}
|
||||||
)
|
)
|
||||||
endif()
|
|
||||||
|
|
||||||
rcl_add_custom_gtest(test_rcl${target_suffix}
|
rcl_add_custom_gtest(test_rcl${target_suffix}
|
||||||
SRCS rcl/test_rcl.cpp
|
SRCS rcl/test_rcl.cpp
|
||||||
|
|
|
@ -51,7 +51,7 @@ include(CMakeParseArguments)
|
||||||
#
|
#
|
||||||
macro(rcl_add_custom_gtest target)
|
macro(rcl_add_custom_gtest target)
|
||||||
cmake_parse_arguments(_ARG
|
cmake_parse_arguments(_ARG
|
||||||
"TRACE"
|
"SKIP_TEST;TRACE"
|
||||||
""
|
""
|
||||||
"SRCS;ENV;APPEND_ENV;APPEND_LIBRARY_DIRS;INCLUDE_DIRS;LIBRARIES;AMENT_DEPENDENCIES"
|
"SRCS;ENV;APPEND_ENV;APPEND_LIBRARY_DIRS;INCLUDE_DIRS;LIBRARIES;AMENT_DEPENDENCIES"
|
||||||
${ARGN})
|
${ARGN})
|
||||||
|
@ -67,9 +67,14 @@ macro(rcl_add_custom_gtest target)
|
||||||
if(_ARG_APPEND_LIBRARY_DIRS)
|
if(_ARG_APPEND_LIBRARY_DIRS)
|
||||||
set(_ARG_APPEND_LIBRARY_DIRS "APPEND_LIBRARY_DIRS" ${_ARG_APPEND_LIBRARY_DIRS})
|
set(_ARG_APPEND_LIBRARY_DIRS "APPEND_LIBRARY_DIRS" ${_ARG_APPEND_LIBRARY_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
if(_ARG_SKIP_TEST)
|
||||||
|
set(_ARG_SKIP_TEST "SKIP_TEST")
|
||||||
|
else()
|
||||||
|
set(_ARG_SKIP_TEST "")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Pass args along to ament_add_gtest().
|
# Pass args along to ament_add_gtest().
|
||||||
ament_add_gtest(${target} ${_ARG_SRCS} ${_ARG_ENV} ${_ARG_APPEND_ENV} ${_ARG_APPEND_LIBRARY_DIRS})
|
ament_add_gtest(${target} ${_ARG_SRCS} ${_ARG_ENV} ${_ARG_APPEND_ENV} ${_ARG_APPEND_LIBRARY_DIRS} ${_ARG_SKIP_TEST})
|
||||||
# Check if the target was actually created.
|
# Check if the target was actually created.
|
||||||
if(TARGET ${target})
|
if(TARGET ${target})
|
||||||
if(_ARG_TRACE)
|
if(_ARG_TRACE)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue