aboutsummaryrefslogtreecommitdiff
path: root/mk/lib.mk
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-07-19 11:17:57 -0400
committerGitHub <noreply@github.com>2023-07-19 11:17:57 -0400
commit453c4be93cb10b417a7140d9f8b7185f9785b7a6 (patch)
tree535e9aaac03e43f117e1dd5048232eba2f5213ef /mk/lib.mk
parentb0173716f6b27b4fb307ac9ded544e46e712ad22 (diff)
parent259e328de81a91cf824efb0603f57fcde94ad3ff (diff)
Merge pull request #8680 from NixLayeredStore/test-groups
Introduce notion of a test group, use for CA tests
Diffstat (limited to 'mk/lib.mk')
-rw-r--r--mk/lib.mk20
1 files changed, 19 insertions, 1 deletions
diff --git a/mk/lib.mk b/mk/lib.mk
index 34fa624d8..e86a7f1a4 100644
--- a/mk/lib.mk
+++ b/mk/lib.mk
@@ -10,6 +10,7 @@ bin-scripts :=
noinst-scripts :=
man-pages :=
install-tests :=
+install-tests-groups :=
ifdef HOST_OS
HOST_KERNEL = $(firstword $(subst -, ,$(HOST_OS)))
@@ -121,7 +122,16 @@ $(foreach script, $(bin-scripts), $(eval $(call install-program-in,$(script),$(b
$(foreach script, $(bin-scripts), $(eval programs-list += $(script)))
$(foreach script, $(noinst-scripts), $(eval programs-list += $(script)))
$(foreach template, $(template-files), $(eval $(call instantiate-template,$(template))))
-$(foreach test, $(install-tests), $(eval $(call run-install-test,$(test))))
+$(foreach test, $(install-tests), \
+ $(eval $(call run-install-test,$(test))) \
+ $(eval installcheck: $(test).test))
+$(foreach test-group, $(install-tests-groups), \
+ $(eval $(call run-install-test-group,$(test-group))) \
+ $(eval installcheck: $(test-group).test-group) \
+ $(foreach test, $($(test-group)-tests), \
+ $(eval $(call run-install-test,$(test))) \
+ $(eval $(test-group).test-group: $(test).test)))
+
$(foreach file, $(man-pages), $(eval $(call install-data-in, $(file), $(mandir)/man$(patsubst .%,%,$(suffix $(file))))))
@@ -152,6 +162,14 @@ ifdef libs-list
@echo ""
@for i in $(libs-list); do echo " $$i"; done
endif
+ifdef install-tests-groups
+ @echo ""
+ @echo "The following groups of functional tests can be run:"
+ @echo ""
+ @for i in $(install-tests-groups); do echo " $$i.test-group"; done
+ @echo ""
+ @echo "(installcheck includes tests in test groups too.)"
+endif
@echo ""
@echo "The following variables control the build:"
@echo ""