blob: bb5a34fde0ab9bd224c80265f7b677ac72ab5a68 [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001#
Kelly O'Haire4fce692010-03-06 14:59:23 -08002# Copyright 1995-2010 Sun Microsystems, Inc. All Rights Reserved.
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -07003# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# This code is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 2 only, as
7# published by the Free Software Foundation. Sun designates this
8# particular file as subject to the "Classpath" exception as provided
9# by Sun in the LICENSE file that accompanied this code.
10#
11# This code is distributed in the hope that it will be useful, but WITHOUT
12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14# version 2 for more details (a copy is included in the LICENSE file that
15# accompanied this code).
16#
17# You should have received a copy of the GNU General Public License version
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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22# CA 95054 USA or visit www.sun.com if you need additional information or
23# have any questions.
24#
25
26#
27# Makefile to run various jdk tests
J. Duke319a3b92007-12-01 00:00:00 +000028#
29
Kelly O'Haird1258922009-11-08 15:11:10 -080030# Empty these to get rid of some default rules
31.SUFFIXES:
32.SUFFIXES: .java
33CO=
34GET=
35
36# Utilities used
37AWK = awk
38CAT = cat
39CD = cd
Kelly O'Haird1258922009-11-08 15:11:10 -080040CP = cp
41CUT = cut
42ECHO = echo
43EGREP = egrep
44EXPAND = expand
Kelly O'Haird1258922009-11-08 15:11:10 -080045MKDIR = mkdir
Kelly O'Haird1258922009-11-08 15:11:10 -080046PWD = pwd
47SED = sed
Kelly O'Haird1258922009-11-08 15:11:10 -080048SORT = sort
49TEE = tee
50UNAME = uname
51UNIQ = uniq
52WC = wc
Kelly O'Haird1258922009-11-08 15:11:10 -080053ZIP = zip
54
55# Get OS name from uname
56UNAME_S := $(shell $(UNAME) -s)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -070057
58# Commands to run on paths to make mixed paths for java on windows
Kelly O'Haird1258922009-11-08 15:11:10 -080059GETMIXEDPATH=$(ECHO)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -070060
61# Location of developer shared files
62SLASH_JAVA = /java
63
64# Platform specific settings
Kelly O'Haird1258922009-11-08 15:11:10 -080065ifeq ($(UNAME_S), SunOS)
66 OS_NAME = solaris
67 OS_ARCH := $(shell $(UNAME) -p)
68 OS_VERSION := $(shell $(UNAME) -r)
J. Duke319a3b92007-12-01 00:00:00 +000069endif
Kelly O'Haird1258922009-11-08 15:11:10 -080070ifeq ($(UNAME_S), Linux)
71 OS_NAME = linux
72 OS_ARCH := $(shell $(UNAME) -m)
73 OS_VERSION := $(shell $(UNAME) -r)
J. Duke319a3b92007-12-01 00:00:00 +000074endif
Kelly O'Haird1258922009-11-08 15:11:10 -080075ifndef OS_NAME
76 ifneq ($(PROCESSOR_IDENTIFIER), )
77 OS_NAME = windows
78 SLASH_JAVA = J:
79 # A variety of ways to say X64 arch :^(
80 OS_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER))
81 EXESUFFIX = .exe
82 # These need to be different depending on MKS or CYGWIN
83 ifeq ($(findstring cygdrive,$(shell ($(CD) C:/ && $(PWD)))), )
84 GETMIXEDPATH = dosname -s
85 OS_VERSION := $(shell $(UNAME) -r)
J. Duke319a3b92007-12-01 00:00:00 +000086 else
Kelly O'Haird1258922009-11-08 15:11:10 -080087 GETMIXEDPATH = cygpath -m -s
88 OS_VERSION := $(shell $(UNAME) -s | $(CUT) -d'-' -f2)
J. Duke319a3b92007-12-01 00:00:00 +000089 endif
90 endif
Kelly O'Haird1258922009-11-08 15:11:10 -080091endif
92
93# Only want major and minor numbers from os version
94OS_VERSION := $(shell $(ECHO) "$(OS_VERSION)" | $(CUT) -d'.' -f1,2)
95
96# Try and use names i586, x64, and ia64 consistently
97OS_ARCH:=$(subst X64,x64,$(OS_ARCH))
98OS_ARCH:=$(subst AMD64,x64,$(OS_ARCH))
99OS_ARCH:=$(subst amd64,x64,$(OS_ARCH))
100OS_ARCH:=$(subst x86_64,x64,$(OS_ARCH))
101OS_ARCH:=$(subst EM64T,x64,$(OS_ARCH))
102OS_ARCH:=$(subst em64t,x64,$(OS_ARCH))
103OS_ARCH:=$(subst intel64,x64,$(OS_ARCH))
104OS_ARCH:=$(subst Intel64,x64,$(OS_ARCH))
105OS_ARCH:=$(subst INTEL64,x64,$(OS_ARCH))
106OS_ARCH:=$(subst IA64,ia64,$(OS_ARCH))
107OS_ARCH:=$(subst X86,i586,$(OS_ARCH))
108OS_ARCH:=$(subst x86,i586,$(OS_ARCH))
109OS_ARCH:=$(subst i386,i586,$(OS_ARCH))
110OS_ARCH:=$(subst i486,i586,$(OS_ARCH))
111OS_ARCH:=$(subst i686,i586,$(OS_ARCH))
112
113# Check for ARCH_DATA_MODEL, adjust OS_ARCH accordingly
114ifndef ARCH_DATA_MODEL
115 ARCH_DATA_MODEL=32
116endif
117ARCH_DATA_MODEL_ERROR= \
118 ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) cannot be used with $(OS_NAME)-$(ARCH)
119ifeq ($(ARCH_DATA_MODEL),64)
120 ifeq ($(OS_NAME)-$(OS_ARCH),solaris-i586)
121 OS_ARCH=x64
122 endif
123 ifeq ($(OS_NAME)-$(OS_ARCH),solaris-sparc)
124 OS_ARCH=sparcv9
125 endif
126 ifeq ($(OS_ARCH),i586)
127 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
128 endif
129 ifeq ($(OS_ARCH),sparc)
130 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
131 endif
132else
133 ifeq ($(ARCH_DATA_MODEL),32)
134 ifeq ($(OS_ARCH),x64)
135 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
136 endif
137 ifeq ($(OS_ARCH),ia64)
138 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
139 endif
140 ifeq ($(OS_ARCH),sparcv9)
141 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
142 endif
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700143 else
Kelly O'Haird1258922009-11-08 15:11:10 -0800144 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700145 endif
J. Duke319a3b92007-12-01 00:00:00 +0000146endif
147
148# Root of this test area (important to use full paths in some places)
Kelly O'Haird1258922009-11-08 15:11:10 -0800149TEST_ROOT := $(shell $(PWD))
J. Duke319a3b92007-12-01 00:00:00 +0000150
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700151# Root of all test results
152ifdef ALT_OUTPUTDIR
153 ABS_OUTPUTDIR = $(ALT_OUTPUTDIR)
J. Duke319a3b92007-12-01 00:00:00 +0000154else
Kelly O'Haird1258922009-11-08 15:11:10 -0800155 ABS_OUTPUTDIR = $(TEST_ROOT)/../build/$(OS_NAME)-$(OS_ARCH)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700156endif
157ABS_BUILD_ROOT = $(ABS_OUTPUTDIR)
Kelly O'Haird1258922009-11-08 15:11:10 -0800158ABS_TEST_OUTPUT_DIR := $(ABS_BUILD_ROOT)/testoutput/$(UNIQUE_DIR)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700159
160# Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test)
161ifndef PRODUCT_HOME
162 # Try to use j2sdk-image if it exists
163 ABS_JDK_IMAGE = $(ABS_BUILD_ROOT)/j2sdk-image
164 PRODUCT_HOME := \
165 $(shell \
166 if [ -d $(ABS_JDK_IMAGE) ] ; then \
167 $(ECHO) "$(ABS_JDK_IMAGE)"; \
168 else \
Kelly O'Haird1258922009-11-08 15:11:10 -0800169 $(ECHO) "$(ABS_BUILD_ROOT)"; \
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700170 fi)
171 PRODUCT_HOME := $(PRODUCT_HOME)
J. Duke319a3b92007-12-01 00:00:00 +0000172endif
173
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700174# Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.)
175# Should be passed into 'java' only.
Kelly O'Haird1258922009-11-08 15:11:10 -0800176# Could include: -d64 -server -client OR any java option
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700177ifdef JPRT_PRODUCT_ARGS
178 JAVA_ARGS = $(JPRT_PRODUCT_ARGS)
179endif
J. Duke319a3b92007-12-01 00:00:00 +0000180
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700181# Expect JPRT to set JPRT_PRODUCT_VM_ARGS (e.g. -Xcomp etc.)
182# Should be passed into anything running the vm (java, javac, javadoc, ...).
183ifdef JPRT_PRODUCT_VM_ARGS
184 JAVA_VM_ARGS = $(JPRT_PRODUCT_VM_ARGS)
185endif
J. Duke319a3b92007-12-01 00:00:00 +0000186
Kelly O'Haird1258922009-11-08 15:11:10 -0800187# Check JAVA_ARGS arguments based on ARCH_DATA_MODEL etc.
188ifeq ($(OS_NAME),solaris)
189 D64_ERROR_MESSAGE=Mismatch between ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) and use of -d64 in JAVA_ARGS=$(JAVA_ARGS)
190 ifeq ($(ARCH_DATA_MODEL),32)
191 ifneq ($(findstring -d64,$(JAVA_ARGS)),)
192 x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)")
193 endif
194 endif
195 ifeq ($(ARCH_DATA_MODEL),64)
196 ifeq ($(findstring -d64,$(JAVA_ARGS)),)
197 x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)")
198 endif
199 endif
200endif
201
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700202# Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
203ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip
204ifdef JPRT_ARCHIVE_BUNDLE
205 ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE)
206endif
J. Duke319a3b92007-12-01 00:00:00 +0000207
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700208# How to create the test bundle (pass or fail, we want to create this)
209# Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed.
210ZIP_UP_RESULTS = ( $(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)` \
211 && $(CD) $(ABS_TEST_OUTPUT_DIR) \
212 && $(ZIP) -q -r $(ARCHIVE_BUNDLE) . )
Kelly O'Haird1258922009-11-08 15:11:10 -0800213SUMMARY_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport/text/summary.txt
214STATS_TXT_NAME = Stats.txt
215STATS_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/$(STATS_TXT_NAME)
216RUNLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/runlist.txt
217PASSLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/passlist.txt
218FAILLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/faillist.txt
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800219EXITCODE = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/exitcode.txt
220
221TESTEXIT = \
222 if [ ! -s $(EXITCODE) ] ; then \
223 $(ECHO) "ERROR: EXITCODE file not filled in."; \
224 $(ECHO) "1" > $(EXITCODE); \
225 fi ; \
226 testExitCode=`$(CAT) $(EXITCODE)`; \
227 $(ECHO) "EXIT CODE: $${testExitCode}"; \
Kelly O'Hair61c09152009-12-09 09:46:57 -0800228 exit $${testExitCode}
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800229
Kelly O'Haird1258922009-11-08 15:11:10 -0800230BUNDLE_UP_AND_EXIT = \
231( \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800232 jtregExitCode=$$? && \
Kelly O'Haird1258922009-11-08 15:11:10 -0800233 _summary="$(SUMMARY_TXT)"; \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800234 $(RM) -f $(STATS_TXT) $(RUNLIST) $(PASSLIST) $(FAILLIST) $(EXITCODE); \
235 $(ECHO) "$${jtregExitCode}" > $(EXITCODE); \
Kelly O'Haird1258922009-11-08 15:11:10 -0800236 if [ -r "$${_summary}" ] ; then \
Kelly O'Hair61c09152009-12-09 09:46:57 -0800237 $(ECHO) "Summary: $(UNIQUE_DIR)" > $(STATS_TXT); \
Kelly O'Haird1258922009-11-08 15:11:10 -0800238 $(EXPAND) $${_summary} | $(EGREP) -v ' Not run\.' > $(RUNLIST); \
239 $(EGREP) ' Passed\.' $(RUNLIST) \
240 | $(EGREP) -v ' Error\.' \
241 | $(EGREP) -v ' Failed\.' > $(PASSLIST); \
242 ( $(EGREP) ' Failed\.' $(RUNLIST); \
243 $(EGREP) ' Error\.' $(RUNLIST); \
244 $(EGREP) -v ' Passed\.' $(RUNLIST) ) \
245 | $(SORT) | $(UNIQ) > $(FAILLIST); \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800246 if [ $${jtregExitCode} != 0 -o -s $(FAILLIST) ] ; then \
Kelly O'Haird1258922009-11-08 15:11:10 -0800247 $(EXPAND) $(FAILLIST) \
248 | $(CUT) -d' ' -f1 \
249 | $(SED) -e 's@^@FAILED: @' >> $(STATS_TXT); \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800250 if [ $${jtregExitCode} = 0 ] ; then \
251 jtregExitCode=1; \
252 fi; \
Kelly O'Haird1258922009-11-08 15:11:10 -0800253 fi; \
254 runc="`$(CAT) $(RUNLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
255 passc="`$(CAT) $(PASSLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
256 failc="`$(CAT) $(FAILLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
257 exclc="`$(CAT) $(EXCLUDELIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
258 $(ECHO) "TEST STATS: run=$${runc} pass=$${passc} fail=$${failc} excluded=$${exclc}" \
259 >> $(STATS_TXT); \
260 else \
261 $(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \
262 fi; \
263 $(CAT) $(STATS_TXT); \
Kelly O'Haire4fce692010-03-06 14:59:23 -0800264 $(ZIP_UP_RESULTS) ; \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800265 $(TESTEXIT) \
Kelly O'Haird1258922009-11-08 15:11:10 -0800266)
J. Duke319a3b92007-12-01 00:00:00 +0000267
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700268################################################################
J. Duke319a3b92007-12-01 00:00:00 +0000269
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700270# Default make rule (runs jtreg_tests)
271all: jtreg_tests
272 @$(ECHO) "Testing completed successfully"
J. Duke319a3b92007-12-01 00:00:00 +0000273
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700274# Prep for output
275prep: clean
276 @$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR)
277 @$(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)`
J. Duke319a3b92007-12-01 00:00:00 +0000278
279# Cleanup
280clean:
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700281 $(RM) -r $(ABS_TEST_OUTPUT_DIR)
282 $(RM) $(ARCHIVE_BUNDLE)
J. Duke319a3b92007-12-01 00:00:00 +0000283
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700284################################################################
285
286# jtreg tests
287
288# Expect JT_HOME to be set for jtreg tests. (home for jtreg)
Kelly O'Haird020b042009-11-23 09:51:52 -0800289ifndef JT_HOME
290 JT_HOME = $(SLASH_JAVA)/re/jtreg/4.0/promoted/latest/binaries/jtreg
291 ifdef JPRT_JTREG_HOME
292 JT_HOME = $(JPRT_JTREG_HOME)
293 endif
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700294endif
295
296# Expect JPRT to set TESTDIRS to the jtreg test dirs
297ifndef TESTDIRS
Kelly O'Haird1258922009-11-08 15:11:10 -0800298 TESTDIRS = demo
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700299endif
300
Kelly O'Haird1258922009-11-08 15:11:10 -0800301# Samevm settings (default is false)
302ifndef USE_JTREG_SAMEVM
303 USE_JTREG_SAMEVM=false
304endif
305# With samevm, you cannot use -javaoptions?
306ifeq ($(USE_JTREG_SAMEVM),true)
Kelly O'Haird44fe662009-12-11 15:29:22 -0800307 JTREG_SAMEVM_OPTION = -samevm
308 EXTRA_JTREG_OPTIONS += $(JTREG_SAMEVM_OPTION) $(JAVA_ARGS) $(JAVA_ARGS:%=-vmoption:%)
Kelly O'Haird1258922009-11-08 15:11:10 -0800309 JTREG_TEST_OPTIONS = $(JAVA_VM_ARGS:%=-vmoption:%)
310else
311 JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%)
312endif
313
314# Some tests annoy me and fail frequently
315PROBLEM_LIST=ProblemList.txt
Kelly O'Haird020b042009-11-23 09:51:52 -0800316PROBLEM_LISTS=$(PROBLEM_LIST) $(wildcard closed/$(PROBLEM_LIST))
Kelly O'Haird1258922009-11-08 15:11:10 -0800317EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt
318
319# Create exclude list for this platform and arch
320ifdef NO_EXCLUDES
Kelly O'Haird020b042009-11-23 09:51:52 -0800321$(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS)
Kelly O'Haird1258922009-11-08 15:11:10 -0800322 @$(ECHO) "NOTHING_EXCLUDED" > $@
323else
Kelly O'Haird020b042009-11-23 09:51:52 -0800324$(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS)
Kelly O'Haird1258922009-11-08 15:11:10 -0800325 @$(RM) $@ $@.temp1 $@.temp2
Kelly O'Haird020b042009-11-23 09:51:52 -0800326 @(($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-all' ) ;\
327 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_ARCH)' ) ;\
328 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_VERSION)') ;\
329 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH)' ) ;\
330 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-all' ) ;\
331 ($(ECHO) "#") ;\
Kelly O'Haird1258922009-11-08 15:11:10 -0800332 ) | $(SED) -e 's@^[\ ]*@@' \
333 | $(EGREP) -v '^#' > $@.temp1
334 @for tdir in $(TESTDIRS) ; do \
335 ( ( $(CAT) $@.temp1 | $(EGREP) "^$${tdir}" ) ; $(ECHO) "#" ) >> $@.temp2 ; \
336 done
337 @$(ECHO) "# at least one line" >> $@.temp2
338 @( $(EGREP) -v '^#' $@.temp2 ; true ) > $@
339 @$(ECHO) "Excluding list contains `$(EXPAND) $@ | $(WC) -l` items"
340endif
341
Kelly O'Haird020b042009-11-23 09:51:52 -0800342# Select list of directories that exist
343define TestDirs
344$(foreach i,$1,$(wildcard ${i})) $(foreach i,$1,$(wildcard closed/${i}))
345endef
Kelly O'Haird1258922009-11-08 15:11:10 -0800346# Running batches of tests with or without samevm
347define RunSamevmBatch
Kelly O'Haird020b042009-11-23 09:51:52 -0800348$(ECHO) "Running tests in samevm mode: $(call TestDirs, $?)"
349$(MAKE) TESTDIRS="$(call TestDirs, $?)" USE_JTREG_SAMEVM=true UNIQUE_DIR=$@ jtreg_tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800350endef
351define RunOthervmBatch
Kelly O'Haird020b042009-11-23 09:51:52 -0800352$(ECHO) "Running tests in othervm mode: $(call TestDirs, $?)"
353$(MAKE) TESTDIRS="$(call TestDirs, $?)" USE_JTREG_SAMEVM=false UNIQUE_DIR=$@ jtreg_tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800354endef
355define SummaryInfo
Kelly O'Hair61c09152009-12-09 09:46:57 -0800356$(ECHO) "########################################################"
Kelly O'Haird1258922009-11-08 15:11:10 -0800357$(CAT) $(?:%=$(ABS_TEST_OUTPUT_DIR)/%/$(STATS_TXT_NAME))
Kelly O'Hair61c09152009-12-09 09:46:57 -0800358$(ECHO) "########################################################"
Kelly O'Haird1258922009-11-08 15:11:10 -0800359endef
360
361# ------------------------------------------------------------------
362
363# Batches of tests (somewhat arbitrary assigments to jdk_* targets)
364JDK_ALL_TARGETS =
365
366# Stable othervm testruns (minus items from PROBLEM_LIST)
367# Using samevm has problems, and doesn't help performance as much as others.
368JDK_ALL_TARGETS += jdk_awt
369jdk_awt: com/sun/awt java/awt sun/awt
370 $(call RunOthervmBatch)
371
372# Stable samevm testruns (minus items from PROBLEM_LIST)
373JDK_ALL_TARGETS += jdk_beans1
374jdk_beans1: java/beans/beancontext java/beans/PropertyChangeSupport \
375 java/beans/Introspector java/beans/Performance \
376 java/beans/VetoableChangeSupport java/beans/Statement
377 $(call RunSamevmBatch)
378
379# Stable othervm testruns (minus items from PROBLEM_LIST)
380# Using samevm has serious problems with these tests
381JDK_ALL_TARGETS += jdk_beans2
382jdk_beans2: java/beans/Beans java/beans/EventHandler java/beans/XMLDecoder \
383 java/beans/PropertyEditor
384 $(call RunOthervmBatch)
Kelly O'Hair61c09152009-12-09 09:46:57 -0800385
386# Stable othervm testruns (minus items from PROBLEM_LIST)
387# Using samevm has serious problems with these tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800388JDK_ALL_TARGETS += jdk_beans3
389jdk_beans3: java/beans/XMLEncoder
390 $(call RunOthervmBatch)
391
Kelly O'Hair61c09152009-12-09 09:46:57 -0800392# All beans tests
Kelly O'Haird020b042009-11-23 09:51:52 -0800393jdk_beans: jdk_beans1 jdk_beans2 jdk_beans3
394 @$(SummaryInfo)
395
Kelly O'Haird1258922009-11-08 15:11:10 -0800396# Stable samevm testruns (minus items from PROBLEM_LIST)
397JDK_ALL_TARGETS += jdk_io
398jdk_io: java/io
399 $(call RunSamevmBatch)
400
401# Stable samevm testruns (minus items from PROBLEM_LIST)
402JDK_ALL_TARGETS += jdk_lang
403jdk_lang: java/lang
404 $(call RunSamevmBatch)
405
406# Stable othervm testruns (minus items from PROBLEM_LIST)
407# Using samevm has serious problems with these tests
408JDK_ALL_TARGETS += jdk_management1
409jdk_management1: javax/management
410 $(call RunOthervmBatch)
411
412# Stable othervm testruns (minus items from PROBLEM_LIST)
413# Using samevm has serious problems with these tests
414JDK_ALL_TARGETS += jdk_management2
415jdk_management2: com/sun/jmx com/sun/management sun/management
416 $(call RunOthervmBatch)
417
Kelly O'Hair61c09152009-12-09 09:46:57 -0800418# All management tests
Kelly O'Haird020b042009-11-23 09:51:52 -0800419jdk_management: jdk_management1 jdk_management2
420 @$(SummaryInfo)
421
Kelly O'Haird1258922009-11-08 15:11:10 -0800422# Stable samevm testruns (minus items from PROBLEM_LIST)
423JDK_ALL_TARGETS += jdk_math
424jdk_math: java/math
425 $(call RunSamevmBatch)
426
427# Stable samevm testruns (minus items from PROBLEM_LIST)
428JDK_ALL_TARGETS += jdk_misc
429jdk_misc: demo javax/imageio javax/naming javax/print javax/script \
430 javax/smartcardio javax/sound com/sun/java com/sun/jndi \
431 com/sun/org sun/misc sun/pisces
432 $(call RunSamevmBatch)
433
434# Stable samevm testruns (minus items from PROBLEM_LIST)
435JDK_ALL_TARGETS += jdk_net
436jdk_net: com/sun/net java/net sun/net
437 $(call RunSamevmBatch)
438
439# Stable samevm testruns (minus items from PROBLEM_LIST)
440JDK_ALL_TARGETS += jdk_nio1
441jdk_nio1: java/nio/file
442 $(call RunSamevmBatch)
443
444# Stable othervm testruns (minus items from PROBLEM_LIST)
445# Using samevm has serious problems with these tests
446JDK_ALL_TARGETS += jdk_nio2
447jdk_nio2: java/nio/Buffer java/nio/ByteOrder \
448 java/nio/channels java/nio/BufferPoolMXBean java/nio/MappedByteBuffer
449 $(call RunOthervmBatch)
Kelly O'Hair61c09152009-12-09 09:46:57 -0800450
451# Stable othervm testruns (minus items from PROBLEM_LIST)
452# Using samevm has serious problems with these tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800453JDK_ALL_TARGETS += jdk_nio3
454jdk_nio3: com/sun/nio sun/nio
455 $(call RunOthervmBatch)
456
Kelly O'Hair61c09152009-12-09 09:46:57 -0800457# All nio tests
Kelly O'Haird020b042009-11-23 09:51:52 -0800458jdk_nio: jdk_nio1 jdk_nio2 jdk_nio3
459 @$(SummaryInfo)
460
Kelly O'Haird1258922009-11-08 15:11:10 -0800461# Stable othervm testruns (minus items from PROBLEM_LIST)
462# Using samevm has serious problems with these tests
463JDK_ALL_TARGETS += jdk_rmi
464jdk_rmi: java/rmi javax/rmi sun/rmi
465 $(call RunOthervmBatch)
466
467# Stable samevm testruns (minus items from PROBLEM_LIST)
468JDK_ALL_TARGETS += jdk_security1
469jdk_security1: java/security
470 $(call RunSamevmBatch)
471
472# Stable othervm testruns (minus items from PROBLEM_LIST)
473# Using samevm has serious problems with these tests
474JDK_ALL_TARGETS += jdk_security2
475jdk_security2: javax/crypto com/sun/crypto
476 $(call RunOthervmBatch)
Kelly O'Hair61c09152009-12-09 09:46:57 -0800477
478# Stable othervm testruns (minus items from PROBLEM_LIST)
479# Using samevm has serious problems with these tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800480JDK_ALL_TARGETS += jdk_security3
481jdk_security3: com/sun/security lib/security javax/security sun/security
482 $(call RunOthervmBatch)
483
Kelly O'Hair61c09152009-12-09 09:46:57 -0800484# All security tests
Kelly O'Haird020b042009-11-23 09:51:52 -0800485jdk_security: jdk_security1 jdk_security2 jdk_security3
486 @$(SummaryInfo)
487
Kelly O'Haird1258922009-11-08 15:11:10 -0800488# Stable othervm testruns (minus items from PROBLEM_LIST)
489# Using samevm has problems, and doesn't help performance as much as others.
490JDK_ALL_TARGETS += jdk_swing
491jdk_swing: javax/swing sun/java2d
492 $(call RunOthervmBatch)
493
494# Stable samevm testruns (minus items from PROBLEM_LIST)
495JDK_ALL_TARGETS += jdk_text
496jdk_text: java/text sun/text
497 $(call RunSamevmBatch)
498
Kelly O'Hair61c09152009-12-09 09:46:57 -0800499# Stable samevm testruns (minus items from PROBLEM_LIST)
Kelly O'Haird1258922009-11-08 15:11:10 -0800500JDK_ALL_TARGETS += jdk_tools1
501jdk_tools1: com/sun/jdi
Kelly O'Hair547328d2009-11-25 08:24:58 -0800502 $(call RunSamevmBatch)
Kelly O'Hair61c09152009-12-09 09:46:57 -0800503
504# Stable othervm testruns (minus items from PROBLEM_LIST)
505# Using samevm has serious problems with these tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800506JDK_ALL_TARGETS += jdk_tools2
507jdk_tools2: com/sun/tools sun/jvmstat sun/tools tools vm com/sun/servicetag com/sun/tracing
508 $(call RunOthervmBatch)
509
Kelly O'Hair61c09152009-12-09 09:46:57 -0800510# All tools tests
Kelly O'Haird020b042009-11-23 09:51:52 -0800511jdk_tools: jdk_tools1 jdk_tools2
512 @$(SummaryInfo)
513
Kelly O'Haird1258922009-11-08 15:11:10 -0800514# Stable samevm testruns (minus items from PROBLEM_LIST)
515JDK_ALL_TARGETS += jdk_util
516jdk_util: java/util sun/util
517 $(call RunSamevmBatch)
518
519# ------------------------------------------------------------------
520
521# Run all tests
Kelly O'Hair61c09152009-12-09 09:46:57 -0800522FILTER_OUT_LIST=jdk_awt jdk_rmi jdk_swing
523JDK_ALL_STABLE_TARGETS := $(filter-out $(FILTER_OUT_LIST), $(JDK_ALL_TARGETS))
524jdk_all: $(JDK_ALL_STABLE_TARGETS)
Kelly O'Haird1258922009-11-08 15:11:10 -0800525 @$(SummaryInfo)
526
527# These are all phony targets
528PHONY_LIST += $(JDK_ALL_TARGETS)
529
530# ------------------------------------------------------------------
531
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700532# Default JTREG to run (win32 script works for everybody)
533JTREG = $(JT_HOME)/win32/bin/jtreg
Kelly O'Haird1258922009-11-08 15:11:10 -0800534# Add any extra options (samevm etc.)
535JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
536# Only run automatic tests
537JTREG_BASIC_OPTIONS += -a
Kelly O'Haird44fe662009-12-11 15:29:22 -0800538# Always turn on assertions
539JTREG_ASSERT_OPTION = -ea -esa
540JTREG_BASIC_OPTIONS += $(JTREG_ASSERT_OPTION)
Kelly O'Haird1258922009-11-08 15:11:10 -0800541# Report details on all failed or error tests, times too
542JTREG_BASIC_OPTIONS += -v:fail,error,time
543# Retain all files for failing tests
544JTREG_BASIC_OPTIONS += -retain:fail,error
545# Ignore tests are not run and completely silent about it
Kelly O'Haird44fe662009-12-11 15:29:22 -0800546JTREG_IGNORE_OPTION = -ignore:quiet
547JTREG_BASIC_OPTIONS += $(JTREG_IGNORE_OPTION)
Kelly O'Hair61c09152009-12-09 09:46:57 -0800548# Multiple by 4 the timeout numbers
Kelly O'Haird44fe662009-12-11 15:29:22 -0800549JTREG_TIMEOUT_OPTION = -timeoutFactor:4
550JTREG_BASIC_OPTIONS += $(JTREG_TIMEOUT_OPTION)
Kelly O'Haird1258922009-11-08 15:11:10 -0800551# Boost the max memory for jtreg to avoid gc thrashing
Kelly O'Haird44fe662009-12-11 15:29:22 -0800552JTREG_MEMORY_OPTION = -J-Xmx512m
553JTREG_BASIC_OPTIONS += $(JTREG_MEMORY_OPTION)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700554
Kelly O'Haird1258922009-11-08 15:11:10 -0800555# Make sure jtreg exists
556$(JTREG): $(JT_HOME)
557
558# Run jtreg
559jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) $(EXCLUDELIST)
560 @$(EXPAND) $(EXCLUDELIST) \
561 | $(CUT) -d' ' -f1 \
562 | $(SED) -e 's@^@Excluding: @'
563 ( \
564 ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)"); \
565 export JT_HOME; \
Kelly O'Haird1258922009-11-08 15:11:10 -0800566 $(shell $(GETMIXEDPATH) "$(JTREG)") \
567 $(JTREG_BASIC_OPTIONS) \
568 -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport \
569 -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork \
570 -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \
571 -exclude:$(shell $(GETMIXEDPATH) "$(EXCLUDELIST)") \
572 $(JTREG_TEST_OPTIONS) \
573 $(TESTDIRS) \
574 ) ; $(BUNDLE_UP_AND_EXIT) \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800575 ) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700576
577PHONY_LIST += jtreg_tests
578
579################################################################
580
581# packtest
582
583# Expect JPRT to set JPRT_PACKTEST_HOME.
584PACKTEST_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/packtest
585ifdef JPRT_PACKTEST_HOME
586 PACKTEST_HOME = $(JPRT_PACKTEST_HOME)
587endif
588
589packtest: prep $(PACKTEST_HOME)/ptest $(PRODUCT_HOME)
590 ( $(CD) $(PACKTEST_HOME) && \
591 $(PACKTEST_HOME)/ptest \
592 -t "$(PRODUCT_HOME)" \
593 $(PACKTEST_STRESS_OPTION) \
594 $(EXTRA_PACKTEST_OPTIONS) \
595 -W $(ABS_TEST_OUTPUT_DIR) \
596 $(JAVA_ARGS:%=-J %) \
597 $(JAVA_VM_ARGS:%=-J %) \
598 ) ; $(BUNDLE_UP_AND_EXIT)
599
600packtest_stress: PACKTEST_STRESS_OPTION=-s
601packtest_stress: packtest
602
603PHONY_LIST += packtest packtest_stress
604
605################################################################
606
Mandy Chunge2f72482009-05-26 17:47:57 -0700607# perftest to collect statistics
608
609# Expect JPRT to set JPRT_PACKTEST_HOME.
610PERFTEST_HOME = ${TEST_ROOT}/perf
611ifdef JPRT_PERFTEST_HOME
612 PERFTEST_HOME = $(JPRT_PERFTEST_HOME)
613endif
614
615perftest: ( $(PERFTEST_HOME)/perftest \
616 -t $(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \
617 -w $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)") \
618 -h $(PERFTEST_HOME) \
619 ) ; $(BUNDLE_UP_AND_EXIT)
620
621
622PHONY_LIST += perftest
623
624################################################################
625
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700626# vmsqe tests
627
628# Expect JPRT to set JPRT_VMSQE_HOME.
629VMSQE_HOME = /java/sqe/comp/vm/testbase/sqe/vm/current/build/latest/vm
630ifdef JPRT_VMSQE_HOME
631 VMSQE_HOME = $(JPRT_VMSQE_HOME)
632endif
633
634# Expect JPRT to set JPRT_RUNVMSQE_HOME.
635RUNVMSQE_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/runvmsqe
636ifdef JPRT_RUNVMSQE_HOME
637 RUNVMSQE_HOME = $(JPRT_RUNVMSQE_HOME)
638endif
639
640# Expect JPRT to set JPRT_TONGA3_HOME.
641TONGA3_HOME = /java/sqe//tools/gtee/harness/tonga
642ifdef JPRT_TONGA3_HOME
643 TONGA3_HOME = $(JPRT_TONGA3_HOME)
644endif
645
646RUNVMSQE_BIN = $(RUNVMSQE_HOME)/bin/runvmsqe
647
648vmsqe_tests: prep $(VMSQE_HOME)/vm $(TONGA3_HOME) $(RUNVMSQE_BIN) $(PRODUCT_HOME)
649 $(RM) -r $(ABS_TEST_OUTPUT_DIR)/vmsqe
650 ( $(CD) $(ABS_TEST_OUTPUT_DIR) && \
651 $(RUNVMSQE_BIN) \
652 -jdk "$(PRODUCT_HOME)" \
653 -o "$(ABS_TEST_OUTPUT_DIR)/vmsqe" \
654 -testbase "$(VMSQE_HOME)/vm" \
655 -tonga "$(TONGA3_HOME)" \
656 -tongajdk "$(ALT_BOOTDIR)" \
657 $(JAVA_ARGS) \
658 $(JAVA_VM_ARGS) \
659 $(RUNVMSQE_TEST_OPTION) \
660 $(EXTRA_RUNVMSQE_OPTIONS) \
661 ) ; $(BUNDLE_UP_AND_EXIT)
662
663vmsqe_jdwp: RUNVMSQE_TEST_OPTION=-jdwp
664vmsqe_jdwp: vmsqe_tests
665
666vmsqe_jdi: RUNVMSQE_TEST_OPTION=-jdi
667vmsqe_jdi: vmsqe_tests
668
669vmsqe_jdb: RUNVMSQE_TEST_OPTION=-jdb
670vmsqe_jdb: vmsqe_tests
671
672vmsqe_quick-jdi: RUNVMSQE_TEST_OPTION=-quick-jdi
673vmsqe_quick-jdi: vmsqe_tests
674
675vmsqe_sajdi: RUNVMSQE_TEST_OPTION=-sajdi
676vmsqe_sajdi: vmsqe_tests
677
678vmsqe_jvmti: RUNVMSQE_TEST_OPTION=-jvmti
679vmsqe_jvmti: vmsqe_tests
680
681vmsqe_hprof: RUNVMSQE_TEST_OPTION=-hprof
682vmsqe_hprof: vmsqe_tests
683
684vmsqe_monitoring: RUNVMSQE_TEST_OPTION=-monitoring
685vmsqe_monitoring: vmsqe_tests
686
687PHONY_LIST += vmsqe_jdwp vmsqe_jdi vmsqe_jdb vmsqe_quick-jdi vmsqe_sajdi \
688 vmsqe_jvmti vmsqe_hprof vmsqe_monitoring vmsqe_tests
689
690################################################################
691
692# jck tests
693
694JCK_WORK_DIR = $(ABS_TEST_OUTPUT_DIR)/JCKwork
695JCK_REPORT_DIR = $(ABS_TEST_OUTPUT_DIR)/JCKreport
696JCK_PROPERTIES = $(ABS_TEST_OUTPUT_DIR)/jck.properties
697JCK_CONFIG = $(ABS_TEST_OUTPUT_DIR)/jck.config
698
699JCK_JAVA_EXE = $(PRODUCT_HOME)/bin/java$(EXESUFFIX)
700
701JCK_JAVATEST_JAR = $(JCK_HOME)/lib/javatest.jar
702JCK_JAVATEST = $(ALT_BOOTDIR)/bin/java -jar $(JCK_JAVATEST_JAR)
703
704$(JCK_CONFIG): $(TEST_ROOT)/JCK-$(JCK_BUNDLE_NAME)-$(JCK_RELEASE)-base.jti
705 $(RM) $@
706 $(MKDIR) -p $(@D)
707 $(CP) $< $@
708
709$(JCK_PROPERTIES): $(PRODUCT_HOME) $(JCK_JAVA_EXE)
710 $(RM) $@
711 $(MKDIR) -p $(@D)
712 $(ECHO) "jck.env.compiler.compRefExecute.cmdAsFile=$(JCK_JAVA_EXE)" >> $@
713 $(ECHO) "jck.env.compiler.compRefExecute.systemRoot=$(SYSTEMROOT)" >> $@
714 $(ECHO) "jck.env.compiler.testCompile.testCompileAPImultiJVM.cmdAsFile=$(JCK_JAVA_EXE)" >> $@
715 $(ECHO) "jck.tests.tests=$(JCK_BUNDLE_TESTDIRS)" >> $@
716
717jck_tests: prep $(JCK_HOME) $(JCK_PROPERTIES) $(JCK_CONFIG) $(JCK_JAVATEST_JAR)
718 $(MKDIR) -p $(JCK_WORK_DIR)
719 ( $(JCK_JAVATEST) \
720 -verbose:commands,non-pass \
721 -testSuite $(JCK_HOME) \
722 -workDir $(JCK_WORK_DIR) \
723 -config $(JCK_CONFIG) \
724 -set -file $(JCK_PROPERTIES) \
725 -runtests \
726 -writeReport $(JCK_REPORT_DIR) \
727 ) ; $(BUNDLE_UP_AND_EXIT)
728
729PHONY_LIST += jck_tests
730
731################################################################
732
733# jck6 tests
734
735JCK6_RELEASE = 6b
736JCK6_DEFAULT_HOME = $(SLASH_JAVA)/re/jck/$(JCK6_RELEASE)/archive/fcs/binaries
737
738# Expect JPRT to set JPRT_JCK6COMPILER_HOME.
739JCK6COMPILER_HOME = $(JCK6_DEFAULT_HOME)/JCK-compiler-$(JCK6_RELEASE)
740ifdef JPRT_JCK6COMPILER_HOME
741 JCK6COMPILER_HOME = $(JPRT_JCK6COMPILER_HOME)
742endif
743
744# Expect JPRT to set JPRT_JCK6RUNTIME_HOME.
745JCK6RUNTIME_HOME = $(JCK6_DEFAULT_HOME)/JCK-runtime-$(JCK6_RELEASE)
746ifdef JPRT_JCK6RUNTIME_HOME
747 JCK6RUNTIME_HOME = $(JPRT_JCK6RUNTIME_HOME)
748endif
749
750# Expect JPRT to set JPRT_JCK6DEVTOOLS_HOME.
751JCK6DEVTOOLS_HOME = $(JCK6_DEFAULT_HOME)/JCK-devtools-$(JCK6_RELEASE)
752ifdef JPRT_JCK6DEVTOOLS_HOME
753 JCK6DEVTOOLS_HOME = $(JPRT_JCK6DEVTOOLS_HOME)
754endif
755
756jck6_tests: JCK_HOME=$(JCK6_HOME)
757jck6_tests: JCK_RELEASE=$(JCK6_RELEASE)
758jck6_tests: jck_tests
759
760jck6compiler: JCK6_HOME=$(JCK6COMPILER_HOME)
761jck6compiler: JCK_BUNDLE_NAME=compiler
762jck6compiler: jck6_tests
763
764jck6compiler_lang: JCK_BUNDLE_TESTDIRS=lang
765jck6compiler_lang: jck6compiler
766
767jck6runtime: JCK6_HOME=$(JCK6RUNTIME_HOME)
768jck6runtime: JCK_BUNDLE_NAME=runtime
769jck6runtime: jck6_tests
770
771jck6runtime_lang: JCK_BUNDLE_TESTDIRS=lang
772jck6runtime_lang: jck6runtime
773
774jck6devtools: JCK6_HOME=$(JCK6DEVTOOLS_HOME)
775jck6devtools: JCK_BUNDLE_NAME=devtools
776jck6devtools: jck6_tests
777
778jck6devtools_lang: JCK_BUNDLE_TESTDIRS=lang
779jck6devtools_lang: jck6devtools
780
781PHONY_LIST += jck6compiler jck6runtime jck6devtools jck6_tests \
782 jck6compiler_lang jck6runtime_lang jck6devtools_lang
783
784################################################################
785
786# jck7 tests
787
788JCK7_RELEASE = 7
789JCK7_DEFAULT_HOME = $(SLASH_JAVA)/re/jck/$(JCK7_RELEASE)/archive/fcs/binaries
790
791# Expect JPRT to set JPRT_JCK7COMPILER_HOME.
792JCK7COMPILER_HOME = $(JCK7_DEFAULT_HOME)/JCK-compiler-$(JCK7_RELEASE)
793ifdef JPRT_JCK7COMPILER_HOME
794 JCK7COMPILER_HOME = $(JPRT_JCK7COMPILER_HOME)
795endif
796
797# Expect JPRT to set JPRT_JCK7RUNTIME_HOME.
798JCK7RUNTIME_HOME = $(JCK7_DEFAULT_HOME)/JCK-runtime-$(JCK7_RELEASE)
799ifdef JPRT_JCK7RUNTIME_HOME
800 JCK7RUNTIME_HOME = $(JPRT_JCK7RUNTIME_HOME)
801endif
802
803# Expect JPRT to set JPRT_JCK7DEVTOOLS_HOME.
804JCK7DEVTOOLS_HOME = $(JCK7_DEFAULT_HOME)/JCK-devtools-$(JCK7_RELEASE)
805ifdef JPRT_JCK7DEVTOOLS_HOME
806 JCK7DEVTOOLS_HOME = $(JPRT_JCK7DEVTOOLS_HOME)
807endif
808
809jck7_tests: JCK_HOME=$(JCK7_HOME)
810jck7_tests: JCK_RELEASE=$(JCK7_RELEASE)
811jck7_tests: jck_tests
812
813jck7compiler: JCK7_HOME=$(JCK7COMPILER_HOME)
814jck7compiler: JCK_BUNDLE_NAME=compiler
815jck7compiler: jck7_tests
816
817jck7compiler_lang: JCK_BUNDLE_TESTDIRS=lang
818jck7compiler_lang: jck7compiler
819
820jck7runtime: JCK7_HOME=$(JCK7RUNTIME_HOME)
821jck7runtime: JCK_BUNDLE_NAME=runtime
822jck7runtime: jck7_tests
823
824jck7runtime_lang: JCK_BUNDLE_TESTDIRS=lang
825jck7runtime_lang: jck7runtime
826
827jck7devtools: JCK7_HOME=$(JCK7DEVTOOLS_HOME)
828jck7devtools: JCK_BUNDLE_NAME=devtools
829jck7devtools: jck7_tests
830
831jck7devtools_lang: JCK_BUNDLE_TESTDIRS=lang
832jck7devtools_lang: jck7devtools
833
834PHONY_LIST += jck7compiler jck7runtime jck7devtools jck7_tests \
835 jck7compiler_lang jck7runtime_lang jck7devtools_lang
836
837################################################################
J. Duke319a3b92007-12-01 00:00:00 +0000838
839# Phony targets (e.g. these are not filenames)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700840.PHONY: all clean prep $(PHONY_LIST)
841
842################################################################
J. Duke319a3b92007-12-01 00:00:00 +0000843