sitl testing exclude tests

This commit is contained in:
Daniel Agar 2016-12-31 17:55:31 -05:00 committed by Lorenz Meier
parent 97bc0f4486
commit 351b3d20cb
2 changed files with 10 additions and 2 deletions

View File

@ -122,7 +122,7 @@ endif
define cmake-build
+@$(eval BUILD_DIR = $(SRC_DIR)/build_$@$(BUILD_DIR_SUFFIX))
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi
+@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ]; then mkdir -p $(BUILD_DIR) && $(call PX4_RUN, cd $(BUILD_DIR); cmake $(2) -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) $(CMAKE_ARGS)) || (rm -rf $(BUILD_DIR)); fi
+@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ]; then mkdir -p $(BUILD_DIR) && $(call PX4_RUN, cd $(BUILD_DIR); cmake $(2) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=$(1) $(CMAKE_ARGS)) || (rm -rf $(BUILD_DIR)); fi
+@echo "PX4 CONFIG: $(BUILD_DIR)"
+@$(call PX4_RUN,$(PX4_MAKE) -C "$(BUILD_DIR)" $(PX4_MAKE_ARGS) $(ARGS))
endef

View File

@ -162,8 +162,16 @@ set(tests_exclude
uart_break
uart_console
uart_loopback
uart_send
)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
list(APPEND tests_exclude
hysteresis
mixer
)
endif()
foreach(test_name ${test_src_files})
string(REPLACE "test_" "" test_name ${test_name})
string(REPLACE ".cpp" "" test_name ${test_name})
@ -175,7 +183,7 @@ foreach(test_name ${test_src_files})
add_test(NAME ${test_name}
COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh
$<TARGET_FILE:px4>
posix-configs/SITL/init/test/
posix-configs/SITL/init/test
none
none
${test_name}_generated