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