summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2017-06-16 20:21:28 +0300
committerFred Sundvik <fsundvik@gmail.com>2017-06-18 21:08:23 +0300
commit30f22d450da19c65584e6deb8515a1fa5b074e07 (patch)
tree2838fe9781c2f5ccf4db339c4752ce345714fada
parent621ae42a6cb9f96b8c02a0094b36daf125c4e6ca (diff)
Add basic infrastrucure for building full tests
-rw-r--r--Makefile2
-rw-r--r--build_full_test.mk14
-rw-r--r--build_test.mk3
-rw-r--r--testlist.mk4
-rw-r--r--tests/basic/config.h22
-rw-r--r--tests/basic/rules.mk14
-rw-r--r--tests/basic/test.c17
7 files changed, 75 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 6a93692bf6..f789409b7e 100644
--- a/Makefile
+++ b/Makefile
@@ -419,7 +419,7 @@ define BUILD_TEST
MAKE_TARGET := $2
COMMAND := $1
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_test.mk $$(MAKE_TARGET)
- MAKE_VARS := TEST=$$(TEST_NAME)
+ MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS=$$(FULL_TESTS)
MAKE_MSG := $$(MSG_MAKE_TEST)
$$(eval $$(call BUILD))
ifneq ($$(MAKE_TARGET),clean)
diff --git a/build_full_test.mk b/build_full_test.mk
new file mode 100644
index 0000000000..0405b9d0f8
--- /dev/null
+++ b/build_full_test.mk
@@ -0,0 +1,14 @@
+# Copyright 2017 Fred Sundvik
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>. \ No newline at end of file
diff --git a/build_test.mk b/build_test.mk
index ee15a45726..32bb4d8078 100644
--- a/build_test.mk
+++ b/build_test.mk
@@ -43,6 +43,9 @@ VPATH += $(COMMON_VPATH)
include $(TMK_PATH)/common.mk
include $(QUANTUM_PATH)/serial_link/tests/rules.mk
+ifneq ($(filter $(FULL_TESTS),$(TEST)),)
+include build_full_test.mk
+endif
$(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC)
$(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC)
diff --git a/testlist.mk b/testlist.mk
index 1884d6d3f6..d949fb3eae 100644
--- a/testlist.mk
+++ b/testlist.mk
@@ -1,3 +1,6 @@
+TEST_LIST = $(notdir $(patsubst %/rules.mk,%,$(wildcard $(ROOT_DIR)/tests/*/rules.mk)))
+FULL_TESTS := $(TEST_LIST)
+
include $(ROOT_DIR)/quantum/serial_link/tests/testlist.mk
define VALIDATE_TEST_LIST
@@ -10,4 +13,5 @@ define VALIDATE_TEST_LIST
endif
endef
+
$(eval $(call VALIDATE_TEST_LIST,$(firstword $(TEST_LIST)),$(wordlist 2,9999,$(TEST_LIST)))) \ No newline at end of file
diff --git a/tests/basic/config.h b/tests/basic/config.h
new file mode 100644
index 0000000000..c24fdcf3fd
--- /dev/null
+++ b/tests/basic/config.h
@@ -0,0 +1,22 @@
+/* Copyright 2017 Fred Sundvik
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef TESTS_BASIC_CONFIG_H_
+#define TESTS_BASIC_CONFIG_H_
+
+
+
+#endif /* TESTS_BASIC_CONFIG_H_ */
diff --git a/tests/basic/rules.mk b/tests/basic/rules.mk
new file mode 100644
index 0000000000..0405b9d0f8
--- /dev/null
+++ b/tests/basic/rules.mk
@@ -0,0 +1,14 @@
+# Copyright 2017 Fred Sundvik
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>. \ No newline at end of file
diff --git a/tests/basic/test.c b/tests/basic/test.c
new file mode 100644
index 0000000000..01d1930ea5
--- /dev/null
+++ b/tests/basic/test.c
@@ -0,0 +1,17 @@
+/* Copyright 2017 Fred Sundvik
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+