aboutsummaryrefslogtreecommitdiffstats
path: root/build_test.mk
diff options
context:
space:
mode:
authorGravatar Fred Sundvik <fsundvik@gmail.com>2016-08-24 22:23:17 +0300
committerGravatar Fred Sundvik <fsundvik@gmail.com>2016-08-27 21:57:49 +0300
commit0a11460175d6a838c71343c19eb4ce4699936247 (patch)
treee2e96c421172e212d6e623127d40d4582bd02127 /build_test.mk
parent8a9aac6e3237a505682cc7249a8dfff6cb964343 (diff)
downloadqmk_firmware-0a11460175d6a838c71343c19eb4ce4699936247.tar.gz
Build actual tests, convert byte_stuffer_tests
Diffstat (limited to 'build_test.mk')
-rw-r--r--build_test.mk14
1 files changed, 12 insertions, 2 deletions
diff --git a/build_test.mk b/build_test.mk
index dac59a8f4..1d8cb08b1 100644
--- a/build_test.mk
+++ b/build_test.mk
@@ -10,7 +10,9 @@ TARGET=test/$(TEST)
GTEST_OUTPUT = $(BUILD_DIR)/gtest
-OUTPUTS := $(GTEST_OUTPUT)
+TEST_OBJ = $(BUILD_DIR)/test_obj
+
+OUTPUTS := $(TEST_OBJ)/$(TEST) $(GTEST_OUTPUT)
GTEST_INC := \
$(LIB_PATH)/googletest/googletest/include\
@@ -36,8 +38,16 @@ VPATH +=\
all: elf
+include $(QUANTUM_PATH)/serial_link/tests/rules.mk
+
+$(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC)
+$(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC)
+$(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS)
+
include $(TMK_PATH)/native.mk
include $(TMK_PATH)/rules.mk
-$(shell mkdir $(BUILD_DIR)/test 2>/dev/null)
+
+$(shell mkdir -p $(BUILD_DIR)/test 2>/dev/null)
+$(shell mkdir -p $(TEST_OBJ) 2>/dev/null)