diff options
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | build_full_test.mk | 14 | ||||
| -rw-r--r-- | build_test.mk | 3 | ||||
| -rw-r--r-- | testlist.mk | 4 | ||||
| -rw-r--r-- | tests/basic/config.h | 22 | ||||
| -rw-r--r-- | tests/basic/rules.mk | 14 | ||||
| -rw-r--r-- | tests/basic/test.c | 17 |
7 files changed, 75 insertions, 1 deletions
| @@ -419,7 +419,7 @@ define BUILD_TEST | |||
| 419 | MAKE_TARGET := $2 | 419 | MAKE_TARGET := $2 |
| 420 | COMMAND := $1 | 420 | COMMAND := $1 |
| 421 | MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_test.mk $$(MAKE_TARGET) | 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 | MAKE_MSG := $$(MSG_MAKE_TEST) | 423 | MAKE_MSG := $$(MSG_MAKE_TEST) |
| 424 | $$(eval $$(call BUILD)) | 424 | $$(eval $$(call BUILD)) |
| 425 | ifneq ($$(MAKE_TARGET),clean) | 425 | ifneq ($$(MAKE_TARGET),clean) |
diff --git a/build_full_test.mk b/build_full_test.mk new file mode 100644 index 000000000..0405b9d0f --- /dev/null +++ b/build_full_test.mk | |||
| @@ -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/>. \ No newline at end of file | ||
diff --git a/build_test.mk b/build_test.mk index ee15a4572..32bb4d807 100644 --- a/build_test.mk +++ b/build_test.mk | |||
| @@ -43,6 +43,9 @@ VPATH += $(COMMON_VPATH) | |||
| 43 | 43 | ||
| 44 | include $(TMK_PATH)/common.mk | 44 | include $(TMK_PATH)/common.mk |
| 45 | include $(QUANTUM_PATH)/serial_link/tests/rules.mk | 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 | $(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC) | 50 | $(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC) |
| 48 | $(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC) | 51 | $(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC) |
diff --git a/testlist.mk b/testlist.mk index 1884d6d3f..d949fb3ea 100644 --- a/testlist.mk +++ b/testlist.mk | |||
| @@ -1,3 +1,6 @@ | |||
| 1 | TEST_LIST = $(notdir $(patsubst %/rules.mk,%,$(wildcard $(ROOT_DIR)/tests/*/rules.mk))) | ||
| 2 | FULL_TESTS := $(TEST_LIST) | ||
| 3 | |||
| 1 | include $(ROOT_DIR)/quantum/serial_link/tests/testlist.mk | 4 | include $(ROOT_DIR)/quantum/serial_link/tests/testlist.mk |
| 2 | 5 | ||
| 3 | define VALIDATE_TEST_LIST | 6 | define VALIDATE_TEST_LIST |
| @@ -10,4 +13,5 @@ define VALIDATE_TEST_LIST | |||
| 10 | endif | 13 | endif |
| 11 | endef | 14 | endef |
| 12 | 15 | ||
| 16 | |||
| 13 | $(eval $(call VALIDATE_TEST_LIST,$(firstword $(TEST_LIST)),$(wordlist 2,9999,$(TEST_LIST)))) \ No newline at end of file | 17 | $(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 000000000..c24fdcf3f --- /dev/null +++ b/tests/basic/config.h | |||
| @@ -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_ */ | ||
diff --git a/tests/basic/rules.mk b/tests/basic/rules.mk new file mode 100644 index 000000000..0405b9d0f --- /dev/null +++ b/tests/basic/rules.mk | |||
| @@ -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/>. \ No newline at end of file | ||
diff --git a/tests/basic/test.c b/tests/basic/test.c new file mode 100644 index 000000000..01d1930ea --- /dev/null +++ b/tests/basic/test.c | |||
| @@ -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 | |||
