Makefile revision 615:7817368287cd
1193323Sed# 2193323Sed# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 3193323Sed# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4193323Sed# 5193323Sed# This code is free software; you can redistribute it and/or modify it 6193323Sed# under the terms of the GNU General Public License version 2 only, as 7193323Sed# published by the Free Software Foundation. Oracle designates this 8193323Sed# particular file as subject to the "Classpath" exception as provided 9193323Sed# by Oracle in the LICENSE file that accompanied this code. 10193323Sed# 11193323Sed# This code is distributed in the hope that it will be useful, but WITHOUT 12193323Sed# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13193323Sed# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14193323Sed# version 2 for more details (a copy is included in the LICENSE file that 15193323Sed# accompanied this code). 16193323Sed# 17193323Sed# You should have received a copy of the GNU General Public License version 18193323Sed# 2 along with this work; if not, write to the Free Software Foundation, 19193323Sed# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20193323Sed# 21193323Sed# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22193323Sed# or visit www.oracle.com if you need additional information or have any 23198090Srdivacky# questions. 24193323Sed# 25193323Sed 26193323Sed# 27193323Sed# Makefile to run tests from multiple sibling directories 28193323Sed# 29193323Sed 30193323Sed# Root of the forest that was built 31280031SdimTOPDIR=.. 32193323Sed 33193323Sed# This makefile depends on the availability of sibling directories. 34276479SdimLANGTOOLS_DIR=$(TOPDIR)/langtools 35193323SedJDK_DIR=$(TOPDIR)/jdk 36198090Srdivacky 37193323Sed# Macro to run a test target in a subdir 38193323Seddefine SUBDIR_TEST # subdirectory target 39193323Sedif [ -d $1 ] ; then \ 40249423Sdim if [ -r $1/test/Makefile ] ; then \ 41198090Srdivacky echo "$(MAKE) -k -C $1/test $2" ; \ 42249423Sdim $(MAKE) -k -C $1/test $2 ; \ 43261991Sdim else \ 44193323Sed echo "ERROR: File does not exist: $1/test/Makefile"; \ 45276479Sdim exit 1; \ 46193323Sed fi; \ 47193323Sedelse \ 48193323Sed echo "WARNING: No testing done, directory does not exist: $1"; \ 49193323Sedfi 50193323Sedendef 51193323Sed 52193323Sed# Test target list for langtools repository 53193323SedLANGTOOLS_TEST_LIST = langtools_jtreg 54193323Sed 55193323Sed# Test target list for jdk repository 56193323SedJDK_ALL_TEST_LIST = \ 57193323Sed jdk_beans1 \ 58193323Sed jdk_io \ 59193323Sed jdk_lang \ 60193323Sed jdk_math \ 61193323Sed jdk_other \ 62218885Sdim jdk_net \ 63193323Sed jdk_nio \ 64193323Sed jdk_security1 \ 65280031Sdim jdk_text \ 66280031Sdim jdk_util \ 67280031Sdim jdk_time \ 68280031Sdim jdk_awt \ 69288943Sdim jdk_beans2 jdk_beans3 \ 70288943Sdim jdk_management \ 71288943Sdim jdk_jmx \ 72288943Sdim jdk_security2 jdk_security3 \ 73218885Sdim jdk_rmi \ 74218885Sdim jdk_sound \ 75218885Sdim jdk_swing \ 76218885Sdim jdk_tools \ 77193323Sed jdk_jdi \ 78193323Sed jdk_jfr 79218885Sdim 80193323Sed# Theses are meta test targets in jdk 81218885SdimJDK_META_TEST_LIST = jdk_all jdk_default jdk_core 82193323Sed 83193323Sed# These are the current jck test targets in the jdk repository 84193323SedJDK_JCK7_LIST = jck7devtools jck7compiler jck7runtime 85193323Sed 86280031Sdim# Default test target (core) 87280031Sdimdefault: jdk_core $(LANGTOOLS_TEST_LIST) 88193323Sed 89193323Sed# All testing 90193323Sedall: $(JDK_ALL_TEST_LIST) $(LANGTOOLS_TEST_LIST) 91193323Sed 92276479Sdim# Test targets 93193323Sed$(LANGTOOLS_TEST_LIST): 94198090Srdivacky @$(NO_STOPPING)$(call SUBDIR_TEST, $(LANGTOOLS_DIR), $(subst langtools_,,$@)) 95193323Sed 96193323Sed$(JDK_ALL_TEST_LIST) $(JDK_META_TEST_LIST) $(JDK_JCK7_LIST): 97193323Sed @$(NO_STOPPING)$(call SUBDIR_TEST, $(JDK_DIR), $@) 98193323Sed 99193323Sedclean: 100193323Sed 101198090Srdivacky################################################################ 102198090Srdivacky 103276479Sdim# Phony targets (e.g. these are not filenames) 104198090Srdivacky.PHONY: all clean \ 105193323Sed $(JDK_ALL_TEST_LIST) $(JDK_META_TEST_LIST) $(JDK_JCK7_LIST) \ 106276479Sdim $(LANGTOOLS_TEST_LIST) 107249423Sdim 108249423Sdim################################################################ 109249423Sdim 110249423Sdim