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