mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 03:43:35 +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)
|
||||
|
||||
@@ -50,8 +50,6 @@
|
||||
#include <unistd.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <px4iofirmware/protocol.h>
|
||||
|
||||
#include "mixer.h"
|
||||
|
||||
#define debug(fmt, args...) do { } while(0)
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
#include <math.h>
|
||||
|
||||
#include <mathlib/math/Limits.hpp>
|
||||
#include <px4iofirmware/protocol.h>
|
||||
#include <drivers/drv_pwm_output.h>
|
||||
|
||||
#include "mixer.h"
|
||||
|
||||
@@ -53,7 +53,7 @@ add_definitions(
|
||||
-DHW_VERSION_MINOR=${uavcanblid_hw_version_minor}
|
||||
)
|
||||
|
||||
px4_share_subdirectory(RELDIR ../uavcan/libuavcan ARGS EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(../uavcan/libuavcan uavcanesc_libuavcan)
|
||||
add_dependencies(uavcan platforms__nuttx)
|
||||
|
||||
include_directories(../../drivers/bootloaders/include)
|
||||
@@ -71,12 +71,12 @@ px4_add_module(
|
||||
-Wno-deprecated-declarations
|
||||
-O3
|
||||
SRCS
|
||||
uavcanesc_main.cpp
|
||||
indication_controller.cpp
|
||||
led.cpp
|
||||
uavcanesc_params.c
|
||||
../systemlib/flashparams/flashparams.c
|
||||
../systemlib/flashparams/flashfs.c
|
||||
uavcanesc_main.cpp
|
||||
indication_controller.cpp
|
||||
led.cpp
|
||||
uavcanesc_params.c
|
||||
../systemlib/flashparams/flashparams.c
|
||||
../systemlib/flashparams/flashfs.c
|
||||
|
||||
DEPENDS
|
||||
platforms__common
|
||||
|
||||
@@ -53,7 +53,7 @@ add_definitions(
|
||||
-DHW_VERSION_MINOR=${uavcanblid_hw_version_minor}
|
||||
)
|
||||
|
||||
px4_share_subdirectory(RELDIR ../uavcan/libuavcan ARGS EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(../uavcan/libuavcan uavcannode_libuavcan)
|
||||
add_dependencies(uavcan platforms__nuttx)
|
||||
|
||||
include_directories(../../drivers/bootloaders/include)
|
||||
@@ -72,11 +72,11 @@ px4_add_module(
|
||||
-O3
|
||||
SRCS
|
||||
uavcannode_main.cpp
|
||||
indication_controller.cpp
|
||||
sim_controller.cpp
|
||||
led.cpp
|
||||
resources.cpp
|
||||
uavcannode_params.c
|
||||
indication_controller.cpp
|
||||
sim_controller.cpp
|
||||
led.cpp
|
||||
resources.cpp
|
||||
uavcannode_params.c
|
||||
|
||||
DEPENDS
|
||||
platforms__common
|
||||
|
||||
Reference in New Issue
Block a user