mavsdk SITL testing code coverage and upload to codecov.io

This commit is contained in:
Daniel Agar
2019-12-26 14:31:33 -05:00
parent 2120c87d1e
commit 30a73416dc
6 changed files with 39 additions and 7 deletions
+4 -1
View File
@@ -141,7 +141,10 @@ foreach(cmd_name ${test_cmds})
set_tests_properties(posix_${cmd_name} PROPERTIES PASS_REGULAR_EXPRESSION "Shutting down")
endforeach()
if (CMAKE_BUILD_TYPE STREQUAL Coverage)
if(CMAKE_BUILD_TYPE STREQUAL Coverage)
setup_target_for_coverage(test_coverage "${CMAKE_CTEST_COMMAND} --output-on-failure -T Test" tests)
setup_target_for_coverage(generate_coverage "${CMAKE_COMMAND} -E echo" generic)
# TODO:
#setup_target_for_coverage(mavsdk_coverage "${PX4_SOURCE_DIR}/test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 20 --iterations 1 --fail-early" mavsdk)
endif()
@@ -68,13 +68,12 @@ if(ENABLE_LOCKSTEP_SCHEDULER)
endif()
if (EXTRA_DEPENDS)
if(EXTRA_DEPENDS)
add_dependencies(px4_layer ${EXTRA_DEPENDS})
endif()
if (BUILD_TESTING)
if(BUILD_TESTING)
add_subdirectory(test_stubs)
add_subdirectory(gtest_runner)
endif()