diff a/make/common/FindTests.gmk b/make/common/FindTests.gmk --- a/make/common/FindTests.gmk +++ b/make/common/FindTests.gmk @@ -50,13 +50,14 @@ # use include to get at the contents instead of expensive shell calls. We are # looking for the "groups" property in each file. JTREG_ROOT_FILES := $(addsuffix /TEST.ROOT, $(JTREG_TESTROOTS)) JTREG_GROUP_FILES := $(foreach root, $(JTREG_TESTROOTS), \ - $(eval include $(root)/TEST.ROOT) \ - $(eval $(root)_JTREG_GROUP_FILES := $$(addprefix $(root)/, $$(groups))) \ - $(eval JTREG_GROUP_FILES += $$($(root)_JTREG_GROUP_FILES)) \ + $(if $(wildcard $(root)/TEST.ROOT), \ + $(eval include $(root)/TEST.ROOT) \ + $(eval $(root)_JTREG_GROUP_FILES := $$(addprefix $(root)/, $$(groups))) \ + $(eval JTREG_GROUP_FILES += $$($(root)_JTREG_GROUP_FILES))) \ ) # Cache the expensive to calculate test names in a generated makefile. FIND_TESTS_CACHE_FILE := $(MAKESUPPORT_OUTPUTDIR)/find-tests.gmk