From 9032730700db49d8e14e3717ddef2aad0c2cbf40 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Fri, 7 May 2021 22:14:22 -0400 Subject: [PATCH] Break out unit tests #2627 --- unit_tests/Makefile | 8 +++++--- unit_tests/tests/tests.mk | 2 -- unit_tests/tests/util/test_util.mk | 7 +++++++ 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 unit_tests/tests/util/test_util.mk diff --git a/unit_tests/Makefile b/unit_tests/Makefile index f7d2d5b44d..54f6e78cd5 100644 --- a/unit_tests/Makefile +++ b/unit_tests/Makefile @@ -19,10 +19,12 @@ include $(PROJECT_DIR)/util/util.mk include $(PROJECT_DIR)/init/init.mk include $(UNIT_TESTS_DIR)/test.mk include $(UNIT_TESTS_DIR)/tests/tests.mk +include $(PROJECT_DIR)/../unit_tests/tests/util/test_util.mk + # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CSRC = $(ALLCSRC) \ +CSRC += $(ALLCSRC) \ $(UTILSRC) \ $(CONTROLLERS_ALGO_SRC) \ $(CONTROLLERS_CORE_SRC) \ @@ -34,7 +36,7 @@ CSRC = $(ALLCSRC) \ # C++ sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CPPSRC = $(ALLCPPSRC) \ +CPPSRC += $(ALLCPPSRC) \ $(UTILSRC_CPP) \ $(CONTROLLERS_ALGO_SRC_CPP) \ $(TRIGGER_DECODERS_SRC_CPP) \ @@ -58,7 +60,7 @@ CPPSRC = $(ALLCPPSRC) \ $(PROJECT_DIR)/console/binary/tooth_logger.cpp \ $(PROJECT_DIR)/console/binary_log/log_field.cpp \ -INCDIR = $(UNIT_TESTS_DIR) \ +INCDIR += $(UNIT_TESTS_DIR) \ $(ALLINC) \ $(UTIL_INC) \ $(PROJECT_DIR)/config/engines \ diff --git a/unit_tests/tests/tests.mk b/unit_tests/tests/tests.mk index 4547168adf..94a83f36ee 100644 --- a/unit_tests/tests/tests.mk +++ b/unit_tests/tests/tests.mk @@ -18,8 +18,6 @@ TESTS_SRC_CPP = \ tests/lua/test_lua_basic.cpp \ tests/lua/test_lua_hooks.cpp \ tests/sensor/test_cj125.cpp \ - tests/util/test_buffered_writer.cpp \ - tests/util/test_error_accumulator.cpp \ tests/util/test_timer.cpp \ tests/test_util.cpp \ tests/test_start_stop.cpp \ diff --git a/unit_tests/tests/util/test_util.mk b/unit_tests/tests/util/test_util.mk new file mode 100644 index 0000000000..41a66da5df --- /dev/null +++ b/unit_tests/tests/util/test_util.mk @@ -0,0 +1,7 @@ + + +CPPSRC += $(PROJECT_DIR)/../unit_tests/tests/util/test_buffered_writer.cpp \ + $(PROJECT_DIR)/../unit_tests/tests/util/test_error_accumulator.cpp \ + +INCDIR += $(PROJECT_DIR)/controllers/system + \ No newline at end of file