mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 14:03:34 +08:00
cmake organize code coverage handling and base
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
|
||||
include(common/px4_upload)
|
||||
|
||||
px4_nuttx_generate_builtin_commands(
|
||||
OUT builtin_commands.c
|
||||
MODULE_LIST
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
include (common/px4_upload)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
px4_posix_generate_builtin_commands(
|
||||
|
||||
@@ -39,7 +39,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
endif()
|
||||
|
||||
foreach(test_name ${tests})
|
||||
configure_file(${PX4_SOURCE_DIR}/posix-configs/SITL/init/test/test_template.in ${PX4_SOURCE_DIR}/posix-configs/SITL/init/test/${test_name}_generated)
|
||||
configure_file(${PX4_SOURCE_DIR}/posix-configs/SITL/init/test/test_template.in ${PX4_SOURCE_DIR}/posix-configs/SITL/init/test/test_${test_name}_generated)
|
||||
|
||||
add_test(NAME ${test_name}
|
||||
COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh
|
||||
@@ -47,7 +47,7 @@ foreach(test_name ${tests})
|
||||
posix-configs/SITL/init/test
|
||||
none
|
||||
none
|
||||
${test_name}_generated
|
||||
test_${test_name}_generated
|
||||
${PX4_SOURCE_DIR}
|
||||
${PX4_BINARY_DIR}
|
||||
WORKING_DIRECTORY ${SITL_WORKING_DIR})
|
||||
@@ -64,6 +64,10 @@ add_custom_target(test_results
|
||||
WORKING_DIRECTORY ${PX4_BINARY_DIR})
|
||||
set_target_properties(test_results PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL Coverage)
|
||||
setup_target_for_coverage(test_coverage ${CMAKE_CTEST_COMMAND} coverage.info "--output-on-failure -T Test")
|
||||
endif()
|
||||
|
||||
add_custom_target(test_results_junit
|
||||
COMMAND xsltproc ${PX4_SOURCE_DIR}/Tools/CTest2JUnit.xsl Testing/`head -n 1 < Testing/TAG`/Test.xml > JUnitTestResults.xml
|
||||
COMMENT "Converting ctest output to junit xml"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
include(common/px4_upload)
|
||||
include(toolchain/Toolchain-qurt)
|
||||
include(fastrpc)
|
||||
include(qurt_lib)
|
||||
|
||||
Reference in New Issue
Block a user