Skip to content

Commit b4f4a69

Browse files
author
mikael
committedJul 16, 2014
8050825: Support running regression tests using jtreg_tests+TESTDIRS from top level
Reviewed-by: dholmes, mduigou
1 parent 8ec2044 commit b4f4a69

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
 

‎test/Makefile

+26
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,32 @@ jdk_% core_%s svc_%:
6666
hotspot_%:
6767
@$(NO_STOPPING)$(call SUBDIR_TEST, $(HOTSPOT_DIR), TEST="$@" $@)
6868

69+
#
70+
# jtreg_tests
71+
#
72+
# Invocation:
73+
#
74+
# make jtreg_tests TESTDIRS=<test-dirs>
75+
#
76+
# where <test-dirs> is something like '../<component>/test/runtime',
77+
# <component> in turn being one of the top level directories (for
78+
# example 'hotspot').
79+
#
80+
# The below will strip the path prefix and delegate to the
81+
# corresponding ../<component>/test/Makefile.
82+
83+
ifneq ($(TESTDIRS),)
84+
# Extract the component from ../<component>/...
85+
COMPONENT=$(word 2,$(subst /, ,$(TESTDIRS)))
86+
87+
# Strip off the ../<component>/test prefix and pass the rest as TESTDIRS
88+
# to the delegate Makefile
89+
TESTDIRS_TESTS=$(patsubst ../$(COMPONENT)/test/%,%,$(TESTDIRS))
90+
endif
91+
92+
jtreg_tests:
93+
@$(NO_STOPPING)$(call SUBDIR_TEST, $(TOPDIR)/$(COMPONENT), TESTDIRS=$(TESTDIRS_TESTS) $@)
94+
6995
################################################################
7096

7197
# Phony targets (e.g. these are not filenames)

0 commit comments

Comments
 (0)
Please sign in to comment.