From 418df2516d71caf8a016cece5693864a07f837bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Beat=20K=C3=BCng?= <beat-kueng@gmx.net>
Date: Tue, 11 Dec 2018 13:21:54 +0100
Subject: [PATCH] mixer multirotor: add to CI

---
 Makefile               |  8 ++++++--
 src/lib/mixer/Makefile | 10 +++++++---
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 91ca65ae00..a544535e47 100644
--- a/Makefile
+++ b/Makefile
@@ -322,9 +322,13 @@ format:
 
 # Testing
 # --------------------------------------------------------------------
-.PHONY: tests tests_coverage tests_mission tests_mission_coverage tests_offboard rostest python_coverage
+.PHONY: tests tests_coverage tests_mission tests_mission_coverage tests_offboard
+.PHONY: rostest python_coverage test_mixer_multirotor
 
-tests:
+test_mixer_multirotor:
+	@$(MAKE) -C "$(SRC_DIR)"/src/lib/mixer --no-print-directory tests
+
+tests: test_mixer_multirotor
 	@$(MAKE) --no-print-directory px4_sitl_default test_results \
 	ASAN_OPTIONS="color=always:check_initialization_order=1:detect_stack_use_after_return=1" \
 	UBSAN_OPTIONS="color=always"
diff --git a/src/lib/mixer/Makefile b/src/lib/mixer/Makefile
index 3ad4b70b97..94c91b2f54 100644
--- a/src/lib/mixer/Makefile
+++ b/src/lib/mixer/Makefile
@@ -1,9 +1,13 @@
 
-.PHONY: all tests
+.PHONY: all tests clean
 all: test_mixer_multirotor
 
 test_mixer_multirotor: test_mixer_multirotor.cpp mixer_multirotor.cpp mixer.cpp
-	g++ $^ -I .. -DMIXER_MULTIROTOR_USE_MOCK_GEOMETRY -o $@
+	@g++ $^ -std=c++11 -I .. -DMIXER_MULTIROTOR_USE_MOCK_GEOMETRY -o $@
 
 tests: test_mixer_multirotor
-	python mixer_multirotor.py --test --mixer-multirotor-binary ./$^
+	@echo "Testing Mixer Multirotor"
+	@python mixer_multirotor.py --test --mixer-multirotor-binary ./$^
+
+clean:
+	@rm test_mixer_multirotor
-- 
GitLab