diff -r 6ff963c0dd41 -r 7de830a4c219 test/Makefile --- a/test/Makefile Wed Apr 22 11:11:03 2015 -0700 +++ b/test/Makefile Tue Jul 15 21:45:50 2014 -0700 @@ -66,6 +66,32 @@ hotspot_%: @$(NO_STOPPING)$(call SUBDIR_TEST, $(HOTSPOT_DIR), TEST="$@" $@) +# +# jtreg_tests +# +# Invocation: +# +# make jtreg_tests TESTDIRS= +# +# where is something like '..//test/runtime', +# in turn being one of the top level directories (for +# example 'hotspot'). +# +# The below will strip the path prefix and delegate to the +# corresponding ..//test/Makefile. + +ifneq ($(TESTDIRS),) +# Extract the component from ..//... +COMPONENT=$(word 2,$(subst /, ,$(TESTDIRS))) + +# Strip off the ..//test prefix and pass the rest as TESTDIRS +# to the delegate Makefile +TESTDIRS_TESTS=$(patsubst ../$(COMPONENT)/test/%,%,$(TESTDIRS)) +endif + +jtreg_tests: + @$(NO_STOPPING)$(call SUBDIR_TEST, $(TOPDIR)/$(COMPONENT), TESTDIRS=$(TESTDIRS_TESTS) $@) + ################################################################ # Phony targets (e.g. these are not filenames)