More low-level firmware coverage for the simulator/unit-tests #2656

This commit is contained in:
Andrey 2021-05-15 05:27:33 -04:00
parent ae7367aa23
commit 06bdf52b3c
4 changed files with 10 additions and 4 deletions

View File

@ -10,8 +10,6 @@
#include "global.h" #include "global.h"
#include "controller_base.h" #include "controller_base.h"
#if ! EFI_UNIT_TEST
/** /**
* @brief A base class for a controller that requires its own thread. * @brief A base class for a controller that requires its own thread.
* *
@ -68,5 +66,3 @@ public:
m_isStarted = true; m_isStarted = true;
} }
}; };
#endif

View File

@ -74,6 +74,7 @@ INCDIR += $(UNIT_TESTS_DIR) \
$(HW_SENSORS_INC) \ $(HW_SENSORS_INC) \
$(HW_LAYER_DRIVERS_INC) \ $(HW_LAYER_DRIVERS_INC) \
$(UNIT_TESTS_DIR)/test_data_structures \ $(UNIT_TESTS_DIR)/test_data_structures \
$(UNIT_TESTS_DIR)/chibios-mock \
$(UNIT_TESTS_DIR)/tests \ $(UNIT_TESTS_DIR)/tests \
$(UNIT_TESTS_DIR)/tests/sensor \ $(UNIT_TESTS_DIR)/tests/sensor \
$(UNIT_TESTS_DIR)/test_basic_math $(UNIT_TESTS_DIR)/test_basic_math

View File

@ -0,0 +1,8 @@
#define THD_WORKING_AREA(name, size) uint8_t name[size];
typedef int tprio_t;
class thread_t {
char *name;
};

View File

@ -29,6 +29,7 @@ typedef uint32_t ioportmask_t;
#ifdef __cplusplus #ifdef __cplusplus
#include "mock-threads.h"
// todo: include it right here? #include "unit_test_framework.h" // todo: include it right here? #include "unit_test_framework.h"
extern "C" extern "C"
{ {