blob: 20bd55408d05bf777504c7b0050ecf96e45f850f [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)
Kelly O'Hair79132952010-03-12 09:03:02 -080073 # Check for unknown arch, try uname -p if uname -m says unknown
74 ifeq ($(OS_ARCH),unknown)
75 OS_ARCH := $(shell $(UNAME) -p)
76 endif
Kelly O'Haird1258922009-11-08 15:11:10 -080077 OS_VERSION := $(shell $(UNAME) -r)
J. Duke319a3b92007-12-01 00:00:00 +000078endif
Kelly O'Haird1258922009-11-08 15:11:10 -080079ifndef OS_NAME
80 ifneq ($(PROCESSOR_IDENTIFIER), )
81 OS_NAME = windows
82 SLASH_JAVA = J:
83 # A variety of ways to say X64 arch :^(
84 OS_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER))
85 EXESUFFIX = .exe
86 # These need to be different depending on MKS or CYGWIN
87 ifeq ($(findstring cygdrive,$(shell ($(CD) C:/ && $(PWD)))), )
88 GETMIXEDPATH = dosname -s
89 OS_VERSION := $(shell $(UNAME) -r)
J. Duke319a3b92007-12-01 00:00:00 +000090 else
Kelly O'Haird1258922009-11-08 15:11:10 -080091 GETMIXEDPATH = cygpath -m -s
92 OS_VERSION := $(shell $(UNAME) -s | $(CUT) -d'-' -f2)
J. Duke319a3b92007-12-01 00:00:00 +000093 endif
94 endif
Kelly O'Haird1258922009-11-08 15:11:10 -080095endif
96
97# Only want major and minor numbers from os version
98OS_VERSION := $(shell $(ECHO) "$(OS_VERSION)" | $(CUT) -d'.' -f1,2)
99
Kelly O'Hair79132952010-03-12 09:03:02 -0800100# Name to use for x86_64 arch (historically amd64, but should change someday)
101OS_ARCH_X64_NAME:=amd64
102#OS_ARCH_X64_NAME:=x64
103
104# Alternate arch names (in case this arch is known by a second name)
105# PROBLEM_LISTS may use either name.
106OS_ARCH2-amd64:=x64
107#OS_ARCH2-x64:=amd64
108
109# Try and use the arch names consistently
110OS_ARCH:=$(subst x64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
111OS_ARCH:=$(subst X64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
112OS_ARCH:=$(subst AMD64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
113OS_ARCH:=$(subst amd64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
114OS_ARCH:=$(subst x86_64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
115OS_ARCH:=$(subst EM64T,$(OS_ARCH_X64_NAME),$(OS_ARCH))
116OS_ARCH:=$(subst em64t,$(OS_ARCH_X64_NAME),$(OS_ARCH))
117OS_ARCH:=$(subst intel64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
118OS_ARCH:=$(subst Intel64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
119OS_ARCH:=$(subst INTEL64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
Kelly O'Haird1258922009-11-08 15:11:10 -0800120OS_ARCH:=$(subst IA64,ia64,$(OS_ARCH))
121OS_ARCH:=$(subst X86,i586,$(OS_ARCH))
122OS_ARCH:=$(subst x86,i586,$(OS_ARCH))
123OS_ARCH:=$(subst i386,i586,$(OS_ARCH))
124OS_ARCH:=$(subst i486,i586,$(OS_ARCH))
125OS_ARCH:=$(subst i686,i586,$(OS_ARCH))
126
Kelly O'Hair79132952010-03-12 09:03:02 -0800127# Default ARCH_DATA_MODEL settings
128ARCH_DATA_MODEL-i586 = 32
129ARCH_DATA_MODEL-$(OS_ARCH_X64_NAME) = 64
130ARCH_DATA_MODEL-ia64 = 64
131ARCH_DATA_MODEL-sparc = 32
132ARCH_DATA_MODEL-sparcv9 = 64
133
134# If ARCH_DATA_MODEL is not defined, try and pick a reasonable default
135ifndef ARCH_DATA_MODEL
136 ARCH_DATA_MODEL:=$(ARCH_DATA_MODEL-$(OS_ARCH))
137endif
Kelly O'Haird1258922009-11-08 15:11:10 -0800138ifndef ARCH_DATA_MODEL
139 ARCH_DATA_MODEL=32
140endif
Kelly O'Hair79132952010-03-12 09:03:02 -0800141
142# Platform directory name
143PLATFORM_OS = $(OS_NAME)-$(OS_ARCH)
144
145# Check ARCH_DATA_MODEL, adjust OS_ARCH accordingly on solaris
Kelly O'Haird1258922009-11-08 15:11:10 -0800146ARCH_DATA_MODEL_ERROR= \
Kelly O'Hair79132952010-03-12 09:03:02 -0800147 ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) cannot be used with $(PLATFORM_OS)
Kelly O'Haird1258922009-11-08 15:11:10 -0800148ifeq ($(ARCH_DATA_MODEL),64)
Kelly O'Hair79132952010-03-12 09:03:02 -0800149 ifeq ($(PLATFORM_OS),solaris-i586)
150 OS_ARCH=$(OS_ARCH_X64_NAME)
Kelly O'Haird1258922009-11-08 15:11:10 -0800151 endif
Kelly O'Hair79132952010-03-12 09:03:02 -0800152 ifeq ($(PLATFORM_OS),solaris-sparc)
Kelly O'Haird1258922009-11-08 15:11:10 -0800153 OS_ARCH=sparcv9
154 endif
155 ifeq ($(OS_ARCH),i586)
156 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
157 endif
158 ifeq ($(OS_ARCH),sparc)
159 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
160 endif
161else
162 ifeq ($(ARCH_DATA_MODEL),32)
Kelly O'Hair79132952010-03-12 09:03:02 -0800163 ifeq ($(OS_ARCH),$(OS_ARCH_X64_NAME))
Kelly O'Haird1258922009-11-08 15:11:10 -0800164 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
165 endif
166 ifeq ($(OS_ARCH),ia64)
167 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
168 endif
169 ifeq ($(OS_ARCH),sparcv9)
170 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
171 endif
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700172 else
Kelly O'Haird1258922009-11-08 15:11:10 -0800173 x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700174 endif
J. Duke319a3b92007-12-01 00:00:00 +0000175endif
176
Kelly O'Hair79132952010-03-12 09:03:02 -0800177# Alternate OS_ARCH name (defaults to OS_ARCH)
178OS_ARCH2:=$(OS_ARCH2-$(OS_ARCH))
179ifeq ($(OS_ARCH2),)
180 OS_ARCH2:=$(OS_ARCH)
181endif
182
J. Duke319a3b92007-12-01 00:00:00 +0000183# Root of this test area (important to use full paths in some places)
Kelly O'Haird1258922009-11-08 15:11:10 -0800184TEST_ROOT := $(shell $(PWD))
J. Duke319a3b92007-12-01 00:00:00 +0000185
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700186# Root of all test results
187ifdef ALT_OUTPUTDIR
188 ABS_OUTPUTDIR = $(ALT_OUTPUTDIR)
J. Duke319a3b92007-12-01 00:00:00 +0000189else
Kelly O'Hair79132952010-03-12 09:03:02 -0800190 ABS_OUTPUTDIR = $(TEST_ROOT)/../build/$(PLATFORM_OS)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700191endif
Kelly O'Hair79132952010-03-12 09:03:02 -0800192ABS_PLATFORM_BUILD_ROOT = $(ABS_OUTPUTDIR)
193ABS_TEST_OUTPUT_DIR := $(ABS_PLATFORM_BUILD_ROOT)/testoutput/$(UNIQUE_DIR)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700194
195# Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test)
196ifndef PRODUCT_HOME
197 # Try to use j2sdk-image if it exists
Kelly O'Hair79132952010-03-12 09:03:02 -0800198 ABS_JDK_IMAGE = $(ABS_PLATFORM_BUILD_ROOT)/j2sdk-image
199 PRODUCT_HOME := \
200 $(shell \
201 if [ -d $(ABS_JDK_IMAGE) ] ; then \
202 $(ECHO) "$(ABS_JDK_IMAGE)"; \
203 else \
204 $(ECHO) "$(ABS_PLATFORM_BUILD_ROOT)"; \
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700205 fi)
206 PRODUCT_HOME := $(PRODUCT_HOME)
J. Duke319a3b92007-12-01 00:00:00 +0000207endif
208
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700209# Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.)
210# Should be passed into 'java' only.
Kelly O'Haird1258922009-11-08 15:11:10 -0800211# Could include: -d64 -server -client OR any java option
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700212ifdef JPRT_PRODUCT_ARGS
213 JAVA_ARGS = $(JPRT_PRODUCT_ARGS)
214endif
J. Duke319a3b92007-12-01 00:00:00 +0000215
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700216# Expect JPRT to set JPRT_PRODUCT_VM_ARGS (e.g. -Xcomp etc.)
217# Should be passed into anything running the vm (java, javac, javadoc, ...).
218ifdef JPRT_PRODUCT_VM_ARGS
219 JAVA_VM_ARGS = $(JPRT_PRODUCT_VM_ARGS)
220endif
J. Duke319a3b92007-12-01 00:00:00 +0000221
Kelly O'Haird1258922009-11-08 15:11:10 -0800222# Check JAVA_ARGS arguments based on ARCH_DATA_MODEL etc.
223ifeq ($(OS_NAME),solaris)
224 D64_ERROR_MESSAGE=Mismatch between ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) and use of -d64 in JAVA_ARGS=$(JAVA_ARGS)
225 ifeq ($(ARCH_DATA_MODEL),32)
226 ifneq ($(findstring -d64,$(JAVA_ARGS)),)
227 x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)")
228 endif
229 endif
230 ifeq ($(ARCH_DATA_MODEL),64)
231 ifeq ($(findstring -d64,$(JAVA_ARGS)),)
232 x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)")
233 endif
234 endif
235endif
236
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700237# Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
238ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip
239ifdef JPRT_ARCHIVE_BUNDLE
240 ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE)
241endif
J. Duke319a3b92007-12-01 00:00:00 +0000242
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700243# How to create the test bundle (pass or fail, we want to create this)
244# Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed.
245ZIP_UP_RESULTS = ( $(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)` \
246 && $(CD) $(ABS_TEST_OUTPUT_DIR) \
247 && $(ZIP) -q -r $(ARCHIVE_BUNDLE) . )
Kelly O'Haird1258922009-11-08 15:11:10 -0800248SUMMARY_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport/text/summary.txt
249STATS_TXT_NAME = Stats.txt
250STATS_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/$(STATS_TXT_NAME)
251RUNLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/runlist.txt
252PASSLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/passlist.txt
253FAILLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/faillist.txt
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800254EXITCODE = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/exitcode.txt
255
256TESTEXIT = \
257 if [ ! -s $(EXITCODE) ] ; then \
258 $(ECHO) "ERROR: EXITCODE file not filled in."; \
259 $(ECHO) "1" > $(EXITCODE); \
260 fi ; \
261 testExitCode=`$(CAT) $(EXITCODE)`; \
262 $(ECHO) "EXIT CODE: $${testExitCode}"; \
Kelly O'Hair61c09152009-12-09 09:46:57 -0800263 exit $${testExitCode}
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800264
Kelly O'Haird1258922009-11-08 15:11:10 -0800265BUNDLE_UP_AND_EXIT = \
266( \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800267 jtregExitCode=$$? && \
Kelly O'Haird1258922009-11-08 15:11:10 -0800268 _summary="$(SUMMARY_TXT)"; \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800269 $(RM) -f $(STATS_TXT) $(RUNLIST) $(PASSLIST) $(FAILLIST) $(EXITCODE); \
270 $(ECHO) "$${jtregExitCode}" > $(EXITCODE); \
Kelly O'Haird1258922009-11-08 15:11:10 -0800271 if [ -r "$${_summary}" ] ; then \
Kelly O'Hair61c09152009-12-09 09:46:57 -0800272 $(ECHO) "Summary: $(UNIQUE_DIR)" > $(STATS_TXT); \
Kelly O'Haird1258922009-11-08 15:11:10 -0800273 $(EXPAND) $${_summary} | $(EGREP) -v ' Not run\.' > $(RUNLIST); \
274 $(EGREP) ' Passed\.' $(RUNLIST) \
275 | $(EGREP) -v ' Error\.' \
276 | $(EGREP) -v ' Failed\.' > $(PASSLIST); \
277 ( $(EGREP) ' Failed\.' $(RUNLIST); \
278 $(EGREP) ' Error\.' $(RUNLIST); \
279 $(EGREP) -v ' Passed\.' $(RUNLIST) ) \
280 | $(SORT) | $(UNIQ) > $(FAILLIST); \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800281 if [ $${jtregExitCode} != 0 -o -s $(FAILLIST) ] ; then \
Kelly O'Haird1258922009-11-08 15:11:10 -0800282 $(EXPAND) $(FAILLIST) \
283 | $(CUT) -d' ' -f1 \
284 | $(SED) -e 's@^@FAILED: @' >> $(STATS_TXT); \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800285 if [ $${jtregExitCode} = 0 ] ; then \
286 jtregExitCode=1; \
287 fi; \
Kelly O'Haird1258922009-11-08 15:11:10 -0800288 fi; \
289 runc="`$(CAT) $(RUNLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
290 passc="`$(CAT) $(PASSLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
291 failc="`$(CAT) $(FAILLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
292 exclc="`$(CAT) $(EXCLUDELIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
293 $(ECHO) "TEST STATS: run=$${runc} pass=$${passc} fail=$${failc} excluded=$${exclc}" \
294 >> $(STATS_TXT); \
295 else \
296 $(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \
297 fi; \
298 $(CAT) $(STATS_TXT); \
Kelly O'Haire4fce692010-03-06 14:59:23 -0800299 $(ZIP_UP_RESULTS) ; \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800300 $(TESTEXIT) \
Kelly O'Haird1258922009-11-08 15:11:10 -0800301)
J. Duke319a3b92007-12-01 00:00:00 +0000302
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700303################################################################
J. Duke319a3b92007-12-01 00:00:00 +0000304
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700305# Default make rule (runs jtreg_tests)
306all: jtreg_tests
307 @$(ECHO) "Testing completed successfully"
J. Duke319a3b92007-12-01 00:00:00 +0000308
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700309# Prep for output
310prep: clean
311 @$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR)
312 @$(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)`
J. Duke319a3b92007-12-01 00:00:00 +0000313
314# Cleanup
315clean:
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700316 $(RM) -r $(ABS_TEST_OUTPUT_DIR)
317 $(RM) $(ARCHIVE_BUNDLE)
J. Duke319a3b92007-12-01 00:00:00 +0000318
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700319################################################################
320
321# jtreg tests
322
323# Expect JT_HOME to be set for jtreg tests. (home for jtreg)
Kelly O'Haird020b042009-11-23 09:51:52 -0800324ifndef JT_HOME
325 JT_HOME = $(SLASH_JAVA)/re/jtreg/4.0/promoted/latest/binaries/jtreg
326 ifdef JPRT_JTREG_HOME
327 JT_HOME = $(JPRT_JTREG_HOME)
328 endif
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700329endif
330
331# Expect JPRT to set TESTDIRS to the jtreg test dirs
332ifndef TESTDIRS
Kelly O'Haird1258922009-11-08 15:11:10 -0800333 TESTDIRS = demo
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700334endif
335
Kelly O'Haird1258922009-11-08 15:11:10 -0800336# Samevm settings (default is false)
337ifndef USE_JTREG_SAMEVM
338 USE_JTREG_SAMEVM=false
339endif
340# With samevm, you cannot use -javaoptions?
341ifeq ($(USE_JTREG_SAMEVM),true)
Kelly O'Haird44fe662009-12-11 15:29:22 -0800342 JTREG_SAMEVM_OPTION = -samevm
343 EXTRA_JTREG_OPTIONS += $(JTREG_SAMEVM_OPTION) $(JAVA_ARGS) $(JAVA_ARGS:%=-vmoption:%)
Kelly O'Haird1258922009-11-08 15:11:10 -0800344 JTREG_TEST_OPTIONS = $(JAVA_VM_ARGS:%=-vmoption:%)
345else
346 JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%)
347endif
348
349# Some tests annoy me and fail frequently
350PROBLEM_LIST=ProblemList.txt
Kelly O'Haird020b042009-11-23 09:51:52 -0800351PROBLEM_LISTS=$(PROBLEM_LIST) $(wildcard closed/$(PROBLEM_LIST))
Kelly O'Haird1258922009-11-08 15:11:10 -0800352EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt
353
354# Create exclude list for this platform and arch
355ifdef NO_EXCLUDES
Kelly O'Haird020b042009-11-23 09:51:52 -0800356$(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS)
Kelly O'Haird1258922009-11-08 15:11:10 -0800357 @$(ECHO) "NOTHING_EXCLUDED" > $@
358else
Kelly O'Haird020b042009-11-23 09:51:52 -0800359$(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS)
Kelly O'Haird1258922009-11-08 15:11:10 -0800360 @$(RM) $@ $@.temp1 $@.temp2
Kelly O'Haird020b042009-11-23 09:51:52 -0800361 @(($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-all' ) ;\
362 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_ARCH)' ) ;\
Kelly O'Hair79132952010-03-12 09:03:02 -0800363 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_ARCH2)' ) ;\
Kelly O'Haird020b042009-11-23 09:51:52 -0800364 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_VERSION)') ;\
365 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH)' ) ;\
Kelly O'Hair79132952010-03-12 09:03:02 -0800366 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH2)' ) ;\
Kelly O'Haird020b042009-11-23 09:51:52 -0800367 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-all' ) ;\
368 ($(ECHO) "#") ;\
Kelly O'Haird1258922009-11-08 15:11:10 -0800369 ) | $(SED) -e 's@^[\ ]*@@' \
370 | $(EGREP) -v '^#' > $@.temp1
371 @for tdir in $(TESTDIRS) ; do \
372 ( ( $(CAT) $@.temp1 | $(EGREP) "^$${tdir}" ) ; $(ECHO) "#" ) >> $@.temp2 ; \
373 done
374 @$(ECHO) "# at least one line" >> $@.temp2
375 @( $(EGREP) -v '^#' $@.temp2 ; true ) > $@
376 @$(ECHO) "Excluding list contains `$(EXPAND) $@ | $(WC) -l` items"
377endif
378
Kelly O'Haird020b042009-11-23 09:51:52 -0800379# Select list of directories that exist
380define TestDirs
381$(foreach i,$1,$(wildcard ${i})) $(foreach i,$1,$(wildcard closed/${i}))
382endef
Kelly O'Haird1258922009-11-08 15:11:10 -0800383# Running batches of tests with or without samevm
384define RunSamevmBatch
Kelly O'Haird020b042009-11-23 09:51:52 -0800385$(ECHO) "Running tests in samevm mode: $(call TestDirs, $?)"
386$(MAKE) TESTDIRS="$(call TestDirs, $?)" USE_JTREG_SAMEVM=true UNIQUE_DIR=$@ jtreg_tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800387endef
388define RunOthervmBatch
Kelly O'Haird020b042009-11-23 09:51:52 -0800389$(ECHO) "Running tests in othervm mode: $(call TestDirs, $?)"
390$(MAKE) TESTDIRS="$(call TestDirs, $?)" USE_JTREG_SAMEVM=false UNIQUE_DIR=$@ jtreg_tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800391endef
392define SummaryInfo
Kelly O'Hair61c09152009-12-09 09:46:57 -0800393$(ECHO) "########################################################"
Kelly O'Haird1258922009-11-08 15:11:10 -0800394$(CAT) $(?:%=$(ABS_TEST_OUTPUT_DIR)/%/$(STATS_TXT_NAME))
Kelly O'Hair61c09152009-12-09 09:46:57 -0800395$(ECHO) "########################################################"
Kelly O'Haird1258922009-11-08 15:11:10 -0800396endef
397
398# ------------------------------------------------------------------
399
400# Batches of tests (somewhat arbitrary assigments to jdk_* targets)
401JDK_ALL_TARGETS =
402
403# Stable othervm testruns (minus items from PROBLEM_LIST)
404# Using samevm has problems, and doesn't help performance as much as others.
405JDK_ALL_TARGETS += jdk_awt
406jdk_awt: com/sun/awt java/awt sun/awt
407 $(call RunOthervmBatch)
408
409# Stable samevm testruns (minus items from PROBLEM_LIST)
410JDK_ALL_TARGETS += jdk_beans1
411jdk_beans1: java/beans/beancontext java/beans/PropertyChangeSupport \
412 java/beans/Introspector java/beans/Performance \
413 java/beans/VetoableChangeSupport java/beans/Statement
414 $(call RunSamevmBatch)
415
416# Stable othervm testruns (minus items from PROBLEM_LIST)
417# Using samevm has serious problems with these tests
418JDK_ALL_TARGETS += jdk_beans2
419jdk_beans2: java/beans/Beans java/beans/EventHandler java/beans/XMLDecoder \
420 java/beans/PropertyEditor
421 $(call RunOthervmBatch)
Kelly O'Hair61c09152009-12-09 09:46:57 -0800422
423# Stable othervm testruns (minus items from PROBLEM_LIST)
424# Using samevm has serious problems with these tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800425JDK_ALL_TARGETS += jdk_beans3
426jdk_beans3: java/beans/XMLEncoder
427 $(call RunOthervmBatch)
428
Kelly O'Hair61c09152009-12-09 09:46:57 -0800429# All beans tests
Kelly O'Haird020b042009-11-23 09:51:52 -0800430jdk_beans: jdk_beans1 jdk_beans2 jdk_beans3
431 @$(SummaryInfo)
432
Kelly O'Haird1258922009-11-08 15:11:10 -0800433# Stable samevm testruns (minus items from PROBLEM_LIST)
434JDK_ALL_TARGETS += jdk_io
435jdk_io: java/io
436 $(call RunSamevmBatch)
437
438# Stable samevm testruns (minus items from PROBLEM_LIST)
439JDK_ALL_TARGETS += jdk_lang
440jdk_lang: java/lang
441 $(call RunSamevmBatch)
442
443# Stable othervm testruns (minus items from PROBLEM_LIST)
444# Using samevm has serious problems with these tests
445JDK_ALL_TARGETS += jdk_management1
446jdk_management1: javax/management
447 $(call RunOthervmBatch)
448
449# Stable othervm testruns (minus items from PROBLEM_LIST)
450# Using samevm has serious problems with these tests
451JDK_ALL_TARGETS += jdk_management2
452jdk_management2: com/sun/jmx com/sun/management sun/management
453 $(call RunOthervmBatch)
454
Kelly O'Hair61c09152009-12-09 09:46:57 -0800455# All management tests
Kelly O'Haird020b042009-11-23 09:51:52 -0800456jdk_management: jdk_management1 jdk_management2
457 @$(SummaryInfo)
458
Kelly O'Haird1258922009-11-08 15:11:10 -0800459# Stable samevm testruns (minus items from PROBLEM_LIST)
460JDK_ALL_TARGETS += jdk_math
461jdk_math: java/math
462 $(call RunSamevmBatch)
463
464# Stable samevm testruns (minus items from PROBLEM_LIST)
465JDK_ALL_TARGETS += jdk_misc
466jdk_misc: demo javax/imageio javax/naming javax/print javax/script \
467 javax/smartcardio javax/sound com/sun/java com/sun/jndi \
468 com/sun/org sun/misc sun/pisces
469 $(call RunSamevmBatch)
470
471# Stable samevm testruns (minus items from PROBLEM_LIST)
472JDK_ALL_TARGETS += jdk_net
473jdk_net: com/sun/net java/net sun/net
474 $(call RunSamevmBatch)
475
476# Stable samevm testruns (minus items from PROBLEM_LIST)
477JDK_ALL_TARGETS += jdk_nio1
478jdk_nio1: java/nio/file
479 $(call RunSamevmBatch)
480
481# Stable othervm testruns (minus items from PROBLEM_LIST)
482# Using samevm has serious problems with these tests
483JDK_ALL_TARGETS += jdk_nio2
484jdk_nio2: java/nio/Buffer java/nio/ByteOrder \
485 java/nio/channels java/nio/BufferPoolMXBean java/nio/MappedByteBuffer
486 $(call RunOthervmBatch)
Kelly O'Hair61c09152009-12-09 09:46:57 -0800487
488# Stable othervm testruns (minus items from PROBLEM_LIST)
489# Using samevm has serious problems with these tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800490JDK_ALL_TARGETS += jdk_nio3
491jdk_nio3: com/sun/nio sun/nio
492 $(call RunOthervmBatch)
493
Kelly O'Hair61c09152009-12-09 09:46:57 -0800494# All nio tests
Kelly O'Haird020b042009-11-23 09:51:52 -0800495jdk_nio: jdk_nio1 jdk_nio2 jdk_nio3
496 @$(SummaryInfo)
497
Kelly O'Haird1258922009-11-08 15:11:10 -0800498# Stable othervm testruns (minus items from PROBLEM_LIST)
499# Using samevm has serious problems with these tests
500JDK_ALL_TARGETS += jdk_rmi
501jdk_rmi: java/rmi javax/rmi sun/rmi
502 $(call RunOthervmBatch)
503
504# Stable samevm testruns (minus items from PROBLEM_LIST)
505JDK_ALL_TARGETS += jdk_security1
506jdk_security1: java/security
507 $(call RunSamevmBatch)
508
509# Stable othervm testruns (minus items from PROBLEM_LIST)
510# Using samevm has serious problems with these tests
511JDK_ALL_TARGETS += jdk_security2
512jdk_security2: javax/crypto com/sun/crypto
513 $(call RunOthervmBatch)
Kelly O'Hair61c09152009-12-09 09:46:57 -0800514
515# Stable othervm testruns (minus items from PROBLEM_LIST)
516# Using samevm has serious problems with these tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800517JDK_ALL_TARGETS += jdk_security3
518jdk_security3: com/sun/security lib/security javax/security sun/security
519 $(call RunOthervmBatch)
520
Kelly O'Hair61c09152009-12-09 09:46:57 -0800521# All security tests
Kelly O'Haird020b042009-11-23 09:51:52 -0800522jdk_security: jdk_security1 jdk_security2 jdk_security3
523 @$(SummaryInfo)
524
Kelly O'Haird1258922009-11-08 15:11:10 -0800525# Stable othervm testruns (minus items from PROBLEM_LIST)
526# Using samevm has problems, and doesn't help performance as much as others.
527JDK_ALL_TARGETS += jdk_swing
528jdk_swing: javax/swing sun/java2d
529 $(call RunOthervmBatch)
530
531# Stable samevm testruns (minus items from PROBLEM_LIST)
532JDK_ALL_TARGETS += jdk_text
533jdk_text: java/text sun/text
534 $(call RunSamevmBatch)
535
Kelly O'Hair61c09152009-12-09 09:46:57 -0800536# Stable samevm testruns (minus items from PROBLEM_LIST)
Kelly O'Haird1258922009-11-08 15:11:10 -0800537JDK_ALL_TARGETS += jdk_tools1
538jdk_tools1: com/sun/jdi
Kelly O'Hair547328d2009-11-25 08:24:58 -0800539 $(call RunSamevmBatch)
Kelly O'Hair61c09152009-12-09 09:46:57 -0800540
541# Stable othervm testruns (minus items from PROBLEM_LIST)
542# Using samevm has serious problems with these tests
Kelly O'Haird1258922009-11-08 15:11:10 -0800543JDK_ALL_TARGETS += jdk_tools2
544jdk_tools2: com/sun/tools sun/jvmstat sun/tools tools vm com/sun/servicetag com/sun/tracing
545 $(call RunOthervmBatch)
546
Kelly O'Hair61c09152009-12-09 09:46:57 -0800547# All tools tests
Kelly O'Haird020b042009-11-23 09:51:52 -0800548jdk_tools: jdk_tools1 jdk_tools2
549 @$(SummaryInfo)
550
Kelly O'Haird1258922009-11-08 15:11:10 -0800551# Stable samevm testruns (minus items from PROBLEM_LIST)
552JDK_ALL_TARGETS += jdk_util
553jdk_util: java/util sun/util
554 $(call RunSamevmBatch)
555
556# ------------------------------------------------------------------
557
558# Run all tests
Kelly O'Hair61c09152009-12-09 09:46:57 -0800559FILTER_OUT_LIST=jdk_awt jdk_rmi jdk_swing
560JDK_ALL_STABLE_TARGETS := $(filter-out $(FILTER_OUT_LIST), $(JDK_ALL_TARGETS))
561jdk_all: $(JDK_ALL_STABLE_TARGETS)
Kelly O'Haird1258922009-11-08 15:11:10 -0800562 @$(SummaryInfo)
563
564# These are all phony targets
565PHONY_LIST += $(JDK_ALL_TARGETS)
566
567# ------------------------------------------------------------------
568
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700569# Default JTREG to run (win32 script works for everybody)
570JTREG = $(JT_HOME)/win32/bin/jtreg
Kelly O'Haird1258922009-11-08 15:11:10 -0800571# Add any extra options (samevm etc.)
572JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
573# Only run automatic tests
574JTREG_BASIC_OPTIONS += -a
Kelly O'Haird44fe662009-12-11 15:29:22 -0800575# Always turn on assertions
576JTREG_ASSERT_OPTION = -ea -esa
577JTREG_BASIC_OPTIONS += $(JTREG_ASSERT_OPTION)
Kelly O'Haird1258922009-11-08 15:11:10 -0800578# Report details on all failed or error tests, times too
579JTREG_BASIC_OPTIONS += -v:fail,error,time
580# Retain all files for failing tests
581JTREG_BASIC_OPTIONS += -retain:fail,error
582# Ignore tests are not run and completely silent about it
Kelly O'Haird44fe662009-12-11 15:29:22 -0800583JTREG_IGNORE_OPTION = -ignore:quiet
584JTREG_BASIC_OPTIONS += $(JTREG_IGNORE_OPTION)
Kelly O'Hair61c09152009-12-09 09:46:57 -0800585# Multiple by 4 the timeout numbers
Kelly O'Haird44fe662009-12-11 15:29:22 -0800586JTREG_TIMEOUT_OPTION = -timeoutFactor:4
587JTREG_BASIC_OPTIONS += $(JTREG_TIMEOUT_OPTION)
Kelly O'Haird1258922009-11-08 15:11:10 -0800588# Boost the max memory for jtreg to avoid gc thrashing
Kelly O'Haird44fe662009-12-11 15:29:22 -0800589JTREG_MEMORY_OPTION = -J-Xmx512m
590JTREG_BASIC_OPTIONS += $(JTREG_MEMORY_OPTION)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700591
Kelly O'Haird1258922009-11-08 15:11:10 -0800592# Make sure jtreg exists
593$(JTREG): $(JT_HOME)
594
595# Run jtreg
596jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) $(EXCLUDELIST)
597 @$(EXPAND) $(EXCLUDELIST) \
598 | $(CUT) -d' ' -f1 \
599 | $(SED) -e 's@^@Excluding: @'
600 ( \
601 ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)"); \
602 export JT_HOME; \
Kelly O'Haird1258922009-11-08 15:11:10 -0800603 $(shell $(GETMIXEDPATH) "$(JTREG)") \
604 $(JTREG_BASIC_OPTIONS) \
605 -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport \
606 -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork \
607 -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \
608 -exclude:$(shell $(GETMIXEDPATH) "$(EXCLUDELIST)") \
609 $(JTREG_TEST_OPTIONS) \
610 $(TESTDIRS) \
611 ) ; $(BUNDLE_UP_AND_EXIT) \
Kelly O'Hair0ce235a2009-12-01 08:51:16 -0800612 ) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700613
614PHONY_LIST += jtreg_tests
615
616################################################################
617
618# packtest
619
620# Expect JPRT to set JPRT_PACKTEST_HOME.
621PACKTEST_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/packtest
622ifdef JPRT_PACKTEST_HOME
623 PACKTEST_HOME = $(JPRT_PACKTEST_HOME)
624endif
625
626packtest: prep $(PACKTEST_HOME)/ptest $(PRODUCT_HOME)
627 ( $(CD) $(PACKTEST_HOME) && \
628 $(PACKTEST_HOME)/ptest \
629 -t "$(PRODUCT_HOME)" \
630 $(PACKTEST_STRESS_OPTION) \
631 $(EXTRA_PACKTEST_OPTIONS) \
632 -W $(ABS_TEST_OUTPUT_DIR) \
633 $(JAVA_ARGS:%=-J %) \
634 $(JAVA_VM_ARGS:%=-J %) \
635 ) ; $(BUNDLE_UP_AND_EXIT)
636
637packtest_stress: PACKTEST_STRESS_OPTION=-s
638packtest_stress: packtest
639
640PHONY_LIST += packtest packtest_stress
641
642################################################################
643
Mandy Chunge2f72482009-05-26 17:47:57 -0700644# perftest to collect statistics
645
646# Expect JPRT to set JPRT_PACKTEST_HOME.
647PERFTEST_HOME = ${TEST_ROOT}/perf
648ifdef JPRT_PERFTEST_HOME
649 PERFTEST_HOME = $(JPRT_PERFTEST_HOME)
650endif
651
652perftest: ( $(PERFTEST_HOME)/perftest \
653 -t $(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \
654 -w $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)") \
655 -h $(PERFTEST_HOME) \
656 ) ; $(BUNDLE_UP_AND_EXIT)
657
658
659PHONY_LIST += perftest
660
661################################################################
662
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700663# vmsqe tests
664
665# Expect JPRT to set JPRT_VMSQE_HOME.
666VMSQE_HOME = /java/sqe/comp/vm/testbase/sqe/vm/current/build/latest/vm
667ifdef JPRT_VMSQE_HOME
668 VMSQE_HOME = $(JPRT_VMSQE_HOME)
669endif
670
671# Expect JPRT to set JPRT_RUNVMSQE_HOME.
672RUNVMSQE_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/runvmsqe
673ifdef JPRT_RUNVMSQE_HOME
674 RUNVMSQE_HOME = $(JPRT_RUNVMSQE_HOME)
675endif
676
677# Expect JPRT to set JPRT_TONGA3_HOME.
678TONGA3_HOME = /java/sqe//tools/gtee/harness/tonga
679ifdef JPRT_TONGA3_HOME
680 TONGA3_HOME = $(JPRT_TONGA3_HOME)
681endif
682
683RUNVMSQE_BIN = $(RUNVMSQE_HOME)/bin/runvmsqe
684
685vmsqe_tests: prep $(VMSQE_HOME)/vm $(TONGA3_HOME) $(RUNVMSQE_BIN) $(PRODUCT_HOME)
686 $(RM) -r $(ABS_TEST_OUTPUT_DIR)/vmsqe
687 ( $(CD) $(ABS_TEST_OUTPUT_DIR) && \
688 $(RUNVMSQE_BIN) \
689 -jdk "$(PRODUCT_HOME)" \
690 -o "$(ABS_TEST_OUTPUT_DIR)/vmsqe" \
691 -testbase "$(VMSQE_HOME)/vm" \
692 -tonga "$(TONGA3_HOME)" \
693 -tongajdk "$(ALT_BOOTDIR)" \
694 $(JAVA_ARGS) \
695 $(JAVA_VM_ARGS) \
696 $(RUNVMSQE_TEST_OPTION) \
697 $(EXTRA_RUNVMSQE_OPTIONS) \
698 ) ; $(BUNDLE_UP_AND_EXIT)
699
700vmsqe_jdwp: RUNVMSQE_TEST_OPTION=-jdwp
701vmsqe_jdwp: vmsqe_tests
702
703vmsqe_jdi: RUNVMSQE_TEST_OPTION=-jdi
704vmsqe_jdi: vmsqe_tests
705
706vmsqe_jdb: RUNVMSQE_TEST_OPTION=-jdb
707vmsqe_jdb: vmsqe_tests
708
709vmsqe_quick-jdi: RUNVMSQE_TEST_OPTION=-quick-jdi
710vmsqe_quick-jdi: vmsqe_tests
711
712vmsqe_sajdi: RUNVMSQE_TEST_OPTION=-sajdi
713vmsqe_sajdi: vmsqe_tests
714
715vmsqe_jvmti: RUNVMSQE_TEST_OPTION=-jvmti
716vmsqe_jvmti: vmsqe_tests
717
718vmsqe_hprof: RUNVMSQE_TEST_OPTION=-hprof
719vmsqe_hprof: vmsqe_tests
720
721vmsqe_monitoring: RUNVMSQE_TEST_OPTION=-monitoring
722vmsqe_monitoring: vmsqe_tests
723
724PHONY_LIST += vmsqe_jdwp vmsqe_jdi vmsqe_jdb vmsqe_quick-jdi vmsqe_sajdi \
725 vmsqe_jvmti vmsqe_hprof vmsqe_monitoring vmsqe_tests
726
727################################################################
728
729# jck tests
730
731JCK_WORK_DIR = $(ABS_TEST_OUTPUT_DIR)/JCKwork
732JCK_REPORT_DIR = $(ABS_TEST_OUTPUT_DIR)/JCKreport
733JCK_PROPERTIES = $(ABS_TEST_OUTPUT_DIR)/jck.properties
734JCK_CONFIG = $(ABS_TEST_OUTPUT_DIR)/jck.config
735
736JCK_JAVA_EXE = $(PRODUCT_HOME)/bin/java$(EXESUFFIX)
737
738JCK_JAVATEST_JAR = $(JCK_HOME)/lib/javatest.jar
739JCK_JAVATEST = $(ALT_BOOTDIR)/bin/java -jar $(JCK_JAVATEST_JAR)
740
741$(JCK_CONFIG): $(TEST_ROOT)/JCK-$(JCK_BUNDLE_NAME)-$(JCK_RELEASE)-base.jti
742 $(RM) $@
743 $(MKDIR) -p $(@D)
744 $(CP) $< $@
745
746$(JCK_PROPERTIES): $(PRODUCT_HOME) $(JCK_JAVA_EXE)
747 $(RM) $@
748 $(MKDIR) -p $(@D)
749 $(ECHO) "jck.env.compiler.compRefExecute.cmdAsFile=$(JCK_JAVA_EXE)" >> $@
750 $(ECHO) "jck.env.compiler.compRefExecute.systemRoot=$(SYSTEMROOT)" >> $@
751 $(ECHO) "jck.env.compiler.testCompile.testCompileAPImultiJVM.cmdAsFile=$(JCK_JAVA_EXE)" >> $@
752 $(ECHO) "jck.tests.tests=$(JCK_BUNDLE_TESTDIRS)" >> $@
753
754jck_tests: prep $(JCK_HOME) $(JCK_PROPERTIES) $(JCK_CONFIG) $(JCK_JAVATEST_JAR)
755 $(MKDIR) -p $(JCK_WORK_DIR)
756 ( $(JCK_JAVATEST) \
757 -verbose:commands,non-pass \
758 -testSuite $(JCK_HOME) \
759 -workDir $(JCK_WORK_DIR) \
760 -config $(JCK_CONFIG) \
761 -set -file $(JCK_PROPERTIES) \
762 -runtests \
763 -writeReport $(JCK_REPORT_DIR) \
764 ) ; $(BUNDLE_UP_AND_EXIT)
765
766PHONY_LIST += jck_tests
767
768################################################################
769
770# jck6 tests
771
772JCK6_RELEASE = 6b
773JCK6_DEFAULT_HOME = $(SLASH_JAVA)/re/jck/$(JCK6_RELEASE)/archive/fcs/binaries
774
775# Expect JPRT to set JPRT_JCK6COMPILER_HOME.
776JCK6COMPILER_HOME = $(JCK6_DEFAULT_HOME)/JCK-compiler-$(JCK6_RELEASE)
777ifdef JPRT_JCK6COMPILER_HOME
778 JCK6COMPILER_HOME = $(JPRT_JCK6COMPILER_HOME)
779endif
780
781# Expect JPRT to set JPRT_JCK6RUNTIME_HOME.
782JCK6RUNTIME_HOME = $(JCK6_DEFAULT_HOME)/JCK-runtime-$(JCK6_RELEASE)
783ifdef JPRT_JCK6RUNTIME_HOME
784 JCK6RUNTIME_HOME = $(JPRT_JCK6RUNTIME_HOME)
785endif
786
787# Expect JPRT to set JPRT_JCK6DEVTOOLS_HOME.
788JCK6DEVTOOLS_HOME = $(JCK6_DEFAULT_HOME)/JCK-devtools-$(JCK6_RELEASE)
789ifdef JPRT_JCK6DEVTOOLS_HOME
790 JCK6DEVTOOLS_HOME = $(JPRT_JCK6DEVTOOLS_HOME)
791endif
792
793jck6_tests: JCK_HOME=$(JCK6_HOME)
794jck6_tests: JCK_RELEASE=$(JCK6_RELEASE)
795jck6_tests: jck_tests
796
797jck6compiler: JCK6_HOME=$(JCK6COMPILER_HOME)
798jck6compiler: JCK_BUNDLE_NAME=compiler
799jck6compiler: jck6_tests
800
801jck6compiler_lang: JCK_BUNDLE_TESTDIRS=lang
802jck6compiler_lang: jck6compiler
803
804jck6runtime: JCK6_HOME=$(JCK6RUNTIME_HOME)
805jck6runtime: JCK_BUNDLE_NAME=runtime
806jck6runtime: jck6_tests
807
808jck6runtime_lang: JCK_BUNDLE_TESTDIRS=lang
809jck6runtime_lang: jck6runtime
810
811jck6devtools: JCK6_HOME=$(JCK6DEVTOOLS_HOME)
812jck6devtools: JCK_BUNDLE_NAME=devtools
813jck6devtools: jck6_tests
814
815jck6devtools_lang: JCK_BUNDLE_TESTDIRS=lang
816jck6devtools_lang: jck6devtools
817
818PHONY_LIST += jck6compiler jck6runtime jck6devtools jck6_tests \
819 jck6compiler_lang jck6runtime_lang jck6devtools_lang
820
821################################################################
822
823# jck7 tests
824
825JCK7_RELEASE = 7
826JCK7_DEFAULT_HOME = $(SLASH_JAVA)/re/jck/$(JCK7_RELEASE)/archive/fcs/binaries
827
828# Expect JPRT to set JPRT_JCK7COMPILER_HOME.
829JCK7COMPILER_HOME = $(JCK7_DEFAULT_HOME)/JCK-compiler-$(JCK7_RELEASE)
830ifdef JPRT_JCK7COMPILER_HOME
831 JCK7COMPILER_HOME = $(JPRT_JCK7COMPILER_HOME)
832endif
833
834# Expect JPRT to set JPRT_JCK7RUNTIME_HOME.
835JCK7RUNTIME_HOME = $(JCK7_DEFAULT_HOME)/JCK-runtime-$(JCK7_RELEASE)
836ifdef JPRT_JCK7RUNTIME_HOME
837 JCK7RUNTIME_HOME = $(JPRT_JCK7RUNTIME_HOME)
838endif
839
840# Expect JPRT to set JPRT_JCK7DEVTOOLS_HOME.
841JCK7DEVTOOLS_HOME = $(JCK7_DEFAULT_HOME)/JCK-devtools-$(JCK7_RELEASE)
842ifdef JPRT_JCK7DEVTOOLS_HOME
843 JCK7DEVTOOLS_HOME = $(JPRT_JCK7DEVTOOLS_HOME)
844endif
845
846jck7_tests: JCK_HOME=$(JCK7_HOME)
847jck7_tests: JCK_RELEASE=$(JCK7_RELEASE)
848jck7_tests: jck_tests
849
850jck7compiler: JCK7_HOME=$(JCK7COMPILER_HOME)
851jck7compiler: JCK_BUNDLE_NAME=compiler
852jck7compiler: jck7_tests
853
854jck7compiler_lang: JCK_BUNDLE_TESTDIRS=lang
855jck7compiler_lang: jck7compiler
856
857jck7runtime: JCK7_HOME=$(JCK7RUNTIME_HOME)
858jck7runtime: JCK_BUNDLE_NAME=runtime
859jck7runtime: jck7_tests
860
861jck7runtime_lang: JCK_BUNDLE_TESTDIRS=lang
862jck7runtime_lang: jck7runtime
863
864jck7devtools: JCK7_HOME=$(JCK7DEVTOOLS_HOME)
865jck7devtools: JCK_BUNDLE_NAME=devtools
866jck7devtools: jck7_tests
867
868jck7devtools_lang: JCK_BUNDLE_TESTDIRS=lang
869jck7devtools_lang: jck7devtools
870
871PHONY_LIST += jck7compiler jck7runtime jck7devtools jck7_tests \
872 jck7compiler_lang jck7runtime_lang jck7devtools_lang
873
874################################################################
J. Duke319a3b92007-12-01 00:00:00 +0000875
876# Phony targets (e.g. these are not filenames)
Kelly O'Hair53b5f6a2009-03-31 16:12:56 -0700877.PHONY: all clean prep $(PHONY_LIST)
878
879################################################################
J. Duke319a3b92007-12-01 00:00:00 +0000880