Use gtest to catch segfaults
I'm not sure how to get catkin to catch segfaults during testing. I've setup a ROS gtest using the following line in my CMakeLists:
if(CATKIN_ENABLE_TESTING)
catkin_add_gtest(moveit_bolt_test test/moveit_bolt_test.cpp)
target_link_libraries(moveit_bolt_test ${PROJECT_NAME} ${catkin_LIBRARIES} )
endif()
I run the test using catkin run_tests --no-deps --this -iv
When the test segfaults, however, there is not reporting of test failures:
[bolt_moveit:make] Segmentation fault (core dumped)
[bolt_moveit:make] Cannot find results, writing failure results to '/home/dave/ros/current/ws_swri/build_release/bolt_moveit/test_results/bolt_moveit/MISSING-gtest-moveit_bolt_test.xml'
[bolt_moveit:make] -- run_tests.py: verify result "/home/dave/ros/current/ws_swri/build_release/bolt_moveit/test_results/bolt_moveit/gtest-moveit_bolt_test.xml"
How do I get gtest to report a failure instead?