Add unit testing possibility using googletest on POSIX

This commit is contained in:
Matthias Grob
2019-05-09 09:42:46 +02:00
parent 816aa0ffb6
commit 63b967f5df
8 changed files with 164 additions and 2 deletions
+6 -1
View File
@@ -337,9 +337,14 @@ format:
# Testing
# --------------------------------------------------------------------
.PHONY: tests tests_coverage tests_mission tests_mission_coverage tests_offboard tests_avoidance
.PHONY: tests tests_coverage tests_mission tests_mission_coverage tests_offboard tests_avoidance unit_test
.PHONY: rostest python_coverage
unit_test:
$(eval CMAKE_ARGS += -Dunit_testing=ON)
$(eval ARGS += unit_test)
$(call cmake-build,px4_sitl_default)
tests:
@$(MAKE) --no-print-directory px4_sitl_test test_results \
ASAN_OPTIONS="color=always:check_initialization_order=1:detect_stack_use_after_return=1" \