forked from Archive/PX4-Autopilot
move dyn_hello to examples and restore testing
This commit is contained in:
parent
fecdfe5fbc
commit
48df19c8df
|
@ -85,6 +85,7 @@ px4_add_board(
|
|||
|
||||
EXAMPLES
|
||||
bottle_drop # OBC challenge
|
||||
dyn_hello # dynamically loading modules example
|
||||
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
|
||||
hello
|
||||
#hwtest # Hardware test
|
||||
|
|
|
@ -83,6 +83,7 @@ px4_add_board(
|
|||
|
||||
EXAMPLES
|
||||
bottle_drop # OBC challenge
|
||||
dyn_hello # dynamically loading modules example
|
||||
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
|
||||
hello
|
||||
#hwtest # Hardware test
|
||||
|
|
|
@ -5,7 +5,7 @@ px4_add_board(
|
|||
LABEL cross
|
||||
PLATFORM posix
|
||||
ARCHITECTURE cortex-a53
|
||||
TOOLCHAIN Toolchain-arm-linux-gnueabihf
|
||||
TOOLCHAIN arm-linux-gnueabihf
|
||||
TESTING
|
||||
|
||||
DRIVERS
|
||||
|
@ -64,6 +64,7 @@ px4_add_board(
|
|||
pwm
|
||||
reboot
|
||||
sd_bench
|
||||
shutdown
|
||||
tests # tests and test runner
|
||||
top
|
||||
topic_listener
|
||||
|
@ -72,6 +73,7 @@ px4_add_board(
|
|||
|
||||
EXAMPLES
|
||||
bottle_drop # OBC challenge
|
||||
dyn_hello # dynamically loading modules example
|
||||
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
|
||||
hello
|
||||
#hwtest # Hardware test
|
||||
|
|
|
@ -47,6 +47,7 @@ px4_add_board(
|
|||
navigator
|
||||
position_estimator_inav
|
||||
sensors
|
||||
#simulator
|
||||
#uavcan
|
||||
vtol_att_control
|
||||
wind_estimator
|
||||
|
@ -62,6 +63,7 @@ px4_add_board(
|
|||
pwm
|
||||
reboot
|
||||
sd_bench
|
||||
shutdown
|
||||
tests # tests and test runner
|
||||
top
|
||||
topic_listener
|
||||
|
@ -70,6 +72,7 @@ px4_add_board(
|
|||
|
||||
EXAMPLES
|
||||
bottle_drop # OBC challenge
|
||||
dyn_hello # dynamically loading modules example
|
||||
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
|
||||
hello
|
||||
#hwtest # Hardware test
|
||||
|
|
|
@ -73,6 +73,7 @@ px4_add_board(
|
|||
|
||||
EXAMPLES
|
||||
bottle_drop # OBC challenge
|
||||
dyn_hello # dynamically loading modules example
|
||||
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
|
||||
hello
|
||||
#hwtest # Hardware test
|
||||
|
|
|
@ -75,6 +75,7 @@ px4_add_board(
|
|||
|
||||
EXAMPLES
|
||||
bottle_drop # OBC challenge
|
||||
dyn_hello # dynamically loading modules example
|
||||
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
|
||||
hello
|
||||
#hwtest # Hardware test
|
||||
|
|
|
@ -73,6 +73,7 @@ px4_add_board(
|
|||
|
||||
EXAMPLES
|
||||
bottle_drop # OBC challenge
|
||||
dyn_hello # dynamically loading modules example
|
||||
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
|
||||
hello
|
||||
#hwtest # Hardware test
|
||||
|
|
|
@ -100,18 +100,18 @@ set_tests_properties(shutdown PROPERTIES PASS_REGULAR_EXPRESSION "Shutting down"
|
|||
sanitizer_fail_test_on_error(shutdown)
|
||||
|
||||
# Dynamic module loading test
|
||||
#add_test(NAME dyn
|
||||
# COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh
|
||||
# $<TARGET_FILE:px4>
|
||||
# none
|
||||
# none
|
||||
# test_dyn_hello
|
||||
# ${PX4_SOURCE_DIR}
|
||||
# ${PX4_BINARY_DIR}
|
||||
# $<TARGET_FILE:platforms__posix__tests__dyn_hello>
|
||||
# WORKING_DIRECTORY ${SITL_WORKING_DIR})
|
||||
#set_tests_properties(dyn PROPERTIES PASS_REGULAR_EXPRESSION "1: PASSED")
|
||||
#sanitizer_fail_test_on_error(dyn)
|
||||
add_test(NAME dyn
|
||||
COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh
|
||||
$<TARGET_FILE:px4>
|
||||
none
|
||||
none
|
||||
test_dyn_hello
|
||||
${PX4_SOURCE_DIR}
|
||||
${PX4_BINARY_DIR}
|
||||
$<TARGET_FILE:examples__dyn_hello>
|
||||
WORKING_DIRECTORY ${SITL_WORKING_DIR})
|
||||
set_tests_properties(dyn PROPERTIES PASS_REGULAR_EXPRESSION "1: PASSED")
|
||||
sanitizer_fail_test_on_error(dyn)
|
||||
|
||||
# run arbitrary commands
|
||||
set(test_cmds
|
||||
|
@ -140,7 +140,9 @@ endforeach()
|
|||
|
||||
add_custom_target(test_results
|
||||
COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -T Test
|
||||
DEPENDS px4 #platforms__posix__tests__dyn_hello
|
||||
DEPENDS
|
||||
px4
|
||||
examples__dyn_hello
|
||||
USES_TERMINAL
|
||||
COMMENT "Running tests in sitl"
|
||||
WORKING_DIRECTORY ${PX4_BINARY_DIR})
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
# (px4-alias.sh is expected to be in the PATH)
|
||||
. px4-alias.sh
|
||||
|
||||
dyn ./platforms__posix__tests__dyn_hello.px4mod PASSED
|
||||
dyn ./examples__dyn_hello.px4mod PASSED
|
||||
|
||||
shutdown
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2018 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_module(
|
||||
MODULE examples__dyn_hello
|
||||
MAIN hello
|
||||
SRCS
|
||||
hello.cpp
|
||||
DEPENDS
|
||||
DYNAMIC
|
||||
)
|
|
@ -1,8 +0,0 @@
|
|||
px4_add_module(
|
||||
MODULE platforms__posix__tests__dyn_hello
|
||||
MAIN hello
|
||||
SRCS
|
||||
hello.cpp
|
||||
DEPENDS
|
||||
DYNAMIC
|
||||
)
|
Loading…
Reference in New Issue