Makefile revision 325
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# This code is free software; you can redistribute it and/or modify it
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# under the terms of the GNU General Public License version 2 only, as
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# published by the Free Software Foundation. Oracle designates this
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# particular file as subject to the "Classpath" exception as provided
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# by Oracle in the LICENSE file that accompanied this code.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# This code is distributed in the hope that it will be useful, but WITHOUT
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# version 2 for more details (a copy is included in the LICENSE file that
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# accompanied this code).
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# You should have received a copy of the GNU General Public License version
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# 2 along with this work; if not, write to the Free Software Foundation,
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# or visit www.oracle.com if you need additional information or have any
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson# questions.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Makefile to run tests from multiple sibling directories
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Root of the forest that was built
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonTOPDIR=..
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# This makefile depends on the availability of sibling directories.
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonLANGTOOLS_DIR=$(TOPDIR)/langtools
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonJDK_DIR=$(TOPDIR)/jdk
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Macro to run a test target in a subdir
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssondefine SUBDIR_TEST # subdirectory target
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonif [ -d $1 ] ; then \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson if [ -r $1/test/Makefile ] ; then \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson echo "$(MAKE) -C $1/test $2" ; \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson $(MAKE) -C $1/test $2 ; \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson else \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson echo "ERROR: File does not exist: $1/test/Makefile"; \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson exit 1; \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson fi; \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonelse \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson echo "WARNING: No testing done, directory does not exist: $1"; \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonfi
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonendef
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Test target list for langtools repository
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonLANGTOOLS_TEST_LIST = langtools_jtreg
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Test target list for jdk repository
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonJDK_TEST_LIST = \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson jdk_beans1 jdk_beans2 jdk_beans3 \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson jdk_io \
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson jdk_lang \
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson jdk_management1 jdk_management2 \
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson jdk_math \
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson jdk_misc \
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson jdk_net \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson jdk_nio1 jdk_nio2 jdk_nio3 \
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson jdk_security1 jdk_security2 jdk_security3 \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson jdk_text \
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson jdk_tools1 jdk_tools2 \
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson jdk_util
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# These tests need a DISPLAY and can create window interaction complications
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonJDK_TEST_LIST2 = \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson jdk_awt \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson jdk_rmi \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson jdk_swing
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson# These are the current jck test targets in the jdk repository
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonJDK_JCK7_LIST = jck7devtools jck7compiler jck7runtime
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Default test target (everything)
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonall: $(JDK_TEST_LIST) $(LANGTOOLS_TEST_LIST)
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Test targets
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson$(LANGTOOLS_TEST_LIST):
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson @$(NO_STOPPING)$(call SUBDIR_TEST, $(LANGTOOLS_DIR), $(subst langtools_,,$@))
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson$(JDK_TEST_LIST) $(JDK_TEST_LIST2) $(JDK_JCK7_LIST):
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson @$(NO_STOPPING)$(call SUBDIR_TEST, $(JDK_DIR), $@)
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonclean:
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson################################################################
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Phony targets (e.g. these are not filenames)
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson.PHONY: all clean \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson $(JDK_TEST_LIST) $(JDK_TEST_LIST2) $(JDK_JCK7_LIST) \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson $(LANGTOOLS_TEST_LIST)
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson################################################################
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson