author | alanb |
Mon, 03 Nov 2014 15:33:11 +0000 | |
changeset 27339 | 2cf6bc8c2d2c |
parent 26922 | 8134a6d3fc02 |
child 27695 | c6e0ac3339ac |
child 28021 | e19f567fcac2 |
permissions | -rw-r--r-- |
1 | 1 |
# |
22234
da823d78ad65
8029233: Update copyright year to match last edit in jdk8 hotspot repository for 2013
mikael
parents:
19318
diff
changeset
|
2 |
# Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. |
1 | 3 |
# 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. |
|
8 |
# |
|
9 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
# accompanied this code). |
|
14 |
# |
|
15 |
# You should have received a copy of the GNU General Public License version |
|
16 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
# |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
2868
diff
changeset
|
19 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
2868
diff
changeset
|
20 |
# or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
2868
diff
changeset
|
21 |
# questions. |
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
22 |
# |
1 | 23 |
# |
24 |
||
25 |
# |
|
25628 | 26 |
# Makefile to run various hotspot tests |
1 | 27 |
# |
28 |
||
12225 | 29 |
GETMIXEDPATH=echo |
30 |
||
25628 | 31 |
# Utilities used |
32 |
AWK = awk |
|
33 |
CAT = cat |
|
34 |
CD = cd |
|
35 |
CHMOD = chmod |
|
36 |
CP = cp |
|
37 |
CUT = cut |
|
38 |
DIRNAME = dirname |
|
39 |
ECHO = echo |
|
40 |
EGREP = egrep |
|
41 |
EXPAND = expand |
|
42 |
FIND = find |
|
43 |
MKDIR = mkdir |
|
44 |
PWD = pwd |
|
45 |
SED = sed |
|
46 |
SORT = sort |
|
47 |
TEE = tee |
|
48 |
UNAME = uname |
|
49 |
UNIQ = uniq |
|
50 |
WC = wc |
|
51 |
ZIP = zip |
|
52 |
||
53 |
# Get OS name from uname (Cygwin inexplicably adds _NT-5.1) |
|
54 |
UNAME_S := $(shell $(UNAME) -s | $(CUT) -f1 -d_) |
|
55 |
ifeq ($(UNAME_S), SunOS) |
|
1 | 56 |
PLATFORM = solaris |
2024
859d11cea3f8
6799452: HotSpot tests Makefile should take care of ALT_SLASH_JAVA
twisti
parents:
1132
diff
changeset
|
57 |
SLASH_JAVA = /java |
1 | 58 |
ARCH = $(shell uname -p) |
59 |
ifeq ($(ARCH), i386) |
|
60 |
ARCH=i586 |
|
61 |
endif |
|
62 |
endif |
|
25628 | 63 |
ifeq ($(UNAME_S), Linux) |
1 | 64 |
PLATFORM = linux |
2024
859d11cea3f8
6799452: HotSpot tests Makefile should take care of ALT_SLASH_JAVA
twisti
parents:
1132
diff
changeset
|
65 |
SLASH_JAVA = /java |
1 | 66 |
ARCH = $(shell uname -m) |
67 |
ifeq ($(ARCH), i386) |
|
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
68 |
ARCH = i586 |
1 | 69 |
endif |
70 |
endif |
|
25628 | 71 |
ifeq ($(UNAME_S), Darwin) |
10565 | 72 |
PLATFORM = bsd |
73 |
SLASH_JAVA = /java |
|
74 |
ARCH = $(shell uname -m) |
|
75 |
ifeq ($(ARCH), i386) |
|
76 |
ARCH = i586 |
|
77 |
endif |
|
78 |
endif |
|
25628 | 79 |
ifeq ($(findstring BSD,$(UNAME_S)), BSD) |
10565 | 80 |
PLATFORM = bsd |
81 |
SLASH_JAVA = /java |
|
82 |
ARCH = $(shell uname -m) |
|
83 |
ifeq ($(ARCH), i386) |
|
84 |
ARCH = i586 |
|
85 |
endif |
|
86 |
endif |
|
12225 | 87 |
ifeq ($(PLATFORM),) |
25628 | 88 |
# detect whether we're running in MKS or cygwin |
89 |
ifeq ($(UNAME_S), Windows_NT) # MKS |
|
12225 | 90 |
GETMIXEDPATH=dosname -s |
91 |
endif |
|
25628 | 92 |
ifeq ($(findstring CYGWIN,$(UNAME_S)), CYGWIN) |
93 |
GETMIXEDPATH=cygpath -m |
|
12225 | 94 |
endif |
1 | 95 |
PLATFORM = windows |
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
96 |
SLASH_JAVA = J: |
1 | 97 |
ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),ia64) |
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
98 |
ARCH = ia64 |
1 | 99 |
else |
100 |
ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),AMD64) |
|
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
101 |
ARCH = x64 |
1 | 102 |
else |
103 |
ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T) |
|
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
104 |
ARCH = x64 |
1 | 105 |
else |
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
106 |
ARCH = i586 |
1 | 107 |
endif |
108 |
endif |
|
109 |
endif |
|
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
110 |
EXESUFFIX = .exe |
1 | 111 |
endif |
112 |
||
2024
859d11cea3f8
6799452: HotSpot tests Makefile should take care of ALT_SLASH_JAVA
twisti
parents:
1132
diff
changeset
|
113 |
ifdef ALT_SLASH_JAVA |
859d11cea3f8
6799452: HotSpot tests Makefile should take care of ALT_SLASH_JAVA
twisti
parents:
1132
diff
changeset
|
114 |
SLASH_JAVA = $(ALT_SLASH_JAVA) |
859d11cea3f8
6799452: HotSpot tests Makefile should take care of ALT_SLASH_JAVA
twisti
parents:
1132
diff
changeset
|
115 |
endif |
859d11cea3f8
6799452: HotSpot tests Makefile should take care of ALT_SLASH_JAVA
twisti
parents:
1132
diff
changeset
|
116 |
|
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
117 |
# Root of this test area (important to use full paths in some places) |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
118 |
TEST_ROOT := $(shell pwd) |
1 | 119 |
|
120 |
# Root of all test results |
|
7102
a20be5bfcbee
6991596: JSR 292 unimplemented adapter_opt_i2i and adapter_opt_l2i on SPARC
twisti
parents:
5547
diff
changeset
|
121 |
ifdef ALT_OUTPUTDIR |
a20be5bfcbee
6991596: JSR 292 unimplemented adapter_opt_i2i and adapter_opt_l2i on SPARC
twisti
parents:
5547
diff
changeset
|
122 |
ABS_BUILD_ROOT = $(ALT_OUTPUTDIR)/$(PLATFORM)-$(ARCH) |
a20be5bfcbee
6991596: JSR 292 unimplemented adapter_opt_i2i and adapter_opt_l2i on SPARC
twisti
parents:
5547
diff
changeset
|
123 |
else |
a20be5bfcbee
6991596: JSR 292 unimplemented adapter_opt_i2i and adapter_opt_l2i on SPARC
twisti
parents:
5547
diff
changeset
|
124 |
ABS_BUILD_ROOT = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH) |
a20be5bfcbee
6991596: JSR 292 unimplemented adapter_opt_i2i and adapter_opt_l2i on SPARC
twisti
parents:
5547
diff
changeset
|
125 |
endif |
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
126 |
ABS_TEST_OUTPUT_DIR = $(ABS_BUILD_ROOT)/testoutput |
1 | 127 |
|
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
128 |
# Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test) |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
129 |
ifndef PRODUCT_HOME |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
130 |
# Try to use j2sdk-image if it exists |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
131 |
ABS_JDK_IMAGE = $(ABS_BUILD_ROOT)/j2sdk-image |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
132 |
PRODUCT_HOME := \ |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
133 |
$(shell \ |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
134 |
if [ -d $(ABS_JDK_IMAGE) ] ; then \ |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
135 |
$(ECHO) "$(ABS_JDK_IMAGE)"; \ |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
136 |
else \ |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
137 |
$(ECHO) "$(ABS_BUILD_ROOT)" ; \ |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
138 |
fi) |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
139 |
endif |
1 | 140 |
|
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
141 |
# Expect JPRT to set JAVA_ARGS (e.g. -server etc.) |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
142 |
JAVA_OPTIONS = |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
143 |
ifdef JAVA_ARGS |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
144 |
JAVA_OPTIONS = $(JAVA_ARGS) |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
145 |
endif |
1 | 146 |
|
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
147 |
# Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results) |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
148 |
ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
149 |
ifdef JPRT_ARCHIVE_BUNDLE |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
150 |
ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE) |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
151 |
endif |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
152 |
|
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
153 |
# How to create the test bundle (pass or fail, we want to create this) |
25628 | 154 |
# Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed. |
155 |
ZIP_UP_RESULTS = ( $(MKDIR) -p `$(DIRNAME) $(ARCHIVE_BUNDLE)` \ |
|
156 |
&& $(CD) $(ABS_TEST_OUTPUT_DIR) \ |
|
157 |
&& $(CHMOD) -R a+r . \ |
|
158 |
&& $(ZIP) -q -r $(ARCHIVE_BUNDLE) . ) |
|
159 |
||
160 |
# important results files |
|
161 |
SUMMARY_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTreport/text/summary.txt") |
|
162 |
STATS_TXT_NAME = Stats.txt |
|
163 |
STATS_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/$(STATS_TXT_NAME)") |
|
164 |
RUNLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/runlist.txt") |
|
165 |
PASSLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/passlist.txt") |
|
166 |
FAILLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/faillist.txt") |
|
167 |
EXITCODE = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/exitcode.txt") |
|
168 |
||
169 |
TESTEXIT = \ |
|
170 |
if [ ! -s $(EXITCODE) ] ; then \ |
|
171 |
$(ECHO) "ERROR: EXITCODE file not filled in."; \ |
|
172 |
$(ECHO) "1" > $(EXITCODE); \ |
|
173 |
fi ; \ |
|
174 |
testExitCode=`$(CAT) $(EXITCODE)`; \ |
|
175 |
$(ECHO) "EXIT CODE: $${testExitCode}"; \ |
|
176 |
exit $${testExitCode} |
|
177 |
||
178 |
BUNDLE_UP_AND_EXIT = \ |
|
179 |
( \ |
|
180 |
jtregExitCode=$$? && \ |
|
181 |
_summary="$(SUMMARY_TXT)"; \ |
|
182 |
$(RM) -f $(STATS_TXT) $(RUNLIST) $(PASSLIST) $(FAILLIST) $(EXITCODE); \ |
|
183 |
$(ECHO) "$${jtregExitCode}" > $(EXITCODE); \ |
|
184 |
if [ -r "$${_summary}" ] ; then \ |
|
185 |
$(ECHO) "Summary: $(UNIQUE_DIR)" > $(STATS_TXT); \ |
|
186 |
$(EXPAND) $${_summary} | $(EGREP) -v ' Not run\.' > $(RUNLIST); \ |
|
187 |
$(EGREP) ' Passed\.' $(RUNLIST) \ |
|
188 |
| $(EGREP) -v ' Error\.' \ |
|
189 |
| $(EGREP) -v ' Failed\.' > $(PASSLIST); \ |
|
190 |
( $(EGREP) ' Failed\.' $(RUNLIST); \ |
|
191 |
$(EGREP) ' Error\.' $(RUNLIST); \ |
|
192 |
$(EGREP) -v ' Passed\.' $(RUNLIST) ) \ |
|
193 |
| $(SORT) | $(UNIQ) > $(FAILLIST); \ |
|
194 |
if [ $${jtregExitCode} != 0 -o -s $(FAILLIST) ] ; then \ |
|
195 |
$(EXPAND) $(FAILLIST) \ |
|
196 |
| $(CUT) -d' ' -f1 \ |
|
197 |
| $(SED) -e 's@^@FAILED: @' >> $(STATS_TXT); \ |
|
198 |
if [ $${jtregExitCode} = 0 ] ; then \ |
|
199 |
jtregExitCode=1; \ |
|
200 |
fi; \ |
|
201 |
fi; \ |
|
202 |
runc="`$(CAT) $(RUNLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
|
203 |
passc="`$(CAT) $(PASSLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
|
204 |
failc="`$(CAT) $(FAILLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
|
205 |
exclc="FIXME CODETOOLS-7900176"; \ |
|
206 |
$(ECHO) "TEST STATS: name=$(UNIQUE_DIR) run=$${runc} pass=$${passc} fail=$${failc}" \ |
|
207 |
>> $(STATS_TXT); \ |
|
208 |
else \ |
|
209 |
$(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \ |
|
210 |
fi; \ |
|
211 |
if [ -f $(STATS_TXT) ] ; then \ |
|
212 |
$(CAT) $(STATS_TXT); \ |
|
213 |
fi; \ |
|
214 |
$(ZIP_UP_RESULTS) ; \ |
|
215 |
$(TESTEXIT) \ |
|
216 |
) |
|
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
217 |
|
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
218 |
################################################################ |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
219 |
|
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
220 |
# Default make rule (runs jtreg_tests) |
25628 | 221 |
all: hotspot_all |
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
222 |
@$(ECHO) "Testing completed successfully" |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
223 |
|
25628 | 224 |
# Support "hotspot_" prefixed test make targets (too) |
225 |
# The hotspot_% targets are used by the top level Makefile |
|
226 |
# Unless explicitly defined below, hotspot_<x> is interpreted as a jtreg test group name |
|
24433
492c1fb41098
8042804: Support invoking Hotspot tests from top level
mikael
parents:
22234
diff
changeset
|
227 |
hotspot_%: |
25628 | 228 |
$(ECHO) "Running tests: $@" |
229 |
$(MAKE) -j 1 TEST_SELECTION=":$@" UNIQUE_DIR=$@ jtreg_tests; |
|
24433
492c1fb41098
8042804: Support invoking Hotspot tests from top level
mikael
parents:
22234
diff
changeset
|
230 |
|
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
231 |
# Prep for output |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
232 |
prep: clean |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
233 |
@$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR) |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
234 |
@$(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)` |
1 | 235 |
|
236 |
# Cleanup |
|
237 |
clean: |
|
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
238 |
$(RM) -r $(ABS_TEST_OUTPUT_DIR) |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
239 |
$(RM) $(ARCHIVE_BUNDLE) |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
240 |
|
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
241 |
################################################################ |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
242 |
|
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
243 |
# jtreg tests |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
244 |
|
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
245 |
# Expect JT_HOME to be set for jtreg tests. (home for jtreg) |
17005
f7ab7c9c3784
8011678: test/Makefile should pick up JT_HOME environment variable
twisti
parents:
15239
diff
changeset
|
246 |
ifndef JT_HOME |
25628 | 247 |
JT_HOME = $(SLASH_JAVA)/re/jtreg/4.1/promoted/latest/binaries/jtreg |
248 |
ifdef JPRT_JTREG_HOME |
|
249 |
JT_HOME = $(JPRT_JTREG_HOME) |
|
250 |
endif |
|
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
251 |
endif |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
252 |
|
25628 | 253 |
# When called from JPRT the TESTDIRS variable is set to the jtreg tests to run |
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
254 |
ifdef TESTDIRS |
25628 | 255 |
TEST_SELECTION = $(TESTDIRS) |
256 |
endif |
|
257 |
||
258 |
ifdef CONCURRENCY |
|
259 |
EXTRA_JTREG_OPTIONS += -concurrency:$(CONCURRENCY) |
|
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
260 |
endif |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
261 |
|
26922
8134a6d3fc02
8058936: hotspot/test/Makefile should use jtreg script from $JT_HOME/bin/jreg (instead of $JT_HOME/win32/bin/jtreg)
sla
parents:
26921
diff
changeset
|
262 |
# Default JTREG to run |
8134a6d3fc02
8058936: hotspot/test/Makefile should use jtreg script from $JT_HOME/bin/jreg (instead of $JT_HOME/win32/bin/jtreg)
sla
parents:
26921
diff
changeset
|
263 |
JTREG = $(JT_HOME)/bin/jtreg |
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
264 |
|
25628 | 265 |
# Only run automatic tests |
266 |
JTREG_BASIC_OPTIONS += -a |
|
267 |
# Report details on all failed or error tests, times too |
|
268 |
JTREG_BASIC_OPTIONS += -v:fail,error,time |
|
269 |
# Retain all files for failing tests |
|
270 |
JTREG_BASIC_OPTIONS += -retain:fail,error |
|
271 |
# Ignore tests are not run and completely silent about it |
|
272 |
JTREG_IGNORE_OPTION = -ignore:quiet |
|
273 |
JTREG_BASIC_OPTIONS += $(JTREG_IGNORE_OPTION) |
|
274 |
# Add any extra options |
|
275 |
JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS) |
|
276 |
# Set other vm and test options |
|
277 |
JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_OPTIONS:%=-vmoption:%) $(JAVA_VM_ARGS:%=-vmoption:%) |
|
278 |
||
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
279 |
# Option to tell jtreg to not run tests marked with "ignore" |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
280 |
ifeq ($(PLATFORM), windows) |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
281 |
JTREG_KEY_OPTION = -k:!ignore |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
282 |
else |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
283 |
JTREG_KEY_OPTION = -k:\!ignore |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
284 |
endif |
25628 | 285 |
JTREG_BASIC_OPTIONS += $(JTREG_KEY_OPTION) |
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
286 |
|
25628 | 287 |
# Make sure jtreg exists |
288 |
$(JTREG): $(JT_HOME) |
|
1 | 289 |
|
25628 | 290 |
jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) |
291 |
( \ |
|
292 |
( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)"); \ |
|
293 |
export JT_HOME; \ |
|
294 |
$(shell $(GETMIXEDPATH) "$(JTREG)") \ |
|
295 |
$(JTREG_BASIC_OPTIONS) \ |
|
296 |
-r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTreport") \ |
|
297 |
-w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTwork") \ |
|
298 |
-jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \ |
|
299 |
$(JTREG_EXCLUSIONS) \ |
|
300 |
$(JTREG_TEST_OPTIONS) \ |
|
301 |
$(TEST_SELECTION) \ |
|
302 |
) ; \ |
|
303 |
$(BUNDLE_UP_AND_EXIT) \ |
|
304 |
) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT) |
|
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
305 |
|
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
306 |
PHONY_LIST += jtreg_tests |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
307 |
|
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
308 |
################################################################ |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
309 |
|
2868
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
310 |
# clienttest (make sure various basic java client options work) |
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
311 |
|
25628 | 312 |
hotspot_clienttest clienttest: prep $(PRODUCT_HOME) |
2868
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
313 |
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -version |
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
314 |
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -help |
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
315 |
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -X |
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
316 |
$(RM) $(PRODUCT_HOME)/jre/lib/*/client/classes.jsa |
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
317 |
$(RM) $(PRODUCT_HOME)/jre/bin/client/classes.jsa |
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
318 |
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -Xshare:dump |
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
319 |
|
25628 | 320 |
PHONY_LIST += hotspot_clienttest clienttest |
2868
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
321 |
|
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
322 |
################################################################ |
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
323 |
|
26921
de18c35bc62d
8058919: Add sanity test for minimal VM in test/Makefile
dholmes
parents:
25628
diff
changeset
|
324 |
# minimaltest (make sure various basic java minimal options work) |
de18c35bc62d
8058919: Add sanity test for minimal VM in test/Makefile
dholmes
parents:
25628
diff
changeset
|
325 |
|
de18c35bc62d
8058919: Add sanity test for minimal VM in test/Makefile
dholmes
parents:
25628
diff
changeset
|
326 |
hotspot_minimaltest minimaltest: prep $(PRODUCT_HOME) |
de18c35bc62d
8058919: Add sanity test for minimal VM in test/Makefile
dholmes
parents:
25628
diff
changeset
|
327 |
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -version |
de18c35bc62d
8058919: Add sanity test for minimal VM in test/Makefile
dholmes
parents:
25628
diff
changeset
|
328 |
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -help |
de18c35bc62d
8058919: Add sanity test for minimal VM in test/Makefile
dholmes
parents:
25628
diff
changeset
|
329 |
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -X |
de18c35bc62d
8058919: Add sanity test for minimal VM in test/Makefile
dholmes
parents:
25628
diff
changeset
|
330 |
|
de18c35bc62d
8058919: Add sanity test for minimal VM in test/Makefile
dholmes
parents:
25628
diff
changeset
|
331 |
PHONY_LIST += hotspot_minimaltest minimaltest |
de18c35bc62d
8058919: Add sanity test for minimal VM in test/Makefile
dholmes
parents:
25628
diff
changeset
|
332 |
|
de18c35bc62d
8058919: Add sanity test for minimal VM in test/Makefile
dholmes
parents:
25628
diff
changeset
|
333 |
################################################################ |
de18c35bc62d
8058919: Add sanity test for minimal VM in test/Makefile
dholmes
parents:
25628
diff
changeset
|
334 |
|
2868
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
335 |
# servertest (make sure various basic java server options work) |
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
336 |
|
25628 | 337 |
hotspot_servertest servertest: prep $(PRODUCT_HOME) |
2868
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
338 |
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -version |
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
339 |
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -help |
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
340 |
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -X |
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
341 |
|
25628 | 342 |
PHONY_LIST += hotspot_servertest servertest |
2868
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
343 |
|
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
344 |
################################################################ |
051eb4af737f
6839151: Add a JPRT default test of -Xshare:dump when new hotspot is built
ohair
parents:
2105
diff
changeset
|
345 |
|
10994
fc93bca9c720
7102044: G1: VM crashes with assert(old_end != new_end) failed: don't call this otherwise
brutisso
parents:
10565
diff
changeset
|
346 |
# internalvmtests (run internal unit tests inside the VM) |
fc93bca9c720
7102044: G1: VM crashes with assert(old_end != new_end) failed: don't call this otherwise
brutisso
parents:
10565
diff
changeset
|
347 |
|
25628 | 348 |
hotspot_internalvmtests internalvmtests: prep $(PRODUCT_HOME) |
10994
fc93bca9c720
7102044: G1: VM crashes with assert(old_end != new_end) failed: don't call this otherwise
brutisso
parents:
10565
diff
changeset
|
349 |
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -XX:+ExecuteInternalVMTests -version |
fc93bca9c720
7102044: G1: VM crashes with assert(old_end != new_end) failed: don't call this otherwise
brutisso
parents:
10565
diff
changeset
|
350 |
|
25628 | 351 |
PHONY_LIST += hotspot_internalvmtests internalvmtests |
1132
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
352 |
|
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
353 |
################################################################ |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
354 |
|
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
355 |
# Phony targets (e.g. these are not filenames) |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
356 |
.PHONY: all clean prep $(PHONY_LIST) |
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
357 |
|
915051915ce9
6745363: Add ability to run packtest to hotspot/test/makefile
ohair
parents:
1
diff
changeset
|
358 |
################################################################ |