OpenJDK / jdk / jdk12
changeset 25461:2842cbf0da97
8050825: Support running regression tests using jtreg_tests+TESTDIRS from top level
Reviewed-by: dholmes, mduigou
author | mikael |
---|---|
date | Tue, 15 Jul 2014 21:45:50 -0700 |
parents | e479cd2b829d |
children | 789a49ce93c8 0d18591d71d8 1a806d6ffdfc |
files | test/Makefile |
diffstat | 1 files changed, 26 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/test/Makefile Fri Jul 11 21:07:48 2014 -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=<test-dirs> +# +# where <test-dirs> is something like '../<component>/test/runtime', +# <component> in turn being one of the top level directories (for +# example 'hotspot'). +# +# The below will strip the path prefix and delegate to the +# corresponding ../<component>/test/Makefile. + +ifneq ($(TESTDIRS),) +# Extract the component from ../<component>/... +COMPONENT=$(word 2,$(subst /, ,$(TESTDIRS))) + +# Strip off the ../<component>/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)