1.1 --- a/test/Makefile Wed Apr 22 11:11:03 2015 -0700 1.2 +++ b/test/Makefile Tue Jul 15 21:45:50 2014 -0700 1.3 @@ -66,6 +66,32 @@ 1.4 hotspot_%: 1.5 @$(NO_STOPPING)$(call SUBDIR_TEST, $(HOTSPOT_DIR), TEST="$@" $@) 1.6 1.7 +# 1.8 +# jtreg_tests 1.9 +# 1.10 +# Invocation: 1.11 +# 1.12 +# make jtreg_tests TESTDIRS=<test-dirs> 1.13 +# 1.14 +# where <test-dirs> is something like '../<component>/test/runtime', 1.15 +# <component> in turn being one of the top level directories (for 1.16 +# example 'hotspot'). 1.17 +# 1.18 +# The below will strip the path prefix and delegate to the 1.19 +# corresponding ../<component>/test/Makefile. 1.20 + 1.21 +ifneq ($(TESTDIRS),) 1.22 +# Extract the component from ../<component>/... 1.23 +COMPONENT=$(word 2,$(subst /, ,$(TESTDIRS))) 1.24 + 1.25 +# Strip off the ../<component>/test prefix and pass the rest as TESTDIRS 1.26 +# to the delegate Makefile 1.27 +TESTDIRS_TESTS=$(patsubst ../$(COMPONENT)/test/%,%,$(TESTDIRS)) 1.28 +endif 1.29 + 1.30 +jtreg_tests: 1.31 + @$(NO_STOPPING)$(call SUBDIR_TEST, $(TOPDIR)/$(COMPONENT), TESTDIRS=$(TESTDIRS_TESTS) $@) 1.32 + 1.33 ################################################################ 1.34 1.35 # Phony targets (e.g. these are not filenames)