summaryrefslogtreecommitdiffstats
path: root/build_test.mk
diff options
context:
space:
mode:
Diffstat (limited to 'build_test.mk')
-rw-r--r--build_test.mk13
1 files changed, 11 insertions, 2 deletions
diff --git a/build_test.mk b/build_test.mk
index 5171c58c36..4c09bf0278 100644
--- a/build_test.mk
+++ b/build_test.mk
@@ -24,7 +24,6 @@ GTEST_INTERNAL_INC :=\
$(GTEST_OUTPUT)_SRC :=\
googletest/src/gtest-all.cc\
- googletest/src/gtest_main.cc\
googlemock/src/gmock-all.cc
$(GTEST_OUTPUT)_DEFS :=
@@ -35,7 +34,8 @@ CREATE_MAP := no
VPATH +=\
$(LIB_PATH)/googletest\
- $(LIB_PATH)/googlemock
+ $(LIB_PATH)/googlemock\
+ $(LIB_PATH)/printf
all: elf
@@ -43,6 +43,10 @@ VPATH += $(COMMON_VPATH)
PLATFORM:=TEST
PLATFORM_KEY:=test
+ifeq ($(strip $(DEBUG)), 1)
+CONSOLE_ENABLE = yes
+endif
+
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
include tests/$(TEST)/rules.mk
endif
@@ -56,6 +60,11 @@ ifneq ($(filter $(FULL_TESTS),$(TEST)),)
include build_full_test.mk
endif
+$(TEST)_SRC += \
+ tests/test_common/main.c \
+ $(LIB_PATH)/printf/printf.c \
+ $(COMMON_DIR)/printf.c
+
$(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC)
$(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC)
$(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS)