summaryrefslogtreecommitdiff
path: root/builddefs/testlist.mk
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2022-02-10 17:45:51 +0000
committerGitHub <noreply@github.com>2022-02-10 09:45:51 -0800
commitf7e7671f691cfd42f322198f04690727f6493d73 (patch)
tree9c705a6a1a594263ab273cba62affa3fa7e5d28e /builddefs/testlist.mk
parent7a0fd646e37795aa843d369a5c80d99118cca868 (diff)
Migrate more makefile utilities to builddefs sub-directory (#16002)
Diffstat (limited to 'builddefs/testlist.mk')
-rw-r--r--builddefs/testlist.mk19
1 files changed, 19 insertions, 0 deletions
diff --git a/builddefs/testlist.mk b/builddefs/testlist.mk
new file mode 100644
index 0000000000..86da5668ac
--- /dev/null
+++ b/builddefs/testlist.mk
@@ -0,0 +1,19 @@
+TEST_LIST = $(sort $(patsubst %/test.mk,%, $(shell find $(ROOT_DIR)tests -type f -name test.mk)))
+FULL_TESTS := $(notdir $(TEST_LIST))
+
+include $(QUANTUM_PATH)/debounce/tests/testlist.mk
+include $(QUANTUM_PATH)/sequencer/tests/testlist.mk
+include $(PLATFORM_PATH)/test/testlist.mk
+
+define VALIDATE_TEST_LIST
+ ifneq ($1,)
+ ifeq ($$(findstring -,$1),-)
+ $$(call CATASTROPHIC_ERROR,Invalid test name,Test names can't contain '-', but '$1' does.)
+ else
+ $$(eval $$(call VALIDATE_TEST_LIST,$$(firstword $2),$$(wordlist 2,9999,$2)))
+ endif
+ endif
+endef
+
+
+$(eval $(call VALIDATE_TEST_LIST,$(firstword $(TEST_LIST)),$(wordlist 2,9999,$(TEST_LIST))))