Browse Source

Add basic infrastrucure for building full tests

pjones-keymap
Fred Sundvik 2 years ago
parent
commit
30f22d450d
7 changed files with 75 additions and 1 deletions
  1. 1
    1
      Makefile
  2. 14
    0
      build_full_test.mk
  3. 3
    0
      build_test.mk
  4. 4
    0
      testlist.mk
  5. 22
    0
      tests/basic/config.h
  6. 14
    0
      tests/basic/rules.mk
  7. 17
    0
      tests/basic/test.c

+ 1
- 1
Makefile View File

@@ -419,7 +419,7 @@ define BUILD_TEST
419 419
     MAKE_TARGET := $2
420 420
     COMMAND := $1
421 421
     MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_test.mk $$(MAKE_TARGET)
422
-    MAKE_VARS := TEST=$$(TEST_NAME)
422
+    MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS=$$(FULL_TESTS)
423 423
     MAKE_MSG := $$(MSG_MAKE_TEST)
424 424
     $$(eval $$(call BUILD))
425 425
     ifneq ($$(MAKE_TARGET),clean)

+ 14
- 0
build_full_test.mk View File

@@ -0,0 +1,14 @@
1
+# Copyright 2017 Fred Sundvik
2
+#
3
+# This program is free software: you can redistribute it and/or modify
4
+# it under the terms of the GNU General Public License as published by
5
+# the Free Software Foundation, either version 2 of the License, or
6
+# (at your option) any later version.
7
+#
8
+# This program is distributed in the hope that it will be useful,
9
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
+# GNU General Public License for more details.
12
+#
13
+# You should have received a copy of the GNU General Public License
14
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.

+ 3
- 0
build_test.mk View File

@@ -43,6 +43,9 @@ VPATH += $(COMMON_VPATH)
43 43
 
44 44
 include $(TMK_PATH)/common.mk
45 45
 include $(QUANTUM_PATH)/serial_link/tests/rules.mk
46
+ifneq ($(filter $(FULL_TESTS),$(TEST)),)
47
+include build_full_test.mk
48
+endif
46 49
 
47 50
 $(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC)
48 51
 $(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC)

+ 4
- 0
testlist.mk View File

@@ -1,3 +1,6 @@
1
+TEST_LIST = $(notdir $(patsubst %/rules.mk,%,$(wildcard $(ROOT_DIR)/tests/*/rules.mk)))
2
+FULL_TESTS := $(TEST_LIST)
3
+
1 4
 include $(ROOT_DIR)/quantum/serial_link/tests/testlist.mk
2 5
 
3 6
 define VALIDATE_TEST_LIST
@@ -10,4 +13,5 @@ define VALIDATE_TEST_LIST
10 13
     endif
11 14
 endef
12 15
 
16
+
13 17
 $(eval $(call VALIDATE_TEST_LIST,$(firstword $(TEST_LIST)),$(wordlist 2,9999,$(TEST_LIST))))

+ 22
- 0
tests/basic/config.h View File

@@ -0,0 +1,22 @@
1
+/* Copyright 2017 Fred Sundvik
2
+ *
3
+ * This program is free software: you can redistribute it and/or modify
4
+ * it under the terms of the GNU General Public License as published by
5
+ * the Free Software Foundation, either version 2 of the License, or
6
+ * (at your option) any later version.
7
+ *
8
+ * This program is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
+ * GNU General Public License for more details.
12
+ *
13
+ * You should have received a copy of the GNU General Public License
14
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
+ */
16
+
17
+#ifndef TESTS_BASIC_CONFIG_H_
18
+#define TESTS_BASIC_CONFIG_H_
19
+
20
+
21
+
22
+#endif /* TESTS_BASIC_CONFIG_H_ */

+ 14
- 0
tests/basic/rules.mk View File

@@ -0,0 +1,14 @@
1
+# Copyright 2017 Fred Sundvik
2
+#
3
+# This program is free software: you can redistribute it and/or modify
4
+# it under the terms of the GNU General Public License as published by
5
+# the Free Software Foundation, either version 2 of the License, or
6
+# (at your option) any later version.
7
+#
8
+# This program is distributed in the hope that it will be useful,
9
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
+# GNU General Public License for more details.
12
+#
13
+# You should have received a copy of the GNU General Public License
14
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.

+ 17
- 0
tests/basic/test.c View File

@@ -0,0 +1,17 @@
1
+/* Copyright 2017 Fred Sundvik
2
+ *
3
+ * This program is free software: you can redistribute it and/or modify
4
+ * it under the terms of the GNU General Public License as published by
5
+ * the Free Software Foundation, either version 2 of the License, or
6
+ * (at your option) any later version.
7
+ *
8
+ * This program is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
+ * GNU General Public License for more details.
12
+ *
13
+ * You should have received a copy of the GNU General Public License
14
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
+ */
16
+
17
+

Loading…
Cancel
Save