From dfd0d3229fa0213b6495d9ef5e8bac823a5947f9 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Fri, 14 May 2021 10:58:53 -0400 Subject: [PATCH] More low-level firmware coverage for the simulator/unit-tests #2656 --- unit_tests/chibios-mock/readme.md | 4 ++++ .../tests/system/test_periodic_thread_controller.cpp | 10 ++++++++++ unit_tests/tests/tests.mk | 1 + 3 files changed, 15 insertions(+) create mode 100644 unit_tests/chibios-mock/readme.md create mode 100644 unit_tests/tests/system/test_periodic_thread_controller.cpp diff --git a/unit_tests/chibios-mock/readme.md b/unit_tests/chibios-mock/readme.md new file mode 100644 index 0000000000..43d8fa0476 --- /dev/null +++ b/unit_tests/chibios-mock/readme.md @@ -0,0 +1,4 @@ +This framework allows us to test threading and hardware callbacks with full control of scheduling. + +We have simulator running a real x86 implementation of CHibiOS but that one runs with real scheduler not +giving us the desired control precision. \ No newline at end of file diff --git a/unit_tests/tests/system/test_periodic_thread_controller.cpp b/unit_tests/tests/system/test_periodic_thread_controller.cpp new file mode 100644 index 0000000000..dfe56005e2 --- /dev/null +++ b/unit_tests/tests/system/test_periodic_thread_controller.cpp @@ -0,0 +1,10 @@ +/* + * @file test_periodic_thread_controller.cpp + * + * May 14, 2021 + * @author Andrey Belomutskiy, (c) 2012-2021 + */ + + + + diff --git a/unit_tests/tests/tests.mk b/unit_tests/tests/tests.mk index 94a83f36ee..643a62565d 100644 --- a/unit_tests/tests/tests.mk +++ b/unit_tests/tests/tests.mk @@ -19,6 +19,7 @@ TESTS_SRC_CPP = \ tests/lua/test_lua_hooks.cpp \ tests/sensor/test_cj125.cpp \ tests/util/test_timer.cpp \ + tests/system/test_periodic_thread_controller.cpp \ tests/test_util.cpp \ tests/test_start_stop.cpp \ tests/test_hardware_reinit.cpp \