From e26f2215d505aa64e7c878424a2aad21cefe16b3 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Thu, 6 May 2021 16:33:10 -0400 Subject: [PATCH] Break out unit tests #2627 --- unit_tests/Makefile | 27 ++------------------------- unit_tests/unit_test_rules.mk | 11 +++++++++++ 2 files changed, 13 insertions(+), 25 deletions(-) create mode 100644 unit_tests/unit_test_rules.mk diff --git a/unit_tests/Makefile b/unit_tests/Makefile index 06e5dc8bd1..388d4eb0ab 100644 --- a/unit_tests/Makefile +++ b/unit_tests/Makefile @@ -6,14 +6,6 @@ PROJECT_DIR = ../firmware UNIT_TESTS_DIR=$(PROJECT_DIR)/../unit_tests -ifeq ("$(wildcard $(UNIT_TESTS_DIR)/googletest/LICENSE)","") -$(info Invoking "git submodule update --init") -$(shell git submodule update --init) -$(info Invoked "git submodule update --init") -# make is not happy about newly checked out module for some reason but next invocation would work -$(error Please run 'make' again. Please make sure you have 'git' command in PATH) -endif - include $(PROJECT_DIR)/rusefi_rules.mk @@ -81,23 +73,6 @@ endif # List all default C defines here, like -D_DEBUG=1 DDEFS = -# -# Architecture or project specific options -############################################################################## - -############################################################################## -# Project, sources and paths -# - -# Define project name here -PROJECT = rusefi_test - -#PROJECT_BOARD = OLIMEX_STM32_E407 -#ifneq ($(PROJECT_BOARD),OLIMEX_STM32_E407) -# PROJECT_BOARD = ST_STM32F4_DISCOVERY -#endif -#DDEFS += -D$(PROJECT_BOARD) - # Imported source files and paths include $(PROJECT_DIR)/config/engines/engines.mk include $(PROJECT_DIR)/controllers/controllers.mk @@ -303,4 +278,6 @@ ULIBS += --coverage # End of user defines ############################################################################## +include $(UNIT_TESTS_DIR)/unit_test_rules.mk + include $(UNIT_TESTS_DIR)/rules.mk diff --git a/unit_tests/unit_test_rules.mk b/unit_tests/unit_test_rules.mk new file mode 100644 index 0000000000..848b2ca78e --- /dev/null +++ b/unit_tests/unit_test_rules.mk @@ -0,0 +1,11 @@ +# Define project name here +PROJECT = rusefi_test + +ifeq ("$(wildcard $(UNIT_TESTS_DIR)/googletest/LICENSE)","") +$(info Invoking "git submodule update --init") +$(shell git submodule update --init) +$(info Invoked "git submodule update --init") +# make is not happy about newly checked out module for some reason but next invocation would work +$(error Please run 'make' again. Please make sure you have 'git' command in PATH) +endif +