blob: bffa3ad7cb06a346d9e7354502bef3c81ca862e0 [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001#
Kelly O'Haird1258922009-11-08 15:11:10 -08002# Copyright 1995-2009 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
40CHMOD = chmod
41CP = cp
42CUT = cut
43ECHO = echo
44EGREP = egrep
45EXPAND = expand
46EXPR = expr
47KILL = /usr/bin/kill
48MKDIR = mkdir
49NOHUP = nohup
50PWD = pwd
51SED = sed
52SLEEP = sleep
53SORT = sort
54TEE = tee
55UNAME = uname
56UNIQ = uniq
57WC = wc
58XHOST = xhost
59ZIP = zip
60
61# Get OS name from uname
62UNAME_S := $(shell $(UNAME) -s)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -070063
64# Commands to run on paths to make mixed paths for java on windows
Kelly O'Haird1258922009-11-08 15:11:10 -080065GETMIXEDPATH=$(ECHO)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -070066
67# Location of developer shared files
68SLASH_JAVA = /java
69
70# Platform specific settings
Kelly O'Haird1258922009-11-08 15:11:10 -080071ifeq ($(UNAME_S), SunOS)
72 OS_NAME = solaris
73 OS_ARCH := $(shell $(UNAME) -p)
74 OS_VERSION := $(shell $(UNAME) -r)
J. Duke319a3b92007-12-01 00:00:00 +000075endif
Kelly O'Haird1258922009-11-08 15:11:10 -080076ifeq ($(UNAME_S), Linux)
77 OS_NAME = linux
78 OS_ARCH := $(shell $(UNAME) -m)
79 OS_VERSION := $(shell $(UNAME) -r)
J. Duke319a3b92007-12-01 00:00:00 +000080endif
Kelly O'Haird1258922009-11-08 15:11:10 -080081ifndef OS_NAME
82 ifneq ($(PROCESSOR_IDENTIFIER), )
83 OS_NAME = windows
84 SLASH_JAVA = J:
85 # A variety of ways to say X64 arch :^(
86 OS_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER))
87 EXESUFFIX = .exe
88 # These need to be different depending on MKS or CYGWIN
89 ifeq ($(findstring cygdrive,$(shell ($(CD) C:/ && $(PWD)))), )
90 GETMIXEDPATH = dosname -s
91 OS_VERSION := $(shell $(UNAME) -r)
J. Duke319a3b92007-12-01 00:00:00 +000092 else
Kelly O'Haird1258922009-11-08 15:11:10 -080093 GETMIXEDPATH = cygpath -m -s
94 OS_VERSION := $(shell $(UNAME) -s | $(CUT) -d'-' -f2)
J. Duke319a3b92007-12-01 00:00:00 +000095 endif
96 endif
Kelly O'Haird1258922009-11-08 15:11:10 -080097endif
98
99# Only want major and minor numbers from os version
100OS_VERSION := $(shell $(ECHO) "$(OS_VERSION)" | $(CUT) -d'.' -f1,2)
101
102# Try and use names i586, x64, and ia64 consistently
103OS_ARCH:=$(subst X64,x64,$(OS_ARCH))
104OS_ARCH:=$(subst AMD64,x64,$(OS_ARCH))
105OS_ARCH:=$(subst amd64,x64,$(OS_ARCH))
106OS_ARCH:=$(subst x86_64,x64,$(OS_ARCH))
107OS_ARCH:=$(subst EM64T,x64,$(OS_ARCH))
108OS_ARCH:=$(subst em64t,x64,$(OS_ARCH))
109OS_ARCH:=$(subst intel64,x64,$(OS_ARCH))
110OS_ARCH:=$(subst Intel64,x64,$(OS_ARCH))
111OS_ARCH:=$(subst INTEL64,x64,$(OS_ARCH))
112OS_ARCH:=$(subst IA64,ia64,$(OS_ARCH))
113OS_ARCH:=$(subst X86,i586,$(OS_ARCH))
114OS_ARCH:=$(subst x86,i586,$(OS_ARCH))
115OS_ARCH:=$(subst i386,i586,$(OS_ARCH))
116OS_ARCH:=$(subst i486,i586,$(OS_ARCH))
117OS_ARCH:=$(subst i686,i586,$(OS_ARCH))
118
119# Check for ARCH_DATA_MODEL, adjust OS_ARCH accordingly
120ifndef ARCH_DATA_MODEL
121 ARCH_DATA_MODEL=32
122endif
123ARCH_DATA_MODEL_ERROR= \
124 ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) cannot be used with $(OS_NAME)-$(ARCH)
125ifeq ($(ARCH_DATA_MODEL),64)
126 ifeq ($(OS_NAME)-$(OS_ARCH),solaris-i586)
127 OS_ARCH=x64
128 endif
129 ifeq ($(OS_NAME)-$(OS_ARCH),solaris-sparc)
130 OS_ARCH=sparcv9
131 endif
132 ifeq ($(OS_ARCH),i586)
133 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
134 endif
135 ifeq ($(OS_ARCH),sparc)
136 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
137 endif
138else
139 ifeq ($(ARCH_DATA_MODEL),32)
140 ifeq ($(OS_ARCH),x64)
141 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
142 endif
143 ifeq ($(OS_ARCH),ia64)
144 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
145 endif
146 ifeq ($(OS_ARCH),sparcv9)
147 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
148 endif
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700149 else
Kelly O'Haird1258922009-11-08 15:11:10 -0800150 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700151 endif
J. Duke319a3b92007-12-01 00:00:00 +0000152endif
153
154# Root of this test area (important to use full paths in some places)
Kelly O'Haird1258922009-11-08 15:11:10 -0800155TEST_ROOT := $(shell $(PWD))
J. Duke319a3b92007-12-01 00:00:00 +0000156
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700157# Root of all test results
158ifdef ALT_OUTPUTDIR
159 ABS_OUTPUTDIR = $(ALT_OUTPUTDIR)
J. Duke319a3b92007-12-01 00:00:00 +0000160else
Kelly O'Haird1258922009-11-08 15:11:10 -0800161 ABS_OUTPUTDIR = $(TEST_ROOT)/../build/$(OS_NAME)-$(OS_ARCH)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700162endif
163ABS_BUILD_ROOT = $(ABS_OUTPUTDIR)
Kelly O'Haird1258922009-11-08 15:11:10 -0800164ABS_TEST_OUTPUT_DIR := $(ABS_BUILD_ROOT)/testoutput/$(UNIQUE_DIR)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700165
166# Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test)
167ifndef PRODUCT_HOME
168 # Try to use j2sdk-image if it exists
169 ABS_JDK_IMAGE = $(ABS_BUILD_ROOT)/j2sdk-image
170 PRODUCT_HOME := \
171 $(shell \
172 if [ -d $(ABS_JDK_IMAGE) ] ; then \
173 $(ECHO) "$(ABS_JDK_IMAGE)"; \
174 else \
Kelly O'Haird1258922009-11-08 15:11:10 -0800175 $(ECHO) "$(ABS_BUILD_ROOT)"; \
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700176 fi)
177 PRODUCT_HOME := $(PRODUCT_HOME)
J. Duke319a3b92007-12-01 00:00:00 +0000178endif
179
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700180# Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.)
181# Should be passed into 'java' only.
Kelly O'Haird1258922009-11-08 15:11:10 -0800182# Could include: -d64 -server -client OR any java option
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700183ifdef JPRT_PRODUCT_ARGS
184 JAVA_ARGS = $(JPRT_PRODUCT_ARGS)
185endif
J. Duke319a3b92007-12-01 00:00:00 +0000186
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700187# Expect JPRT to set JPRT_PRODUCT_VM_ARGS (e.g. -Xcomp etc.)
188# Should be passed into anything running the vm (java, javac, javadoc, ...).
189ifdef JPRT_PRODUCT_VM_ARGS
190 JAVA_VM_ARGS = $(JPRT_PRODUCT_VM_ARGS)
191endif
J. Duke319a3b92007-12-01 00:00:00 +0000192
Kelly O'Haird1258922009-11-08 15:11:10 -0800193# Check JAVA_ARGS arguments based on ARCH_DATA_MODEL etc.
194ifeq ($(OS_NAME),solaris)
195 D64_ERROR_MESSAGE=Mismatch between ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) and use of -d64 in JAVA_ARGS=$(JAVA_ARGS)
196 ifeq ($(ARCH_DATA_MODEL),32)
197 ifneq ($(findstring -d64,$(JAVA_ARGS)),)
198 x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)")
199 endif
200 endif
201 ifeq ($(ARCH_DATA_MODEL),64)
202 ifeq ($(findstring -d64,$(JAVA_ARGS)),)
203 x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)")
204 endif
205 endif
206endif
207
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700208# Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
209ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip
210ifdef JPRT_ARCHIVE_BUNDLE
211 ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE)
212endif
J. Duke319a3b92007-12-01 00:00:00 +0000213
Kelly O'Haird1258922009-11-08 15:11:10 -0800214# DISPLAY settings for virtual frame buffer
215START_XVFB = start-Xvfb.sh
216NOHUP_OUTPUT = $(ABS_TEST_OUTPUT_DIR)/start-Xvfb.nohup-output.txt
217DISPLAY_PID_FILE=$(ABS_TEST_OUTPUT_DIR)/xvfb-display-number.txt
218DISPLAY_SLEEP_TIME=10
219DISPLAY_MAX_SLEEPS=10
220ifeq ($(OS_NAME),solaris)
221 VIRTUAL_FRAME_BUFFER = true
222endif
223ifeq ($(OS_NAME),linux)
224 VIRTUAL_FRAME_BUFFER = true
225endif
226
227# Does not work yet, display dies as soon as it gets used. :^(
228VIRTUAL_FRAME_BUFFER = false
229
230# Are we using a VIRTUAL_FRAME_BUFFER (Xvfb)
231ifeq ($(VIRTUAL_FRAME_BUFFER),true)
232
233 PREP_DISPLAY = \
234 $(CP) $(START_XVFB) $(ABS_TEST_OUTPUT_DIR); \
235 $(CHMOD) a+x $(ABS_TEST_OUTPUT_DIR)/$(START_XVFB); \
236 ( $(CD) $(ABS_TEST_OUTPUT_DIR) && \
237 $(NOHUP) $(ABS_TEST_OUTPUT_DIR)/$(START_XVFB) $(DISPLAY_PID_FILE) > $(NOHUP_OUTPUT) 2>&1 && \
238 $(SLEEP) $(DISPLAY_SLEEP_TIME) ) & \
239 count=1; \
240 while [ ! -s $(DISPLAY_PID_FILE) ] ; do \
241 $(ECHO) "Sleeping $(DISPLAY_SLEEP_TIME) more seconds, DISPLAY not ready"; \
242 $(SLEEP) $(DISPLAY_SLEEP_TIME); \
243 count=`$(EXPR) $${count} '+' 1`; \
244 if [ $${count} -gt $(DISPLAY_MAX_SLEEPS) ] ; then \
245 $(ECHO) "ERROR: DISPLAY not ready, giving up on DISPLAY"; \
246 exit 9; \
247 fi; \
248 done ; \
249 DISPLAY=":`$(CAT) $(DISPLAY_PID_FILE)`"; \
250 export DISPLAY; \
251 $(CAT) $(NOHUP_OUTPUT); \
252 $(ECHO) "Prepared DISPLAY=$${DISPLAY}"; \
253 $(XHOST) || \
254 ( $(ECHO) "ERROR: No display" ; exit 8)
255
256 KILL_DISPLAY = \
257 ( \
258 DISPLAY=":`$(CAT) $(DISPLAY_PID_FILE)`"; \
259 export DISPLAY; \
260 if [ -s "$(DISPLAY_PID_FILE)" ] ; then \
261 $(KILL) `$(CAT) $(DISPLAY_PID_FILE)` > /dev/null 2>&1; \
262 $(KILL) -9 `$(CAT) $(DISPLAY_PID_FILE)` > /dev/null 2>&1; \
263 fi; \
264 $(ECHO) "Killed DISPLAY=$${DISPLAY}"; \
265 )
266
267else
268
269 PREP_DISPLAY = $(ECHO) "VIRTUAL_FRAME_BUFFER=$(VIRTUAL_FRAME_BUFFER)"
270 KILL_DISPLAY = $(ECHO) "VIRTUAL_FRAME_BUFFER=$(VIRTUAL_FRAME_BUFFER)"
271
272endif
273
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700274# How to create the test bundle (pass or fail, we want to create this)
275# Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed.
276ZIP_UP_RESULTS = ( $(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)` \
277 && $(CD) $(ABS_TEST_OUTPUT_DIR) \
278 && $(ZIP) -q -r $(ARCHIVE_BUNDLE) . )
Kelly O'Haird1258922009-11-08 15:11:10 -0800279SUMMARY_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport/text/summary.txt
280STATS_TXT_NAME = Stats.txt
281STATS_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/$(STATS_TXT_NAME)
282RUNLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/runlist.txt
283PASSLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/passlist.txt
284FAILLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/faillist.txt
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800285EXITCODE = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/exitcode.txt
286
287TESTEXIT = \
288 if [ ! -s $(EXITCODE) ] ; then \
289 $(ECHO) "ERROR: EXITCODE file not filled in."; \
290 $(ECHO) "1" > $(EXITCODE); \
291 fi ; \
292 testExitCode=`$(CAT) $(EXITCODE)`; \
293 $(ECHO) "EXIT CODE: $${testExitCode}"; \
Kelly O'Hair61c09152009-12-09 09:46:57 -0800294 exit $${testExitCode}
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800295
Kelly O'Haird1258922009-11-08 15:11:10 -0800296BUNDLE_UP_AND_EXIT = \
297( \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800298 jtregExitCode=$$? && \
Kelly O'Haird1258922009-11-08 15:11:10 -0800299 _summary="$(SUMMARY_TXT)"; \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800300 $(RM) -f $(STATS_TXT) $(RUNLIST) $(PASSLIST) $(FAILLIST) $(EXITCODE); \
301 $(ECHO) "$${jtregExitCode}" > $(EXITCODE); \
Kelly O'Haird1258922009-11-08 15:11:10 -0800302 if [ -r "$${_summary}" ] ; then \
Kelly O'Hair61c09152009-12-09 09:46:57 -0800303 $(ECHO) "Summary: $(UNIQUE_DIR)" > $(STATS_TXT); \
Kelly O'Haird1258922009-11-08 15:11:10 -0800304 $(EXPAND) $${_summary} | $(EGREP) -v ' Not run\.' > $(RUNLIST); \
305 $(EGREP) ' Passed\.' $(RUNLIST) \
306 | $(EGREP) -v ' Error\.' \
307 | $(EGREP) -v ' Failed\.' > $(PASSLIST); \
308 ( $(EGREP) ' Failed\.' $(RUNLIST); \
309 $(EGREP) ' Error\.' $(RUNLIST); \
310 $(EGREP) -v ' Passed\.' $(RUNLIST) ) \
311 | $(SORT) | $(UNIQ) > $(FAILLIST); \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800312 if [ $${jtregExitCode} != 0 -o -s $(FAILLIST) ] ; then \
Kelly O'Haird1258922009-11-08 15:11:10 -0800313 $(EXPAND) $(FAILLIST) \
314 | $(CUT) -d' ' -f1 \
315 | $(SED) -e 's@^@FAILED: @' >> $(STATS_TXT); \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800316 if [ $${jtregExitCode} = 0 ] ; then \
317 jtregExitCode=1; \
318 fi; \
Kelly O'Haird1258922009-11-08 15:11:10 -0800319 fi; \
320 runc="`$(CAT) $(RUNLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
321 passc="`$(CAT) $(PASSLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
322 failc="`$(CAT) $(FAILLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
323 exclc="`$(CAT) $(EXCLUDELIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
324 $(ECHO) "TEST STATS: run=$${runc} pass=$${passc} fail=$${failc} excluded=$${exclc}" \
325 >> $(STATS_TXT); \
326 else \
327 $(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \
328 fi; \
329 $(CAT) $(STATS_TXT); \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800330 $(ZIP_UP_RESULTS) && $(KILL_DISPLAY) ; \
331 $(TESTEXIT) \
Kelly O'Haird1258922009-11-08 15:11:10 -0800332)
J. Duke319a3b92007-12-01 00:00:00 +0000333
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700334################################################################
J. Duke319a3b92007-12-01 00:00:00 +0000335
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700336# Default make rule (runs jtreg_tests)
337all: jtreg_tests
338 @$(ECHO) "Testing completed successfully"
J. Duke319a3b92007-12-01 00:00:00 +0000339
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700340# Prep for output
341prep: clean
342 @$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR)
343 @$(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)`
J. Duke319a3b92007-12-01 00:00:00 +0000344
345# Cleanup
346clean:
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700347 $(RM) -r $(ABS_TEST_OUTPUT_DIR)
348 $(RM) $(ARCHIVE_BUNDLE)
J. Duke319a3b92007-12-01 00:00:00 +0000349
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700350################################################################
351
352# jtreg tests
353
354# Expect JT_HOME to be set for jtreg tests. (home for jtreg)
Kelly O'Haird020b042009-11-23 09:51:52 -0800355ifndef JT_HOME
356 JT_HOME = $(SLASH_JAVA)/re/jtreg/4.0/promoted/latest/binaries/jtreg
357 ifdef JPRT_JTREG_HOME
358 JT_HOME = $(JPRT_JTREG_HOME)
359 endif
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700360endif
361
362# Expect JPRT to set TESTDIRS to the jtreg test dirs
363ifndef TESTDIRS
Kelly O'Haird1258922009-11-08 15:11:10 -0800364 TESTDIRS = demo
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700365endif
366
Kelly O'Haird1258922009-11-08 15:11:10 -0800367# Samevm settings (default is false)
368ifndef USE_JTREG_SAMEVM
369 USE_JTREG_SAMEVM=false
370endif
371# With samevm, you cannot use -javaoptions?
372ifeq ($(USE_JTREG_SAMEVM),true)
Kelly O'Haird44fe662009-12-11 15:29:22 -0800373 JTREG_SAMEVM_OPTION = -samevm
374 EXTRA_JTREG_OPTIONS += $(JTREG_SAMEVM_OPTION) $(JAVA_ARGS) $(JAVA_ARGS:%=-vmoption:%)
Kelly O'Haird1258922009-11-08 15:11:10 -0800375 JTREG_TEST_OPTIONS = $(JAVA_VM_ARGS:%=-vmoption:%)
376else
377 JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%)
378endif
379
380# Some tests annoy me and fail frequently
381PROBLEM_LIST=ProblemList.txt
Kelly O'Haird020b042009-11-23 09:51:52 -0800382PROBLEM_LISTS=$(PROBLEM_LIST) $(wildcard closed/$(PROBLEM_LIST))
Kelly O'Haird1258922009-11-08 15:11:10 -0800383EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt
384
385# Create exclude list for this platform and arch
386ifdef NO_EXCLUDES
Kelly O'Haird020b042009-11-23 09:51:52 -0800387$(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS)
Kelly O'Haird1258922009-11-08 15:11:10 -0800388 @$(ECHO) "NOTHING_EXCLUDED" > $@
389else
Kelly O'Haird020b042009-11-23 09:51:52 -0800390$(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS)
Kelly O'Haird1258922009-11-08 15:11:10 -0800391 @$(RM) $@ $@.temp1 $@.temp2
Kelly O'Haird020b042009-11-23 09:51:52 -0800392 @(($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-all' ) ;\
393 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_ARCH)' ) ;\
394 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_VERSION)') ;\
395 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH)' ) ;\
396 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-all' ) ;\
397 ($(ECHO) "#") ;\
Kelly O'Haird1258922009-11-08 15:11:10 -0800398 ) | $(SED) -e 's@^[\ ]*@@' \
399 | $(EGREP) -v '^#' > $@.temp1
400 @for tdir in $(TESTDIRS) ; do \
401 ( ( $(CAT) $@.temp1 | $(EGREP) "^$${tdir}" ) ; $(ECHO) "#" ) >> $@.temp2 ; \
402 done
403 @$(ECHO) "# at least one line" >> $@.temp2
404 @( $(EGREP) -v '^#' $@.temp2 ; true ) > $@
405 @$(ECHO) "Excluding list contains `$(EXPAND) $@ | $(WC) -l` items"
406endif
407
Kelly O'Haird020b042009-11-23 09:51:52 -0800408# Select list of directories that exist
409define TestDirs
410$(foreach i,$1,$(wildcard ${i})) $(foreach i,$1,$(wildcard closed/${i}))
411endef
Kelly O'Haird1258922009-11-08 15:11:10 -0800412# Running batches of tests with or without samevm
413define RunSamevmBatch
Kelly O'Haird020b042009-11-23 09:51:52 -0800414$(ECHO) "Running tests in samevm mode: $(call TestDirs, $?)"
415$(MAKE) TESTDIRS="$(call TestDirs, $?)" USE_JTREG_SAMEVM=true UNIQUE_DIR=$@ jtreg_tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800416endef
417define RunOthervmBatch
Kelly O'Haird020b042009-11-23 09:51:52 -0800418$(ECHO) "Running tests in othervm mode: $(call TestDirs, $?)"
419$(MAKE) TESTDIRS="$(call TestDirs, $?)" USE_JTREG_SAMEVM=false UNIQUE_DIR=$@ jtreg_tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800420endef
421define SummaryInfo
Kelly O'Hair61c09152009-12-09 09:46:57 -0800422$(ECHO) "########################################################"
Kelly O'Haird1258922009-11-08 15:11:10 -0800423$(CAT) $(?:%=$(ABS_TEST_OUTPUT_DIR)/%/$(STATS_TXT_NAME))
Kelly O'Hair61c09152009-12-09 09:46:57 -0800424$(ECHO) "########################################################"
Kelly O'Haird1258922009-11-08 15:11:10 -0800425endef
426
427# ------------------------------------------------------------------
428
429# Batches of tests (somewhat arbitrary assigments to jdk_* targets)
430JDK_ALL_TARGETS =
431
432# Stable othervm testruns (minus items from PROBLEM_LIST)
433# Using samevm has problems, and doesn't help performance as much as others.
434JDK_ALL_TARGETS += jdk_awt
435jdk_awt: com/sun/awt java/awt sun/awt
436 $(call RunOthervmBatch)
437
438# Stable samevm testruns (minus items from PROBLEM_LIST)
439JDK_ALL_TARGETS += jdk_beans1
440jdk_beans1: java/beans/beancontext java/beans/PropertyChangeSupport \
441 java/beans/Introspector java/beans/Performance \
442 java/beans/VetoableChangeSupport java/beans/Statement
443 $(call RunSamevmBatch)
444
445# Stable othervm testruns (minus items from PROBLEM_LIST)
446# Using samevm has serious problems with these tests
447JDK_ALL_TARGETS += jdk_beans2
448jdk_beans2: java/beans/Beans java/beans/EventHandler java/beans/XMLDecoder \
449 java/beans/PropertyEditor
450 $(call RunOthervmBatch)
Kelly O'Hair61c09152009-12-09 09:46:57 -0800451
452# Stable othervm testruns (minus items from PROBLEM_LIST)
453# Using samevm has serious problems with these tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800454JDK_ALL_TARGETS += jdk_beans3
455jdk_beans3: java/beans/XMLEncoder
456 $(call RunOthervmBatch)
457
Kelly O'Hair61c09152009-12-09 09:46:57 -0800458# All beans tests
Kelly O'Haird020b042009-11-23 09:51:52 -0800459jdk_beans: jdk_beans1 jdk_beans2 jdk_beans3
460 @$(SummaryInfo)
461
Kelly O'Haird1258922009-11-08 15:11:10 -0800462# Stable samevm testruns (minus items from PROBLEM_LIST)
463JDK_ALL_TARGETS += jdk_io
464jdk_io: java/io
465 $(call RunSamevmBatch)
466
467# Stable samevm testruns (minus items from PROBLEM_LIST)
468JDK_ALL_TARGETS += jdk_lang
469jdk_lang: java/lang
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_management1
475jdk_management1: javax/management
476 $(call RunOthervmBatch)
477
478# Stable othervm testruns (minus items from PROBLEM_LIST)
479# Using samevm has serious problems with these tests
480JDK_ALL_TARGETS += jdk_management2
481jdk_management2: com/sun/jmx com/sun/management sun/management
482 $(call RunOthervmBatch)
483
Kelly O'Hair61c09152009-12-09 09:46:57 -0800484# All management tests
Kelly O'Haird020b042009-11-23 09:51:52 -0800485jdk_management: jdk_management1 jdk_management2
486 @$(SummaryInfo)
487
Kelly O'Haird1258922009-11-08 15:11:10 -0800488# Stable samevm testruns (minus items from PROBLEM_LIST)
489JDK_ALL_TARGETS += jdk_math
490jdk_math: java/math
491 $(call RunSamevmBatch)
492
493# Stable samevm testruns (minus items from PROBLEM_LIST)
494JDK_ALL_TARGETS += jdk_misc
495jdk_misc: demo javax/imageio javax/naming javax/print javax/script \
496 javax/smartcardio javax/sound com/sun/java com/sun/jndi \
497 com/sun/org sun/misc sun/pisces
498 $(call RunSamevmBatch)
499
500# Stable samevm testruns (minus items from PROBLEM_LIST)
501JDK_ALL_TARGETS += jdk_net
502jdk_net: com/sun/net java/net sun/net
503 $(call RunSamevmBatch)
504
505# Stable samevm testruns (minus items from PROBLEM_LIST)
506JDK_ALL_TARGETS += jdk_nio1
507jdk_nio1: java/nio/file
508 $(call RunSamevmBatch)
509
510# Stable othervm testruns (minus items from PROBLEM_LIST)
511# Using samevm has serious problems with these tests
512JDK_ALL_TARGETS += jdk_nio2
513jdk_nio2: java/nio/Buffer java/nio/ByteOrder \
514 java/nio/channels java/nio/BufferPoolMXBean java/nio/MappedByteBuffer
515 $(call RunOthervmBatch)
Kelly O'Hair61c09152009-12-09 09:46:57 -0800516
517# Stable othervm testruns (minus items from PROBLEM_LIST)
518# Using samevm has serious problems with these tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800519JDK_ALL_TARGETS += jdk_nio3
520jdk_nio3: com/sun/nio sun/nio
521 $(call RunOthervmBatch)
522
Kelly O'Hair61c09152009-12-09 09:46:57 -0800523# All nio tests
Kelly O'Haird020b042009-11-23 09:51:52 -0800524jdk_nio: jdk_nio1 jdk_nio2 jdk_nio3
525 @$(SummaryInfo)
526
Kelly O'Haird1258922009-11-08 15:11:10 -0800527# Stable othervm testruns (minus items from PROBLEM_LIST)
528# Using samevm has serious problems with these tests
529JDK_ALL_TARGETS += jdk_rmi
530jdk_rmi: java/rmi javax/rmi sun/rmi
531 $(call RunOthervmBatch)
532
533# Stable samevm testruns (minus items from PROBLEM_LIST)
534JDK_ALL_TARGETS += jdk_security1
535jdk_security1: java/security
536 $(call RunSamevmBatch)
537
538# Stable othervm testruns (minus items from PROBLEM_LIST)
539# Using samevm has serious problems with these tests
540JDK_ALL_TARGETS += jdk_security2
541jdk_security2: javax/crypto com/sun/crypto
542 $(call RunOthervmBatch)
Kelly O'Hair61c09152009-12-09 09:46:57 -0800543
544# Stable othervm testruns (minus items from PROBLEM_LIST)
545# Using samevm has serious problems with these tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800546JDK_ALL_TARGETS += jdk_security3
547jdk_security3: com/sun/security lib/security javax/security sun/security
548 $(call RunOthervmBatch)
549
Kelly O'Hair61c09152009-12-09 09:46:57 -0800550# All security tests
Kelly O'Haird020b042009-11-23 09:51:52 -0800551jdk_security: jdk_security1 jdk_security2 jdk_security3
552 @$(SummaryInfo)
553
Kelly O'Haird1258922009-11-08 15:11:10 -0800554# Stable othervm testruns (minus items from PROBLEM_LIST)
555# Using samevm has problems, and doesn't help performance as much as others.
556JDK_ALL_TARGETS += jdk_swing
557jdk_swing: javax/swing sun/java2d
558 $(call RunOthervmBatch)
559
560# Stable samevm testruns (minus items from PROBLEM_LIST)
561JDK_ALL_TARGETS += jdk_text
562jdk_text: java/text sun/text
563 $(call RunSamevmBatch)
564
Kelly O'Hair61c09152009-12-09 09:46:57 -0800565# Stable samevm testruns (minus items from PROBLEM_LIST)
Kelly O'Haird1258922009-11-08 15:11:10 -0800566JDK_ALL_TARGETS += jdk_tools1
567jdk_tools1: com/sun/jdi
Kelly O'Hair547328d2009-11-25 08:24:58 -0800568 $(call RunSamevmBatch)
Kelly O'Hair61c09152009-12-09 09:46:57 -0800569
570# Stable othervm testruns (minus items from PROBLEM_LIST)
571# Using samevm has serious problems with these tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800572JDK_ALL_TARGETS += jdk_tools2
573jdk_tools2: com/sun/tools sun/jvmstat sun/tools tools vm com/sun/servicetag com/sun/tracing
574 $(call RunOthervmBatch)
575
Kelly O'Hair61c09152009-12-09 09:46:57 -0800576# All tools tests
Kelly O'Haird020b042009-11-23 09:51:52 -0800577jdk_tools: jdk_tools1 jdk_tools2
578 @$(SummaryInfo)
579
Kelly O'Haird1258922009-11-08 15:11:10 -0800580# Stable samevm testruns (minus items from PROBLEM_LIST)
581JDK_ALL_TARGETS += jdk_util
582jdk_util: java/util sun/util
583 $(call RunSamevmBatch)
584
585# ------------------------------------------------------------------
586
587# Run all tests
Kelly O'Hair61c09152009-12-09 09:46:57 -0800588FILTER_OUT_LIST=jdk_awt jdk_rmi jdk_swing
589JDK_ALL_STABLE_TARGETS := $(filter-out $(FILTER_OUT_LIST), $(JDK_ALL_TARGETS))
590jdk_all: $(JDK_ALL_STABLE_TARGETS)
Kelly O'Haird1258922009-11-08 15:11:10 -0800591 @$(SummaryInfo)
592
593# These are all phony targets
594PHONY_LIST += $(JDK_ALL_TARGETS)
595
596# ------------------------------------------------------------------
597
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700598# Default JTREG to run (win32 script works for everybody)
599JTREG = $(JT_HOME)/win32/bin/jtreg
Kelly O'Haird1258922009-11-08 15:11:10 -0800600# Add any extra options (samevm etc.)
601JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
602# Only run automatic tests
603JTREG_BASIC_OPTIONS += -a
Kelly O'Haird44fe662009-12-11 15:29:22 -0800604# Always turn on assertions
605JTREG_ASSERT_OPTION = -ea -esa
606JTREG_BASIC_OPTIONS += $(JTREG_ASSERT_OPTION)
Kelly O'Haird1258922009-11-08 15:11:10 -0800607# Report details on all failed or error tests, times too
608JTREG_BASIC_OPTIONS += -v:fail,error,time
609# Retain all files for failing tests
610JTREG_BASIC_OPTIONS += -retain:fail,error
611# Ignore tests are not run and completely silent about it
Kelly O'Haird44fe662009-12-11 15:29:22 -0800612JTREG_IGNORE_OPTION = -ignore:quiet
613JTREG_BASIC_OPTIONS += $(JTREG_IGNORE_OPTION)
Kelly O'Hair61c09152009-12-09 09:46:57 -0800614# Multiple by 4 the timeout numbers
Kelly O'Haird44fe662009-12-11 15:29:22 -0800615JTREG_TIMEOUT_OPTION = -timeoutFactor:4
616JTREG_BASIC_OPTIONS += $(JTREG_TIMEOUT_OPTION)
Kelly O'Haird1258922009-11-08 15:11:10 -0800617# Boost the max memory for jtreg to avoid gc thrashing
Kelly O'Haird44fe662009-12-11 15:29:22 -0800618JTREG_MEMORY_OPTION = -J-Xmx512m
619JTREG_BASIC_OPTIONS += $(JTREG_MEMORY_OPTION)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700620
Kelly O'Haird1258922009-11-08 15:11:10 -0800621# Make sure jtreg exists
622$(JTREG): $(JT_HOME)
623
624# Run jtreg
625jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) $(EXCLUDELIST)
626 @$(EXPAND) $(EXCLUDELIST) \
627 | $(CUT) -d' ' -f1 \
628 | $(SED) -e 's@^@Excluding: @'
629 ( \
630 ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)"); \
631 export JT_HOME; \
632 $(PREP_DISPLAY) && \
633 $(shell $(GETMIXEDPATH) "$(JTREG)") \
634 $(JTREG_BASIC_OPTIONS) \
635 -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport \
636 -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork \
637 -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \
638 -exclude:$(shell $(GETMIXEDPATH) "$(EXCLUDELIST)") \
639 $(JTREG_TEST_OPTIONS) \
640 $(TESTDIRS) \
641 ) ; $(BUNDLE_UP_AND_EXIT) \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800642 ) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700643
644PHONY_LIST += jtreg_tests
645
646################################################################
647
648# packtest
649
650# Expect JPRT to set JPRT_PACKTEST_HOME.
651PACKTEST_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/packtest
652ifdef JPRT_PACKTEST_HOME
653 PACKTEST_HOME = $(JPRT_PACKTEST_HOME)
654endif
655
656packtest: prep $(PACKTEST_HOME)/ptest $(PRODUCT_HOME)
657 ( $(CD) $(PACKTEST_HOME) && \
658 $(PACKTEST_HOME)/ptest \
659 -t "$(PRODUCT_HOME)" \
660 $(PACKTEST_STRESS_OPTION) \
661 $(EXTRA_PACKTEST_OPTIONS) \
662 -W $(ABS_TEST_OUTPUT_DIR) \
663 $(JAVA_ARGS:%=-J %) \
664 $(JAVA_VM_ARGS:%=-J %) \
665 ) ; $(BUNDLE_UP_AND_EXIT)
666
667packtest_stress: PACKTEST_STRESS_OPTION=-s
668packtest_stress: packtest
669
670PHONY_LIST += packtest packtest_stress
671
672################################################################
673
Mandy Chunge2f72482009-05-26 17:47:57 -0700674# perftest to collect statistics
675
676# Expect JPRT to set JPRT_PACKTEST_HOME.
677PERFTEST_HOME = ${TEST_ROOT}/perf
678ifdef JPRT_PERFTEST_HOME
679 PERFTEST_HOME = $(JPRT_PERFTEST_HOME)
680endif
681
682perftest: ( $(PERFTEST_HOME)/perftest \
683 -t $(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \
684 -w $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)") \
685 -h $(PERFTEST_HOME) \
686 ) ; $(BUNDLE_UP_AND_EXIT)
687
688
689PHONY_LIST += perftest
690
691################################################################
692
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700693# vmsqe tests
694
695# Expect JPRT to set JPRT_VMSQE_HOME.
696VMSQE_HOME = /java/sqe/comp/vm/testbase/sqe/vm/current/build/latest/vm
697ifdef JPRT_VMSQE_HOME
698 VMSQE_HOME = $(JPRT_VMSQE_HOME)
699endif
700
701# Expect JPRT to set JPRT_RUNVMSQE_HOME.
702RUNVMSQE_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/runvmsqe
703ifdef JPRT_RUNVMSQE_HOME
704 RUNVMSQE_HOME = $(JPRT_RUNVMSQE_HOME)
705endif
706
707# Expect JPRT to set JPRT_TONGA3_HOME.
708TONGA3_HOME = /java/sqe//tools/gtee/harness/tonga
709ifdef JPRT_TONGA3_HOME
710 TONGA3_HOME = $(JPRT_TONGA3_HOME)
711endif
712
713RUNVMSQE_BIN = $(RUNVMSQE_HOME)/bin/runvmsqe
714
715vmsqe_tests: prep $(VMSQE_HOME)/vm $(TONGA3_HOME) $(RUNVMSQE_BIN) $(PRODUCT_HOME)
716 $(RM) -r $(ABS_TEST_OUTPUT_DIR)/vmsqe
717 ( $(CD) $(ABS_TEST_OUTPUT_DIR) && \
718 $(RUNVMSQE_BIN) \
719 -jdk "$(PRODUCT_HOME)" \
720 -o "$(ABS_TEST_OUTPUT_DIR)/vmsqe" \
721 -testbase "$(VMSQE_HOME)/vm" \
722 -tonga "$(TONGA3_HOME)" \
723 -tongajdk "$(ALT_BOOTDIR)" \
724 $(JAVA_ARGS) \
725 $(JAVA_VM_ARGS) \
726 $(RUNVMSQE_TEST_OPTION) \
727 $(EXTRA_RUNVMSQE_OPTIONS) \
728 ) ; $(BUNDLE_UP_AND_EXIT)
729
730vmsqe_jdwp: RUNVMSQE_TEST_OPTION=-jdwp
731vmsqe_jdwp: vmsqe_tests
732
733vmsqe_jdi: RUNVMSQE_TEST_OPTION=-jdi
734vmsqe_jdi: vmsqe_tests
735
736vmsqe_jdb: RUNVMSQE_TEST_OPTION=-jdb
737vmsqe_jdb: vmsqe_tests
738
739vmsqe_quick-jdi: RUNVMSQE_TEST_OPTION=-quick-jdi
740vmsqe_quick-jdi: vmsqe_tests
741
742vmsqe_sajdi: RUNVMSQE_TEST_OPTION=-sajdi
743vmsqe_sajdi: vmsqe_tests
744
745vmsqe_jvmti: RUNVMSQE_TEST_OPTION=-jvmti
746vmsqe_jvmti: vmsqe_tests
747
748vmsqe_hprof: RUNVMSQE_TEST_OPTION=-hprof
749vmsqe_hprof: vmsqe_tests
750
751vmsqe_monitoring: RUNVMSQE_TEST_OPTION=-monitoring
752vmsqe_monitoring: vmsqe_tests
753
754PHONY_LIST += vmsqe_jdwp vmsqe_jdi vmsqe_jdb vmsqe_quick-jdi vmsqe_sajdi \
755 vmsqe_jvmti vmsqe_hprof vmsqe_monitoring vmsqe_tests
756
757################################################################
758
759# jck tests
760
761JCK_WORK_DIR = $(ABS_TEST_OUTPUT_DIR)/JCKwork
762JCK_REPORT_DIR = $(ABS_TEST_OUTPUT_DIR)/JCKreport
763JCK_PROPERTIES = $(ABS_TEST_OUTPUT_DIR)/jck.properties
764JCK_CONFIG = $(ABS_TEST_OUTPUT_DIR)/jck.config
765
766JCK_JAVA_EXE = $(PRODUCT_HOME)/bin/java$(EXESUFFIX)
767
768JCK_JAVATEST_JAR = $(JCK_HOME)/lib/javatest.jar
769JCK_JAVATEST = $(ALT_BOOTDIR)/bin/java -jar $(JCK_JAVATEST_JAR)
770
771$(JCK_CONFIG): $(TEST_ROOT)/JCK-$(JCK_BUNDLE_NAME)-$(JCK_RELEASE)-base.jti
772 $(RM) $@
773 $(MKDIR) -p $(@D)
774 $(CP) $< $@
775
776$(JCK_PROPERTIES): $(PRODUCT_HOME) $(JCK_JAVA_EXE)
777 $(RM) $@
778 $(MKDIR) -p $(@D)
779 $(ECHO) "jck.env.compiler.compRefExecute.cmdAsFile=$(JCK_JAVA_EXE)" >> $@
780 $(ECHO) "jck.env.compiler.compRefExecute.systemRoot=$(SYSTEMROOT)" >> $@
781 $(ECHO) "jck.env.compiler.testCompile.testCompileAPImultiJVM.cmdAsFile=$(JCK_JAVA_EXE)" >> $@
782 $(ECHO) "jck.tests.tests=$(JCK_BUNDLE_TESTDIRS)" >> $@
783
784jck_tests: prep $(JCK_HOME) $(JCK_PROPERTIES) $(JCK_CONFIG) $(JCK_JAVATEST_JAR)
785 $(MKDIR) -p $(JCK_WORK_DIR)
786 ( $(JCK_JAVATEST) \
787 -verbose:commands,non-pass \
788 -testSuite $(JCK_HOME) \
789 -workDir $(JCK_WORK_DIR) \
790 -config $(JCK_CONFIG) \
791 -set -file $(JCK_PROPERTIES) \
792 -runtests \
793 -writeReport $(JCK_REPORT_DIR) \
794 ) ; $(BUNDLE_UP_AND_EXIT)
795
796PHONY_LIST += jck_tests
797
798################################################################
799
800# jck6 tests
801
802JCK6_RELEASE = 6b
803JCK6_DEFAULT_HOME = $(SLASH_JAVA)/re/jck/$(JCK6_RELEASE)/archive/fcs/binaries
804
805# Expect JPRT to set JPRT_JCK6COMPILER_HOME.
806JCK6COMPILER_HOME = $(JCK6_DEFAULT_HOME)/JCK-compiler-$(JCK6_RELEASE)
807ifdef JPRT_JCK6COMPILER_HOME
808 JCK6COMPILER_HOME = $(JPRT_JCK6COMPILER_HOME)
809endif
810
811# Expect JPRT to set JPRT_JCK6RUNTIME_HOME.
812JCK6RUNTIME_HOME = $(JCK6_DEFAULT_HOME)/JCK-runtime-$(JCK6_RELEASE)
813ifdef JPRT_JCK6RUNTIME_HOME
814 JCK6RUNTIME_HOME = $(JPRT_JCK6RUNTIME_HOME)
815endif
816
817# Expect JPRT to set JPRT_JCK6DEVTOOLS_HOME.
818JCK6DEVTOOLS_HOME = $(JCK6_DEFAULT_HOME)/JCK-devtools-$(JCK6_RELEASE)
819ifdef JPRT_JCK6DEVTOOLS_HOME
820 JCK6DEVTOOLS_HOME = $(JPRT_JCK6DEVTOOLS_HOME)
821endif
822
823jck6_tests: JCK_HOME=$(JCK6_HOME)
824jck6_tests: JCK_RELEASE=$(JCK6_RELEASE)
825jck6_tests: jck_tests
826
827jck6compiler: JCK6_HOME=$(JCK6COMPILER_HOME)
828jck6compiler: JCK_BUNDLE_NAME=compiler
829jck6compiler: jck6_tests
830
831jck6compiler_lang: JCK_BUNDLE_TESTDIRS=lang
832jck6compiler_lang: jck6compiler
833
834jck6runtime: JCK6_HOME=$(JCK6RUNTIME_HOME)
835jck6runtime: JCK_BUNDLE_NAME=runtime
836jck6runtime: jck6_tests
837
838jck6runtime_lang: JCK_BUNDLE_TESTDIRS=lang
839jck6runtime_lang: jck6runtime
840
841jck6devtools: JCK6_HOME=$(JCK6DEVTOOLS_HOME)
842jck6devtools: JCK_BUNDLE_NAME=devtools
843jck6devtools: jck6_tests
844
845jck6devtools_lang: JCK_BUNDLE_TESTDIRS=lang
846jck6devtools_lang: jck6devtools
847
848PHONY_LIST += jck6compiler jck6runtime jck6devtools jck6_tests \
849 jck6compiler_lang jck6runtime_lang jck6devtools_lang
850
851################################################################
852
853# jck7 tests
854
855JCK7_RELEASE = 7
856JCK7_DEFAULT_HOME = $(SLASH_JAVA)/re/jck/$(JCK7_RELEASE)/archive/fcs/binaries
857
858# Expect JPRT to set JPRT_JCK7COMPILER_HOME.
859JCK7COMPILER_HOME = $(JCK7_DEFAULT_HOME)/JCK-compiler-$(JCK7_RELEASE)
860ifdef JPRT_JCK7COMPILER_HOME
861 JCK7COMPILER_HOME = $(JPRT_JCK7COMPILER_HOME)
862endif
863
864# Expect JPRT to set JPRT_JCK7RUNTIME_HOME.
865JCK7RUNTIME_HOME = $(JCK7_DEFAULT_HOME)/JCK-runtime-$(JCK7_RELEASE)
866ifdef JPRT_JCK7RUNTIME_HOME
867 JCK7RUNTIME_HOME = $(JPRT_JCK7RUNTIME_HOME)
868endif
869
870# Expect JPRT to set JPRT_JCK7DEVTOOLS_HOME.
871JCK7DEVTOOLS_HOME = $(JCK7_DEFAULT_HOME)/JCK-devtools-$(JCK7_RELEASE)
872ifdef JPRT_JCK7DEVTOOLS_HOME
873 JCK7DEVTOOLS_HOME = $(JPRT_JCK7DEVTOOLS_HOME)
874endif
875
876jck7_tests: JCK_HOME=$(JCK7_HOME)
877jck7_tests: JCK_RELEASE=$(JCK7_RELEASE)
878jck7_tests: jck_tests
879
880jck7compiler: JCK7_HOME=$(JCK7COMPILER_HOME)
881jck7compiler: JCK_BUNDLE_NAME=compiler
882jck7compiler: jck7_tests
883
884jck7compiler_lang: JCK_BUNDLE_TESTDIRS=lang
885jck7compiler_lang: jck7compiler
886
887jck7runtime: JCK7_HOME=$(JCK7RUNTIME_HOME)
888jck7runtime: JCK_BUNDLE_NAME=runtime
889jck7runtime: jck7_tests
890
891jck7runtime_lang: JCK_BUNDLE_TESTDIRS=lang
892jck7runtime_lang: jck7runtime
893
894jck7devtools: JCK7_HOME=$(JCK7DEVTOOLS_HOME)
895jck7devtools: JCK_BUNDLE_NAME=devtools
896jck7devtools: jck7_tests
897
898jck7devtools_lang: JCK_BUNDLE_TESTDIRS=lang
899jck7devtools_lang: jck7devtools
900
901PHONY_LIST += jck7compiler jck7runtime jck7devtools jck7_tests \
902 jck7compiler_lang jck7runtime_lang jck7devtools_lang
903
904################################################################
J. Duke319a3b92007-12-01 00:00:00 +0000905
906# Phony targets (e.g. these are not filenames)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700907.PHONY: all clean prep $(PHONY_LIST)
908
909################################################################
J. Duke319a3b92007-12-01 00:00:00 +0000910