author | dcubed |
Thu, 12 Apr 2012 16:23:24 -0700 | |
changeset 12433 | ac48511f8b50 |
parent 12084 | b367473ef0f1 |
child 14546 | 7e2a1569de76 |
permissions | -rw-r--r-- |
10 | 1 |
# |
5214 | 2 |
# Makefile to run jtreg and other tests |
3 |
# |
|
4 |
||
5 |
# Product builds and langtools builds |
|
6 |
# |
|
7 |
# A full product build (or "control" build) creates a complete JDK image. |
|
8 |
# To test a product build, set TESTJAVA to the path for the image. |
|
10 | 9 |
# |
5214 | 10 |
# A langtools build just builds the langtools components of a JDK. |
11 |
# To test a langtools build, set TESTJAVA to the path for a recent JDK |
|
12 |
# build, and set TESTBOOTCLASSPATH to the compiled langtools classes -- |
|
13 |
# for example build/classes or dist/lib/classes.jar. |
|
14 |
||
15 |
# JPRT |
|
16 |
# JPRT may invoke this Makefile directly, as part of a langtools build, |
|
17 |
# or indirectly, via FOREST/test/Makefile, as part of a control build. |
|
10 | 18 |
|
19 |
# Get OS/ARCH specifics |
|
20 |
OSNAME = $(shell uname -s) |
|
21 |
ifeq ($(OSNAME), SunOS) |
|
10947
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
22 |
SLASH_JAVA = /java |
10 | 23 |
PLATFORM = solaris |
24 |
JT_PLATFORM = solaris |
|
25 |
ARCH = $(shell uname -p) |
|
26 |
ifeq ($(ARCH), i386) |
|
27 |
ARCH=i586 |
|
28 |
endif |
|
29 |
endif |
|
30 |
ifeq ($(OSNAME), Linux) |
|
10947
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
31 |
SLASH_JAVA = /java |
10 | 32 |
PLATFORM = linux |
33 |
JT_PLATFORM = linux |
|
34 |
ARCH = $(shell uname -m) |
|
35 |
ifeq ($(ARCH), i386) |
|
36 |
ARCH=i586 |
|
37 |
endif |
|
38 |
endif |
|
12084
b367473ef0f1
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10947
diff
changeset
|
39 |
ifeq ($(OSNAME), Darwin) |
b367473ef0f1
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10947
diff
changeset
|
40 |
PLATFORM = bsd |
b367473ef0f1
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10947
diff
changeset
|
41 |
JT_PLATFORM = linux |
b367473ef0f1
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10947
diff
changeset
|
42 |
ARCH = $(shell uname -m) |
b367473ef0f1
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10947
diff
changeset
|
43 |
ifeq ($(ARCH), i386) |
b367473ef0f1
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10947
diff
changeset
|
44 |
ARCH=i586 |
b367473ef0f1
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10947
diff
changeset
|
45 |
endif |
b367473ef0f1
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10947
diff
changeset
|
46 |
endif |
10 | 47 |
ifeq ($(OSNAME), Windows_NT) |
10947
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
48 |
# MKS |
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
49 |
PLATFORM=windows |
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
50 |
endif |
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
51 |
ifeq ($(PLATFORM),) |
10 | 52 |
PLATFORM = windows |
10947
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
53 |
CYGPATH = | cygpath -m -s -f - |
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
54 |
endif |
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
55 |
|
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
56 |
ifeq ($(PLATFORM), windows) |
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
57 |
SLASH_JAVA = J: |
10 | 58 |
JT_PLATFORM = win32 |
59 |
ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),ia64) |
|
60 |
ARCH=ia64 |
|
61 |
else |
|
62 |
ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),AMD64) |
|
63 |
ARCH=x64 |
|
64 |
else |
|
65 |
ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T) |
|
66 |
ARCH=x64 |
|
67 |
else |
|
68 |
ARCH=i586 |
|
69 |
endif |
|
70 |
endif |
|
71 |
endif |
|
5652
89482b760ef7
6954901: langtools/test/Makefile should check for bin/javac(.exe) instead of lib/tools.jar
jjg
parents:
5647
diff
changeset
|
72 |
EXE_SUFFIX=.exe |
10 | 73 |
endif |
74 |
||
75 |
# Root of this test area (important to use full paths in some places) |
|
10947
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
76 |
TEST_ROOT := $(shell pwd $(CYGPATH) ) |
10 | 77 |
|
5214 | 78 |
# Default bundle of all test results (passed or not) (JPRT only) |
79 |
ifdef JPRT_JOB_ID |
|
80 |
JPRT_CLEAN = clean |
|
81 |
JPRT_ARCHIVE_BUNDLE = $(TEST_ROOT)/JPRT_ARCHIVE_BUNDLE.zip |
|
82 |
endif |
|
10 | 83 |
|
84 |
ifeq ($(PLATFORM), windows) |
|
85 |
SLASH_JAVA = J: |
|
86 |
else |
|
87 |
SLASH_JAVA = /java |
|
88 |
endif |
|
89 |
||
90 |
# Default JTREG to run |
|
3779 | 91 |
ifdef JPRT_JTREG_HOME |
92 |
JTREG_HOME = $(JPRT_JTREG_HOME) |
|
93 |
else |
|
10947
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
94 |
JTREG_HOME = $(SLASH_JAVA)/re/jtreg/4.1/promoted/latest/binaries/jtreg |
3779 | 95 |
endif |
96 |
JTREG = $(JTREG_HOME)/$(JT_PLATFORM)/bin/jtreg |
|
5214 | 97 |
JTDIFF = $(JTREG_HOME)/$(JT_PLATFORM)/bin/jtdiff |
10 | 98 |
|
5214 | 99 |
# Default JCK to run |
100 |
ifdef JPRT_JCK_HOME |
|
101 |
JCK_HOME = $(JPRT_JCK_HOME) |
|
102 |
else |
|
10947
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
103 |
JCK_HOME = $(SLASH_JAVA)/re/jck/8/promoted/latest/binaries |
5214 | 104 |
endif |
105 |
||
106 |
# Default JDK for JTREG and JCK |
|
107 |
# |
|
108 |
# JT_JAVA is the version of java used to run jtreg/JCK. Since it is now |
|
109 |
# standard to execute tests in sameVM mode, it should normally be set the |
|
110 |
# same as TESTJAVA (although not necessarily so.) |
|
111 |
# |
|
10 | 112 |
ifdef JPRT_JAVA_HOME |
113 |
JT_JAVA = $(JPRT_JAVA_HOME) |
|
114 |
else |
|
10947
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
115 |
JT_JAVA = $(SLASH_JAVA)/re/jdk/1.7.0/archive/fcs/binaries/$(PLATFORM)-$(ARCH) |
10 | 116 |
endif |
117 |
||
118 |
# Default JDK to test |
|
3779 | 119 |
ifdef JPRT_IMPORT_PRODUCT_HOME |
120 |
TESTJAVA = $(JPRT_IMPORT_PRODUCT_HOME) |
|
121 |
else |
|
122 |
TESTJAVA = $(SLASH_JAVA)/re/jdk/1.7.0/promoted/latest/binaries/$(PLATFORM)-$(ARCH) |
|
123 |
endif |
|
124 |
||
5214 | 125 |
# PRODUCT_HOME is a JPRT variable pointing to a directory containing the output from |
126 |
# make/Makefile |
|
127 |
# For langtools, this is a directory containing build and dist |
|
5652
89482b760ef7
6954901: langtools/test/Makefile should check for bin/javac(.exe) instead of lib/tools.jar
jjg
parents:
5647
diff
changeset
|
128 |
# For a control build, this is build/$(PRODUCT)-$(ARCH)/XYZ-image |
89482b760ef7
6954901: langtools/test/Makefile should check for bin/javac(.exe) instead of lib/tools.jar
jjg
parents:
5647
diff
changeset
|
129 |
# (i.e, j2sdk-image or jdk-module-image) |
5214 | 130 |
ifdef PRODUCT_HOME |
131 |
ifeq ($(shell [ -r $(PRODUCT_HOME)/dist/lib/classes.jar ]; echo $$?),0) |
|
132 |
TESTBOOTCLASSPATH = $(PRODUCT_HOME)/dist/lib/classes.jar |
|
133 |
endif |
|
5652
89482b760ef7
6954901: langtools/test/Makefile should check for bin/javac(.exe) instead of lib/tools.jar
jjg
parents:
5647
diff
changeset
|
134 |
ifeq ($(shell [ -r $(PRODUCT_HOME)/bin/javac$(EXE_SUFFIX) ]; echo $$?),0) |
5214 | 135 |
TESTJAVA = $(PRODUCT_HOME) |
136 |
endif |
|
137 |
endif |
|
138 |
||
139 |
ifdef TESTBOOTCLASSPATH |
|
140 |
JTREG_OPTIONS += -Xbootclasspath/p:$(TESTBOOTCLASSPATH) |
|
141 |
### In the following, -refvmoptions is an undocumented option |
|
142 |
### The following does not work JCK 7 b30 2/6/2010. Awaiting b31. |
|
143 |
JCK_OPTIONS += \ |
|
144 |
-vmoptions:-Xbootclasspath/p:$(TESTBOOTCLASSPATH) \ |
|
145 |
-refvmoptions:-Xbootclasspath/p:$(TESTBOOTCLASSPATH) |
|
146 |
endif |
|
147 |
||
148 |
# Concurrency is the number of tests that can execute at once. |
|
149 |
# Supported for JCK, not supported for jtreg. |
|
150 |
# On an otherwise empty machine, suggest setting to (#cpus + 2) |
|
151 |
# If unset, the default is (#cpus) |
|
152 |
### RFE: determine and use #cpus |
|
153 |
ifdef JCK_CONCURRENCY |
|
154 |
JCK_OPTIONS += -concurrency:$(JCK_CONCURRENCY) |
|
155 |
endif |
|
156 |
||
157 |
# JCK is executed using "Multi-JVM Group Mode", which is a hybrid |
|
158 |
# of otherVM and sameVM modes. New JVMs are created and reused for |
|
159 |
# a number of tests, then eventually discarded and a new one started. |
|
160 |
# This amortizes the JVM startup time. The "group size" defines |
|
161 |
# how many tests are run in a JVM before it is replaced. |
|
162 |
# If unset, the default is 100. |
|
163 |
JCK_GROUP_SIZE = 1000 |
|
164 |
ifdef JCK_GROUP_SIZE |
|
165 |
JCK_COMPILER_OPTIONS += \ |
|
166 |
-jtoptions:-Ejck.env.compiler.testCompile.groupMode.groupSize=$(JCK_GROUP_SIZE) \ |
|
167 |
-jtoptions:-Ejck.env.compiler.compRefExecute.groupMode.groupSize=$(JCK_GROUP_SIZE) |
|
168 |
### The following is not supported. Awaiting RFE 6924287 |
|
169 |
### 6924287: Jck4Jdk: Allow to configure test group size for group mode via simple command line option |
|
170 |
### JCK_RUNTIME_OPTIONS += \ |
|
171 |
### -jtoptions:-Ejck.env.runtime.testCompile.groupMode.groupSize=$(JCK_GROUP_SIZE) |
|
172 |
endif |
|
173 |
||
5647
9a0b03523aa9
6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents:
5214
diff
changeset
|
174 |
# Timeouts -- by default, increase test timeouts when running on JPRT |
9a0b03523aa9
6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents:
5214
diff
changeset
|
175 |
ifdef JPRT_JOB_ID |
9a0b03523aa9
6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents:
5214
diff
changeset
|
176 |
ifndef JTREG_TIMEOUT_FACTOR |
9a0b03523aa9
6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents:
5214
diff
changeset
|
177 |
JTREG_TIMEOUT_FACTOR = 3 |
9a0b03523aa9
6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents:
5214
diff
changeset
|
178 |
endif |
9a0b03523aa9
6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents:
5214
diff
changeset
|
179 |
endif |
9a0b03523aa9
6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents:
5214
diff
changeset
|
180 |
ifdef JTREG_TIMEOUT_FACTOR |
9a0b03523aa9
6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents:
5214
diff
changeset
|
181 |
JTREG_OPTIONS += -timeoutFactor:$(JTREG_TIMEOUT_FACTOR) |
9a0b03523aa9
6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents:
5214
diff
changeset
|
182 |
endif |
9a0b03523aa9
6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents:
5214
diff
changeset
|
183 |
|
5214 | 184 |
# Assertions: some tests show failures when assertions are enabled. |
185 |
# Since javac is typically loaded via the bootclassloader (either via TESTJAVA |
|
186 |
# or TESTBOOTCLASSPATH), you may need -esa to enable assertions in javac. |
|
187 |
JTREG_OPTIONS += $(ASSERTION_OPTIONS) |
|
188 |
JCK_OPTIONS += $(ASSERTION_OPTIONS:%=-vmoptions:%) |
|
189 |
||
190 |
# Include shared options |
|
191 |
JCK_COMPILER_OPTIONS += $(JCK_OPTIONS) |
|
192 |
JCK_RUNTIME_OPTIONS += $(JCK_OPTIONS) |
|
193 |
||
194 |
# Exit codes: |
|
195 |
# jtreg, jck: 0: OK, 1: tests failed, 2: tests error; 3+: SERIOUS |
|
196 |
FATAL_JTREG_EXIT = 3 |
|
197 |
FATAL_JCK_EXIT = 3 |
|
198 |
# jtdiff: 0: OK, 1: differences found; 2+: SERIOUS |
|
199 |
FATAL_JTDIFF_EXIT = 2 |
|
200 |
# |
|
201 |
# Exit -- used for final "normal" exit from "make". Redefine to "true" to avoid |
|
202 |
# having make exit with non-zero return code. |
|
203 |
EXIT = exit |
|
204 |
# Function to exit shell if exit code of preceding command is greater than or equal |
|
205 |
# to a given level. Redefine function or preceding FATAL_*_EXIT codes as needed. |
|
206 |
EXIT_IF_FATAL = status=$$?; if [ $$status -ge $(1) ]; then exit $$status ; fi |
|
10 | 207 |
|
208 |
# The test directories to run |
|
209 |
DEFAULT_TESTDIRS = . |
|
210 |
TESTDIRS = $(DEFAULT_TESTDIRS) |
|
211 |
||
212 |
# Root of all test results |
|
5214 | 213 |
TEST_OUTPUT_DIR = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools |
214 |
ABS_TEST_OUTPUT_DIR := \ |
|
215 |
$(shell mkdir -p $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools; \ |
|
216 |
cd $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools; \ |
|
10947
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
217 |
pwd $(CYGPATH)) |
5214 | 218 |
# Subdirectories for different test runs |
219 |
JTREG_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jtreg |
|
220 |
JCK_COMPILER_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-compiler |
|
221 |
JCK_RUNTIME_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-runtime-Xcompile |
|
10 | 222 |
|
5214 | 223 |
# Default make rule -- warning, may take a while |
224 |
all: $(JPRT_CLEAN) jtreg-tests jck-compiler-tests jck-runtime-tests $(JPRT_ARCHIVE_BUNDLE) all-summary |
|
225 |
@echo "Testing completed successfully" |
|
226 |
||
227 |
jtreg apt javac javadoc javah javap: $(JPRT_CLEAN) jtreg-tests $(JPRT_ARCHIVE_BUNDLE) jtreg-summary |
|
228 |
@echo "Testing completed successfully" |
|
229 |
||
230 |
jck-compiler: $(JPRT_CLEAN) jck-compiler-tests $(JPRT_ARCHIVE_BUNDLE) jck-compiler-summary |
|
231 |
@echo "Testing completed successfully" |
|
232 |
||
233 |
jck-runtime: $(JPRT_CLEAN) jck-runtime-tests $(JPRT_ARCHIVE_BUNDLE) jck-runtime-summary |
|
10 | 234 |
@echo "Testing completed successfully" |
235 |
||
236 |
# for use with JPRT -testrule |
|
5214 | 237 |
all: JTREG_TESTDIRS = . |
238 |
jtreg: JTREG_TESTDIRS = . |
|
239 |
apt: JTREG_TESTDIRS = tools/apt |
|
240 |
javac: JTREG_TESTDIRS = tools/javac |
|
241 |
javadoc: JTREG_TESTDIRS = tools/javadoc com/sun/javadoc |
|
242 |
javah: JTREG_TESTDIRS = tools/javah |
|
243 |
javap: JTREG_TESTDIRS = tools/javap |
|
244 |
||
245 |
# Run jtreg tests |
|
246 |
# |
|
247 |
# JTREG_HOME |
|
248 |
# Installed location of jtreg |
|
249 |
# JT_JAVA |
|
250 |
# Version of java used to run jtreg. Should normally be the same as TESTJAVA |
|
251 |
# TESTJAVA |
|
252 |
# Version of java to be tested. |
|
253 |
# JTREG_OPTIONS |
|
254 |
# Additional options for jtreg |
|
255 |
# JTREG_TESTDIRS |
|
256 |
# Directories of tests to be run |
|
257 |
# JTREG_OUTPUT_DIR |
|
258 |
# Where to write the results |
|
259 |
# JTREG_REFERENCE |
|
260 |
# (Optional) reference results (e.g. work, report or summary.txt) |
|
261 |
# |
|
12084
b367473ef0f1
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10947
diff
changeset
|
262 |
jtreg_tests: jtreg-tests |
5214 | 263 |
jtreg-tests: check-jtreg FRC |
264 |
@rm -f -r $(JTREG_OUTPUT_DIR)/JTwork $(JTREG_OUTPUT_DIR)/JTreport \ |
|
265 |
$(JTREG_OUTPUT_DIR)/diff.html $(JTREG_OUTPUT_DIR)/status.txt |
|
266 |
@mkdir -p $(JTREG_OUTPUT_DIR) |
|
267 |
JT_JAVA=$(JT_JAVA) $(JTREG) \ |
|
268 |
-J-Xmx512m \ |
|
269 |
-a -samevm -ignore:quiet -v:fail,error,nopass \ |
|
270 |
-r:$(JTREG_OUTPUT_DIR)/JTreport \ |
|
271 |
-w:$(JTREG_OUTPUT_DIR)/JTwork \ |
|
272 |
-jdk:$(TESTJAVA) \ |
|
273 |
$(JAVA_ARGS:%=-vmoption:%) \ |
|
274 |
$(JTREG_OPTIONS) \ |
|
275 |
$(JTREG_TESTDIRS) \ |
|
276 |
|| ( $(call EXIT_IF_FATAL,$(FATAL_JTREG_EXIT)) ; \ |
|
277 |
echo $$status > $(JTREG_OUTPUT_DIR)/status.txt \ |
|
278 |
) |
|
279 |
ifdef JTREG_REFERENCE |
|
280 |
JT_JAVA=$(JT_JAVA) $(JTDIFF) -o $(JTREG_OUTPUT_DIR)/diff.html \ |
|
281 |
$(JTREG_REFERENCE) $(JTREG_OUTPUT_DIR)/JTreport \ |
|
282 |
|| ( $(call EXIT_IF_FATAL,$(FATAL_JTDIFF_EXIT)) ) |
|
283 |
endif |
|
284 |
||
285 |
jtreg-summary: FRC |
|
286 |
if [ -r $(JTREG_OUTPUT_DIR)/status.txt ]; then \ |
|
287 |
echo ; echo "Summary of jtreg test failures" ; \ |
|
288 |
cat $(JTREG_OUTPUT_DIR)/JTreport/text/summary.txt | \ |
|
289 |
grep -v 'Not run' | grep -v 'Passed' ; \ |
|
290 |
echo ; \ |
|
291 |
$(EXIT) `cat $(JTREG_OUTPUT_DIR)/status.txt` ; \ |
|
292 |
fi |
|
10 | 293 |
|
294 |
# Check to make sure these directories exist |
|
10947
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
295 |
check-jtreg: $(PRODUCT_HOME) $(JTREG) |
5214 | 296 |
|
297 |
||
298 |
# Run JCK-compiler tests |
|
299 |
# |
|
300 |
# JCK_HOME |
|
301 |
# Installed location of JCK: should include JCK-compiler, and JCK-extras |
|
10947
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
302 |
# Default is JCK 8. |
5214 | 303 |
# JT_JAVA |
304 |
# Version of java used to run JCK. Should normally be the same as TESTJAVA |
|
10947
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
305 |
# Default is JDK 7 |
5214 | 306 |
# TESTJAVA |
307 |
# Version of java to be tested. |
|
308 |
# JCK_COMPILER_OPTIONS |
|
309 |
# Additional options for JCK-compiler |
|
310 |
# JCK_COMPILER_TESTDIRS |
|
311 |
# Directories of tests to be run |
|
312 |
# JCK_COMPILER_OUTPUT_DIR |
|
313 |
# Where to write the results |
|
314 |
# JCK_COMPILER_REFERENCE |
|
315 |
# (Optional) reference results (e.g. work, report or summary.txt) |
|
316 |
# |
|
317 |
jck-compiler-tests: check-jck FRC |
|
318 |
@rm -f -r $(JCK_COMPILER_OUTPUT_DIR)/work $(JCK_COMPILER_OUTPUT_DIR)/report \ |
|
319 |
$(JCK_COMPILER_OUTPUT_DIR)/diff.html $(JCK_COMPILER_OUTPUT_DIR)/status.txt |
|
320 |
@mkdir -p $(JCK_COMPILER_OUTPUT_DIR) |
|
321 |
$(JT_JAVA)/bin/java -XX:MaxPermSize=256m -Xmx512m \ |
|
10947
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
322 |
-jar $(JCK_HOME)/JCK-compiler-8/lib/jtjck.jar \ |
5214 | 323 |
-v:non-pass \ |
324 |
-r:$(JCK_COMPILER_OUTPUT_DIR)/report \ |
|
325 |
-w:$(JCK_COMPILER_OUTPUT_DIR)/work \ |
|
326 |
-jdk:$(TESTJAVA) \ |
|
327 |
$(JCK_COMPILER_OPTIONS) \ |
|
328 |
$(JCK_COMPILER_TESTDIRS) \ |
|
329 |
|| ( $(call EXIT_IF_FATAL,$(FATAL_JCK_EXIT)) ; \ |
|
330 |
echo $$status > $(JCK_COMPILER_OUTPUT_DIR)/status.txt \ |
|
331 |
) |
|
332 |
ifdef JCK_COMPILER_REFERENCE |
|
333 |
JT_JAVA=$(JT_JAVA) $(JTDIFF) -o $(JCK_COMPILER_OUTPUT_DIR)/diff.html \ |
|
334 |
$(JCK_COMPILER_REFERENCE) $(JCK_COMPILER_OUTPUT_DIR)/report \ |
|
335 |
|| ( $(call EXIT_IF_FATAL,$(FATAL_JTDIFF_EXIT)) ) |
|
336 |
endif |
|
337 |
||
338 |
jck-compiler-summary: FRC |
|
339 |
if [ -r $(JCK_COMPILER_OUTPUT_DIR)/status.txt ]; then \ |
|
340 |
echo ; echo "Summary of JCK-compiler test failures" ; \ |
|
341 |
cat $(JCK_COMPILER_OUTPUT_DIR)/report/text/summary.txt | \ |
|
342 |
grep -v 'Not run' | grep -v 'Passed' ; \ |
|
343 |
echo ; \ |
|
344 |
$(EXIT) `cat $(JCK_COMPILER_OUTPUT_DIR)/status.txt` ; \ |
|
345 |
fi |
|
10 | 346 |
|
5214 | 347 |
# Run JCK-runtime tests in -Xcompile mode |
348 |
# This is a special mode to test javac by compiling the tests in the JCK-runtime test suite |
|
349 |
# Normal JCK-runtime invocation belongs in the jdk/ repository. |
|
350 |
# |
|
351 |
# JCK_HOME |
|
352 |
# Installed location of JCK: should include JCK-compiler, JCK-runtime and JCK-extras |
|
353 |
# JT_JAVA |
|
354 |
# Version of java used to run JCK. Should normally be the same as TESTJAVA |
|
355 |
# TESTJAVA |
|
356 |
# Version of java to be tested. |
|
357 |
# JCK_RUNTIME_OPTIONS |
|
358 |
# Additional options for JCK-runtime |
|
359 |
# JCK_RUNTIME_TESTDIRS |
|
360 |
# Directories of tests to be run |
|
361 |
# JCK_RUNTIME_OUTPUT_DIR |
|
362 |
# Where to write the results |
|
363 |
# JCK_RUNTIME_REFERENCE |
|
364 |
# (Optional) reference results (e.g. work, report or summary.txt) |
|
365 |
# |
|
366 |
jck-runtime-tests: check-jck FRC |
|
367 |
@rm -f -r $(JCK_RUNTIME_OUTPUT_DIR)/work $(JCK_RUNTIME_OUTPUT_DIR)/report \ |
|
368 |
$(JCK_RUNTIME_OUTPUT_DIR)/diff.html $(JCK_RUNTIME_OUTPUT_DIR)/status.txt |
|
369 |
@mkdir -p $(JCK_RUNTIME_OUTPUT_DIR) |
|
370 |
$(JT_JAVA)/bin/java -XX:MaxPermSize=256m -Xmx512m \ |
|
10947
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
371 |
-jar $(JCK_HOME)/JCK-runtime-8/lib/jtjck.jar \ |
5214 | 372 |
-v:non-pass \ |
373 |
-r:$(JCK_RUNTIME_OUTPUT_DIR)/report \ |
|
374 |
-w:$(JCK_RUNTIME_OUTPUT_DIR)/work \ |
|
375 |
-jdk:$(TESTJAVA) \ |
|
376 |
-Xcompile \ |
|
377 |
$(JCK_RUNTIME_OPTIONS) \ |
|
378 |
$(JCK_RUNTIME_TESTDIRS) \ |
|
379 |
|| ( $(call EXIT_IF_FATAL,$(FATAL_JCK_EXIT)) ; \ |
|
380 |
echo $$status > $(JCK_RUNTIME_OUTPUT_DIR)/status.txt \ |
|
381 |
) |
|
382 |
ifdef JCK_RUNTIME_REFERENCE |
|
383 |
JT_JAVA=$(JT_JAVA) $(JTDIFF) -o $(JCK_RUNTIME_OUTPUT_DIR)/diff.html \ |
|
384 |
$(JCK_RUNTIME_REFERENCE) $(JCK_RUNTIME_OUTPUT_DIR)/report \ |
|
385 |
|| ( $(call EXIT_IF_FATAL,$(FATAL_JTDIFF_EXIT)) ) |
|
386 |
endif |
|
387 |
||
388 |
jck-runtime-summary: FRC |
|
389 |
if [ -r $(JCK_RUNTIME_OUTPUT_DIR)/status.txt ]; then \ |
|
390 |
echo ; echo "Summary of JCK-runtime test failures" ; \ |
|
391 |
cat $(JCK_RUNTIME_OUTPUT_DIR)/report/text/summary.txt | \ |
|
392 |
grep -v 'Not run' | grep -v 'Passed' ; \ |
|
393 |
echo ; \ |
|
394 |
$(EXIT) `cat $(JCK_RUNTIME_OUTPUT_DIR)/status.txt` ; \ |
|
395 |
fi |
|
396 |
||
397 |
# Check to make sure these directories exist |
|
10947
47788da3eb3f
7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents:
5652
diff
changeset
|
398 |
check-jck: $(JCK_HOME) $(PRODUCT_HOME) |
5214 | 399 |
|
400 |
all-summary: FRC |
|
401 |
if [ -n "`find $(TEST_OUTPUT_DIR) -name status.txt`" ]; then |
|
402 |
echo ; echo "Summary of test failures" ; \ |
|
403 |
cat `find $(TEST_OUTPUT_DIR) -name summary.txt` | \ |
|
404 |
grep -v 'Not run' | grep -v 'Passed' ; \ |
|
405 |
echo ; \ |
|
406 |
$(EXIT) 1 |
|
407 |
fi |
|
10 | 408 |
|
409 |
# Bundle up the results |
|
410 |
$(JPRT_ARCHIVE_BUNDLE): FRC |
|
411 |
@rm -f $@ |
|
412 |
@mkdir -p $(@D) |
|
413 |
( cd $(TEST_OUTPUT_DIR) && zip -q -r $@ . ) |
|
414 |
||
415 |
# Cleanup |
|
416 |
clean: |
|
417 |
rm -f $(JPRT_ARCHIVE_BUNDLE) |
|
418 |
||
419 |
# Used to force a target rules to run |
|
420 |
FRC: |
|
421 |
||
422 |
# Phony targets (e.g. these are not filenames) |
|
5214 | 423 |
.PHONY: all clean \ |
424 |
jtreg javac javadoc javah javap jtreg-tests jtreg-summary check-jtreg \ |
|
425 |
jck-compiler jck-compiler-tests jck-compiler-summary \ |
|
426 |
jck-runtime jck-runtime-tests jck-runtime-summary check-jck |
|
10 | 427 |
|
5214 | 428 |
# No use of suffix rules |
429 |
.SUFFIXES: |
|
430 |