From 1742c5521fea716fe578dc4a2b24ae7099c70312 Mon Sep 17 00:00:00 2001 From: Niklas Hauser Date: Sun, 28 Apr 2019 00:42:33 +0200 Subject: [PATCH] [test] Add more targets and fix issues --- .circleci/config.yml | 3 +++ test/Makefile | 20 +++++++++++++- test/config/arduino-nano.xml | 24 +++++++++++++++++ test/config/arduino-uno.xml | 27 +++++++++++++++++++ test/config/nucleo-l432.xml | 7 +++++ test/modm/math/matrix_vector_test.cpp | 6 ++--- test/modm/platform/gpio/module.lb | 2 +- .../processing/resumable/resumable_test.cpp | 4 +++ 8 files changed, 88 insertions(+), 5 deletions(-) create mode 100644 test/config/arduino-nano.xml create mode 100644 test/config/arduino-uno.xml create mode 100644 test/config/nucleo-l432.xml diff --git a/.circleci/config.yml b/.circleci/config.yml index 4136fc52c3..2938fde835 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,10 +33,13 @@ jobs: command: | (cd test && make compile-nucleo-f411) (cd test && make compile-nucleo-f103) + (cd test && make compile-nucleo-l432) - run: name: Compile AVR Unittests command: | (cd test && make compile-al-avreb-can) + (cd test && make compile-arduino-uno) + (cd test && make compile-arduino-nano) - run: name: Linux Examples command: | diff --git a/test/Makefile b/test/Makefile index 6a987b0474..41c0aa5e9b 100644 --- a/test/Makefile +++ b/test/Makefile @@ -40,6 +40,12 @@ run-nucleo-f411: $(call run-test,nucleo-f411,size) +compile-nucleo-l432: + $(call compile-test,nucleo-l432,size) +run-nucleo-l432: + $(call run-test,nucleo-l432,size) + + compile-nucleo-f103: $(call compile-test,nucleo-f103,size) run-nucleo-f103: @@ -49,4 +55,16 @@ run-nucleo-f103: compile-al-avreb-can: $(call compile-test,al-avreb-can) run-al-avreb-can: - $(call run-test,al-avreb-can) \ No newline at end of file + $(call run-test,al-avreb-can) + + +compile-arduino-uno: + $(call compile-test,arduino-uno) +run-arduino-uno: + $(call run-test,arduino-uno) + + +compile-arduino-nano: + $(call compile-test,arduino-nano) +run-arduino-nano: + $(call run-test,arduino-nano) diff --git a/test/config/arduino-nano.xml b/test/config/arduino-nano.xml new file mode 100644 index 0000000000..94f6a65114 --- /dev/null +++ b/test/config/arduino-nano.xml @@ -0,0 +1,24 @@ + + + modm:arduino-nano + + + + + + + + + + modm-test:test:io + modm-test:test:platform:** + + modm-test:test:ui + + + + diff --git a/test/config/arduino-uno.xml b/test/config/arduino-uno.xml new file mode 100644 index 0000000000..6bd5c8186c --- /dev/null +++ b/test/config/arduino-uno.xml @@ -0,0 +1,27 @@ + + + modm:arduino-uno + + + + + + + + + + + + + + modm-test:test:processing + + + + + diff --git a/test/config/nucleo-l432.xml b/test/config/nucleo-l432.xml new file mode 100644 index 0000000000..3a4e1b1ab9 --- /dev/null +++ b/test/config/nucleo-l432.xml @@ -0,0 +1,7 @@ + + + modm:nucleo-l432kc + + modm-test:test:** + + diff --git a/test/modm/math/matrix_vector_test.cpp b/test/modm/math/matrix_vector_test.cpp index 53a1800800..179edfa563 100644 --- a/test/modm/math/matrix_vector_test.cpp +++ b/test/modm/math/matrix_vector_test.cpp @@ -21,7 +21,7 @@ void MatrixVectorTest::testMatrixVectorMultiplication() { - const float_t m[] = { + const float m[] = { 5., 8., -4., @@ -33,13 +33,13 @@ MatrixVectorTest::testMatrixVectorMultiplication() -2. }; - const float_t v[] = { + const float v[] = { 2., -3., 1. }; - const modm::Matrix a(m); + const modm::Matrix a(m); const modm::Vector3f b(v); modm::Vector3f c = a * b; diff --git a/test/modm/platform/gpio/module.lb b/test/modm/platform/gpio/module.lb index be2d5ac524..4d15e47aa6 100644 --- a/test/modm/platform/gpio/module.lb +++ b/test/modm/platform/gpio/module.lb @@ -92,7 +92,7 @@ def prepare(module, options): return True def build(env): - if not (env.has_module(":board:nucleo-*") or env.has_module(":board:al-avr*")): + if not (env.has_module(":board:nucleo-f*") or env.has_module(":board:al-avr*")): env.log.warn("GPIO test has been hardcoded to a Nucleo-64 board. " "When porting make sure this test does not damage your board!") return diff --git a/test/modm/processing/resumable/resumable_test.cpp b/test/modm/processing/resumable/resumable_test.cpp index f9b3ca6e35..6904906786 100644 --- a/test/modm/processing/resumable/resumable_test.cpp +++ b/test/modm/processing/resumable/resumable_test.cpp @@ -366,6 +366,10 @@ MODM_ASSERTION_HANDLER(resumable_test_nesting_handler); void ResumableTest::testNesting() { +#ifdef MODM_CPU_AVR + // this test blows the stack of any AVR :_( + return; +#endif TestingNestedThread thread; // sanity checks TEST_ASSERT_FALSE(thread.isResumableRunning());