18 # 2 along with this work; if not, write to the Free Software Foundation, 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 # 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 # or visit www.oracle.com if you need additional information or have any 23 # questions. 24 # 25 26 # 27 # Makefile to run tests from multiple sibling directories 28 # 29 30 # Root of the forest that was built 31 TOPDIR=.. 32 33 # This makefile depends on the availability of sibling directories. 34 LANGTOOLS_DIR=$(TOPDIR)/langtools 35 JDK_DIR=$(TOPDIR)/jdk 36 JAXP_DIR=$(TOPDIR)/jaxp 37 HOTSPOT_DIR=$(TOPDIR)/hotspot 38 39 # Macro to run a test target in a subdir 40 define SUBDIR_TEST # subdirectory target 41 if [ -d $1 ] ; then \ 42 if [ -r $1/test/Makefile ] ; then \ 43 echo "$(MAKE) -k -C $1/test $2" ; \ 44 $(MAKE) -k -C $1/test $2 ; \ 45 else \ 46 echo "ERROR: File does not exist: $1/test/Makefile"; \ 47 exit 1; \ 48 fi; \ 49 else \ 50 echo "WARNING: No testing done, directory does not exist: $1"; \ 51 fi 52 endef 53 54 # Default test target (core) 55 default: jdk_core langtools_jtreg jaxp_all 56 57 # All testing 58 all: jdk_all langtools_all jaxp_all 59 60 # Test targets 61 langtools_% : 62 @$(NO_STOPPING)$(call SUBDIR_TEST, $(LANGTOOLS_DIR), JT_JAVA=$(PRODUCT_HOME) JTREG_HOME=$(JT_HOME) TEST="$(subst langtools_,,$@)" $(subst langtools_,,$@)) 63 64 jdk_% core_%s svc_%: 65 @$(NO_STOPPING)$(call SUBDIR_TEST, $(JDK_DIR), TEST="$@" $@) 66 67 jaxp_%: 68 @$(NO_STOPPING)$(call SUBDIR_TEST, $(JAXP_DIR), TEST="$@" $@) 69 70 hotspot_%: 71 @$(NO_STOPPING)$(call SUBDIR_TEST, $(HOTSPOT_DIR), TEST="$@" $@) 72 73 # 74 # jtreg_tests 75 # 76 # Invocation: 77 # 78 # make jtreg_tests TESTDIRS=<test-dirs> 79 # 80 # where <test-dirs> is something like '../<component>/test/runtime', 81 # <component> in turn being one of the top level directories (for 82 # example 'hotspot'). 83 # 84 # The below will strip the path prefix and delegate to the 85 # corresponding ../<component>/test/Makefile. 86 87 ifneq ($(TESTDIRS),) 88 # Extract the component from ../<component>/... 89 COMPONENT=$(word 2,$(subst /, ,$(TESTDIRS))) 90 91 # Strip off the ../<component>/test prefix and pass the rest as TESTDIRS | 18 # 2 along with this work; if not, write to the Free Software Foundation, 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 # 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 # or visit www.oracle.com if you need additional information or have any 23 # questions. 24 # 25 26 # 27 # Makefile to run tests from multiple sibling directories 28 # 29 30 # Root of the forest that was built 31 TOPDIR=.. 32 33 # This makefile depends on the availability of sibling directories. 34 LANGTOOLS_DIR=$(TOPDIR)/langtools 35 JDK_DIR=$(TOPDIR)/jdk 36 JAXP_DIR=$(TOPDIR)/jaxp 37 HOTSPOT_DIR=$(TOPDIR)/hotspot 38 NASHORN_DIR=$(TOPDIR)/nashorn 39 40 # Macro to run a test target in a subdir 41 define SUBDIR_TEST # subdirectory target 42 if [ -d $1 ] ; then \ 43 if [ -r $1/test/Makefile ] ; then \ 44 echo "$(MAKE) -k -C $1/test $2" ; \ 45 $(MAKE) -k -C $1/test $2 ; \ 46 else \ 47 echo "ERROR: File does not exist: $1/test/Makefile"; \ 48 exit 1; \ 49 fi; \ 50 else \ 51 echo "WARNING: No testing done, directory does not exist: $1"; \ 52 fi 53 endef 54 55 # Default test target (core) 56 default: jdk_core langtools_jtreg jaxp_all 57 58 # All testing 59 all: jdk_all langtools_all jaxp_all 60 61 # Tiered testing 62 # TODO: Include full set of repos (jaxp, nashorn, jdk, langtools) in each tier. 63 tier1: jaxp_tier1 nashorn_tier1 64 65 tier2: jaxp_tier2 nashorn_tier2 66 67 tier3: jdk_tier3 langtools_tier3 jaxp_tier3 nashorn_tier3 68 69 # Test targets 70 langtools_% : 71 @$(NO_STOPPING)$(call SUBDIR_TEST, $(LANGTOOLS_DIR), JT_JAVA=$(PRODUCT_HOME) JTREG_HOME=$(JT_HOME) TEST="$(subst langtools_,,$@)" $(subst langtools_,,$@)) 72 73 jdk_% core_%s svc_%: 74 @$(NO_STOPPING)$(call SUBDIR_TEST, $(JDK_DIR), TEST="$@" $@) 75 76 jaxp_%: 77 @$(NO_STOPPING)$(call SUBDIR_TEST, $(JAXP_DIR), TEST="$@" $@) 78 79 hotspot_%: 80 @$(NO_STOPPING)$(call SUBDIR_TEST, $(HOTSPOT_DIR), TEST="$@" $@) 81 82 nashorn_%: 83 @$(NO_STOPPING)$(call SUBDIR_TEST, $(NASHORN_DIR), TEST="$@" $@) 84 85 # 86 # jtreg_tests 87 # 88 # Invocation: 89 # 90 # make jtreg_tests TESTDIRS=<test-dirs> 91 # 92 # where <test-dirs> is something like '../<component>/test/runtime', 93 # <component> in turn being one of the top level directories (for 94 # example 'hotspot'). 95 # 96 # The below will strip the path prefix and delegate to the 97 # corresponding ../<component>/test/Makefile. 98 99 ifneq ($(TESTDIRS),) 100 # Extract the component from ../<component>/... 101 COMPONENT=$(word 2,$(subst /, ,$(TESTDIRS))) 102 103 # Strip off the ../<component>/test prefix and pass the rest as TESTDIRS |