author | coleenp |
Wed, 17 Jun 2015 21:44:48 +0000 | |
changeset 31362 | 8957ccbb5821 |
parent 29219 | 33fb011789eb |
child 36511 | 9d0388c6b336 |
permissions | -rw-r--r-- |
2 | 1 |
# |
29219
33fb011789eb
8072842: Add support for building native JTReg tests
ihse
parents:
28778
diff
changeset
|
2 |
# Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved. |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
4 |
# |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
10 |
# |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
15 |
# accompanied this code). |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
16 |
# |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
20 |
# |
5506 | 21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
# or visit www.oracle.com if you need additional information or have any |
|
23 |
# questions. |
|
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
24 |
# |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
25 |
|
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
26 |
# |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
27 |
# Makefile to run various jdk tests |
2 | 28 |
# |
29 |
||
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
30 |
.DEFAULT : all |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
31 |
|
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
32 |
# Empty these to get rid of some default rules |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
33 |
.SUFFIXES: |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
34 |
.SUFFIXES: .java |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
35 |
CO= |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
36 |
GET= |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
37 |
|
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
38 |
# Utilities used |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
39 |
AWK = awk |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
40 |
CAT = cat |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
41 |
CD = cd |
5600
8ca34998a6b3
6943915: Adjust jdk/test/Makefile to deal with .dll and .so libraries needing execute permissions
ohair
parents:
5149
diff
changeset
|
42 |
CHMOD = chmod |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
43 |
CP = cp |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
44 |
CUT = cut |
5600
8ca34998a6b3
6943915: Adjust jdk/test/Makefile to deal with .dll and .so libraries needing execute permissions
ohair
parents:
5149
diff
changeset
|
45 |
DIRNAME = dirname |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
46 |
ECHO = echo |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
47 |
EGREP = egrep |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
48 |
EXPAND = expand |
5600
8ca34998a6b3
6943915: Adjust jdk/test/Makefile to deal with .dll and .so libraries needing execute permissions
ohair
parents:
5149
diff
changeset
|
49 |
FIND = find |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
50 |
MKDIR = mkdir |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
51 |
PWD = pwd |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
52 |
SED = sed |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
53 |
SORT = sort |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
54 |
TEE = tee |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
55 |
UNAME = uname |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
56 |
UNIQ = uniq |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
57 |
WC = wc |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
58 |
ZIP = zip |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
59 |
|
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
60 |
# Get OS name from uname (Cygwin inexplicably adds _NT-5.1) |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
61 |
UNAME_S := $(shell $(UNAME) -s | $(CUT) -f1 -d_) |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
62 |
|
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
63 |
# Commands to run on paths to make mixed paths for java on windows |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
64 |
ifeq ($(UNAME_S), CYGWIN) |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
65 |
# Location of developer shared files |
5611
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
5600
diff
changeset
|
66 |
SLASH_JAVA = J: |
21643
dd4f80b0590d
8028102: All test targets, jdk/test/Makefile, fail on Windows
chegar
parents:
21615
diff
changeset
|
67 |
GETMIXEDPATH = cygpath -m |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
68 |
else |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
69 |
# Location of developer shared files |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
70 |
SLASH_JAVA = /java |
5149
efce9634bfc0
6933294: Fix some test/Makefile issues around Linux ARCH settings, better defaults
ohair
parents:
4991
diff
changeset
|
71 |
|
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
72 |
GETMIXEDPATH=$(ECHO) |
5149
efce9634bfc0
6933294: Fix some test/Makefile issues around Linux ARCH settings, better defaults
ohair
parents:
4991
diff
changeset
|
73 |
endif |
efce9634bfc0
6933294: Fix some test/Makefile issues around Linux ARCH settings, better defaults
ohair
parents:
4991
diff
changeset
|
74 |
|
2 | 75 |
# Root of this test area (important to use full paths in some places) |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
76 |
TEST_ROOT := $(shell $(PWD)) |
2 | 77 |
|
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
78 |
# Root of all test results |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
79 |
ifdef ALT_OUTPUTDIR |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
80 |
ABS_OUTPUTDIR = $(shell $(CD) $(ALT_OUTPUTDIR) && $(PWD)) |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
81 |
else |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
82 |
ABS_OUTPUTDIR = $(shell $(CD) $(TEST_ROOT)/.. && $(PWD)) |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
83 |
endif |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
84 |
|
5149
efce9634bfc0
6933294: Fix some test/Makefile issues around Linux ARCH settings, better defaults
ohair
parents:
4991
diff
changeset
|
85 |
ABS_PLATFORM_BUILD_ROOT = $(ABS_OUTPUTDIR) |
efce9634bfc0
6933294: Fix some test/Makefile issues around Linux ARCH settings, better defaults
ohair
parents:
4991
diff
changeset
|
86 |
ABS_TEST_OUTPUT_DIR := $(ABS_PLATFORM_BUILD_ROOT)/testoutput/$(UNIQUE_DIR) |
2 | 87 |
|
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
88 |
# Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test) |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
89 |
ifndef PRODUCT_HOME |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
90 |
# Try to use j2sdk-image if it exists |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
91 |
ABS_JDK_IMAGE = $(ABS_PLATFORM_BUILD_ROOT)/images/j2sdk-image |
5149
efce9634bfc0
6933294: Fix some test/Makefile issues around Linux ARCH settings, better defaults
ohair
parents:
4991
diff
changeset
|
92 |
PRODUCT_HOME := \ |
efce9634bfc0
6933294: Fix some test/Makefile issues around Linux ARCH settings, better defaults
ohair
parents:
4991
diff
changeset
|
93 |
$(shell \ |
efce9634bfc0
6933294: Fix some test/Makefile issues around Linux ARCH settings, better defaults
ohair
parents:
4991
diff
changeset
|
94 |
if [ -d $(ABS_JDK_IMAGE) ] ; then \ |
efce9634bfc0
6933294: Fix some test/Makefile issues around Linux ARCH settings, better defaults
ohair
parents:
4991
diff
changeset
|
95 |
$(ECHO) "$(ABS_JDK_IMAGE)"; \ |
efce9634bfc0
6933294: Fix some test/Makefile issues around Linux ARCH settings, better defaults
ohair
parents:
4991
diff
changeset
|
96 |
else \ |
efce9634bfc0
6933294: Fix some test/Makefile issues around Linux ARCH settings, better defaults
ohair
parents:
4991
diff
changeset
|
97 |
$(ECHO) "$(ABS_PLATFORM_BUILD_ROOT)"; \ |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
98 |
fi) |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
99 |
PRODUCT_HOME := $(PRODUCT_HOME) |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
100 |
endif |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
101 |
|
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
102 |
# Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.) |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
103 |
# Should be passed into 'java' only. |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
104 |
# Could include: -d64 -server -client OR any java option |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
105 |
ifdef JPRT_PRODUCT_ARGS |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
106 |
JAVA_ARGS = $(JPRT_PRODUCT_ARGS) |
2 | 107 |
endif |
108 |
||
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
109 |
# Expect JPRT to set JPRT_PRODUCT_VM_ARGS (e.g. -Xcomp etc.) |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
110 |
# Should be passed into anything running the vm (java, javac, javadoc, ...). |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
111 |
ifdef JPRT_PRODUCT_VM_ARGS |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
112 |
JAVA_VM_ARGS = $(JPRT_PRODUCT_VM_ARGS) |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
113 |
endif |
2 | 114 |
|
29219
33fb011789eb
8072842: Add support for building native JTReg tests
ihse
parents:
28778
diff
changeset
|
115 |
# jtreg -nativepath <dir> |
33fb011789eb
8072842: Add support for building native JTReg tests
ihse
parents:
28778
diff
changeset
|
116 |
# |
33fb011789eb
8072842: Add support for building native JTReg tests
ihse
parents:
28778
diff
changeset
|
117 |
# Local make tests will be TEST_IMAGE_DIR and JPRT with jprt.use.reg.test.bundle=true |
33fb011789eb
8072842: Add support for building native JTReg tests
ihse
parents:
28778
diff
changeset
|
118 |
# should be JPRT_TESTNATIVE_PATH |
33fb011789eb
8072842: Add support for building native JTReg tests
ihse
parents:
28778
diff
changeset
|
119 |
ifdef TEST_IMAGE_DIR |
33fb011789eb
8072842: Add support for building native JTReg tests
ihse
parents:
28778
diff
changeset
|
120 |
TESTNATIVE_DIR = $(TEST_IMAGE_DIR) |
33fb011789eb
8072842: Add support for building native JTReg tests
ihse
parents:
28778
diff
changeset
|
121 |
else ifdef JPRT_TESTNATIVE_PATH |
33fb011789eb
8072842: Add support for building native JTReg tests
ihse
parents:
28778
diff
changeset
|
122 |
TESTNATIVE_DIR = $(JPRT_TESTNATIVE_PATH) |
33fb011789eb
8072842: Add support for building native JTReg tests
ihse
parents:
28778
diff
changeset
|
123 |
endif |
33fb011789eb
8072842: Add support for building native JTReg tests
ihse
parents:
28778
diff
changeset
|
124 |
ifdef TESTNATIVE_DIR |
33fb011789eb
8072842: Add support for building native JTReg tests
ihse
parents:
28778
diff
changeset
|
125 |
JTREG_NATIVE_PATH = -nativepath:$(shell $(GETMIXEDPATH) "$(TESTNATIVE_DIR)/jdk/jtreg/native") |
33fb011789eb
8072842: Add support for building native JTReg tests
ihse
parents:
28778
diff
changeset
|
126 |
endif |
33fb011789eb
8072842: Add support for building native JTReg tests
ihse
parents:
28778
diff
changeset
|
127 |
|
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
128 |
# Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results) |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
129 |
ifdef JPRT_ARCHIVE_BUNDLE |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
130 |
ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE) |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
131 |
else |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
132 |
ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
133 |
endif |
2 | 134 |
|
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
135 |
# How to create the test bundle (pass or fail, we want to create this) |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
136 |
# Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed. |
5600
8ca34998a6b3
6943915: Adjust jdk/test/Makefile to deal with .dll and .so libraries needing execute permissions
ohair
parents:
5149
diff
changeset
|
137 |
ZIP_UP_RESULTS = ( $(MKDIR) -p `$(DIRNAME) $(ARCHIVE_BUNDLE)` \ |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
138 |
&& $(CD) $(ABS_TEST_OUTPUT_DIR) \ |
8992
6a3062c1416f
6737397: Should support running JCK test suite with test/Makefile and JPRT
ohair
parents:
8769
diff
changeset
|
139 |
&& $(CHMOD) -R a+r . \ |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
140 |
&& $(ZIP) -q -r $(ARCHIVE_BUNDLE) . ) |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
141 |
|
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
142 |
# important results files |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
143 |
SUMMARY_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTreport/text/summary.txt") |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
144 |
STATS_TXT_NAME = Stats.txt |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
145 |
STATS_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/$(STATS_TXT_NAME)") |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
146 |
RUNLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/runlist.txt") |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
147 |
PASSLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/passlist.txt") |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
148 |
FAILLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/faillist.txt") |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
149 |
EXITCODE = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/exitcode.txt") |
4342
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
150 |
|
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
151 |
TESTEXIT = \ |
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
152 |
if [ ! -s $(EXITCODE) ] ; then \ |
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
153 |
$(ECHO) "ERROR: EXITCODE file not filled in."; \ |
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
154 |
$(ECHO) "1" > $(EXITCODE); \ |
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
155 |
fi ; \ |
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
156 |
testExitCode=`$(CAT) $(EXITCODE)`; \ |
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
157 |
$(ECHO) "EXIT CODE: $${testExitCode}"; \ |
4514 | 158 |
exit $${testExitCode} |
4342
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
159 |
|
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
160 |
BUNDLE_UP_AND_EXIT = \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
161 |
( \ |
4342
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
162 |
jtregExitCode=$$? && \ |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
163 |
_summary="$(SUMMARY_TXT)"; \ |
4342
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
164 |
$(RM) -f $(STATS_TXT) $(RUNLIST) $(PASSLIST) $(FAILLIST) $(EXITCODE); \ |
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
165 |
$(ECHO) "$${jtregExitCode}" > $(EXITCODE); \ |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
166 |
if [ -r "$${_summary}" ] ; then \ |
4514 | 167 |
$(ECHO) "Summary: $(UNIQUE_DIR)" > $(STATS_TXT); \ |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
168 |
$(EXPAND) $${_summary} | $(EGREP) -v ' Not run\.' > $(RUNLIST); \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
169 |
$(EGREP) ' Passed\.' $(RUNLIST) \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
170 |
| $(EGREP) -v ' Error\.' \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
171 |
| $(EGREP) -v ' Failed\.' > $(PASSLIST); \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
172 |
( $(EGREP) ' Failed\.' $(RUNLIST); \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
173 |
$(EGREP) ' Error\.' $(RUNLIST); \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
174 |
$(EGREP) -v ' Passed\.' $(RUNLIST) ) \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
175 |
| $(SORT) | $(UNIQ) > $(FAILLIST); \ |
4342
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
176 |
if [ $${jtregExitCode} != 0 -o -s $(FAILLIST) ] ; then \ |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
177 |
$(EXPAND) $(FAILLIST) \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
178 |
| $(CUT) -d' ' -f1 \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
179 |
| $(SED) -e 's@^@FAILED: @' >> $(STATS_TXT); \ |
4342
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
180 |
if [ $${jtregExitCode} = 0 ] ; then \ |
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
181 |
jtregExitCode=1; \ |
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
182 |
fi; \ |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
183 |
fi; \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
184 |
runc="`$(CAT) $(RUNLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
185 |
passc="`$(CAT) $(PASSLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
186 |
failc="`$(CAT) $(FAILLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
187 |
exclc="FIXME CODETOOLS-7900176"; \ |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
188 |
$(ECHO) "TEST STATS: name=$(UNIQUE_DIR) run=$${runc} pass=$${passc} fail=$${failc}" \ |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
189 |
>> $(STATS_TXT); \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
190 |
else \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
191 |
$(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
192 |
fi; \ |
8992
6a3062c1416f
6737397: Should support running JCK test suite with test/Makefile and JPRT
ohair
parents:
8769
diff
changeset
|
193 |
if [ -f $(STATS_TXT) ] ; then \ |
6a3062c1416f
6737397: Should support running JCK test suite with test/Makefile and JPRT
ohair
parents:
8769
diff
changeset
|
194 |
$(CAT) $(STATS_TXT); \ |
6a3062c1416f
6737397: Should support running JCK test suite with test/Makefile and JPRT
ohair
parents:
8769
diff
changeset
|
195 |
fi; \ |
4991
38f33163acce
6915983: testing problems, adjusting list of tests, needs some investigation
ohair
parents:
4517
diff
changeset
|
196 |
$(ZIP_UP_RESULTS) ; \ |
4342
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
197 |
$(TESTEXIT) \ |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
198 |
) |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
199 |
|
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
200 |
################################################################ |
2 | 201 |
|
11281 | 202 |
# Default make rule (runs default jdk tests) |
203 |
all: jdk_default |
|
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
204 |
@$(ECHO) "Testing completed successfully" |
2 | 205 |
|
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
206 |
# Prep for output |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
207 |
# Change execute permissions on shared library files. |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
208 |
# Files in repositories should never have execute permissions, but |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
209 |
# there are some tests that have pre-built shared libraries, and these |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
210 |
# windows dll files must have execute permission. Adding execute |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
211 |
# permission may happen automatically on windows when using certain |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
212 |
# versions of mercurial but it cannot be guaranteed. And blindly |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
213 |
# adding execute permission might be seen as a mercurial 'change', so |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
214 |
# we avoid adding execute permission to repository files. But testing |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
215 |
# from a plain source tree needs the chmod a+rx. Applying the chmod to |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
216 |
# all shared libraries not just dll files. And with CYGWIN and sshd |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
217 |
# service, you may need CYGWIN=ntsec for this to work. |
16722
17f546b0276a
8010268: Remove dependence upon clean target from jdk/test/Makefile prep target
mduigou
parents:
16507
diff
changeset
|
218 |
prep: |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
219 |
@$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR) |
5813
8e455cd3e807
6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents:
5627
diff
changeset
|
220 |
@$(MKDIR) -p `$(DIRNAME) $(ARCHIVE_BUNDLE)` |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
221 |
@if [ ! -d $(TEST_ROOT)/../.hg ] ; then \ |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
222 |
$(FIND) $(TEST_ROOT) \( -name \*.dll -o -name \*.DLL -o -name \*.so \) \ |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
223 |
-exec $(CHMOD) a+rx {} \; ; \ |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
224 |
fi |
2 | 225 |
|
226 |
# Cleanup |
|
227 |
clean: |
|
15656
374433993cb0
8006594: Add jdk_core target to jdk/test/Makefile
mduigou
parents:
15289
diff
changeset
|
228 |
@$(RM) -r $(ABS_TEST_OUTPUT_DIR) |
374433993cb0
8006594: Add jdk_core target to jdk/test/Makefile
mduigou
parents:
15289
diff
changeset
|
229 |
@$(RM) $(ARCHIVE_BUNDLE) |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
230 |
|
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
231 |
################################################################ |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
232 |
|
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
233 |
# jtreg tests |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
234 |
|
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
235 |
# Expect JT_HOME to be set for jtreg tests. (home for jtreg) |
4329
850b656a411e
6902666: Include closed tests in the test/Makefile jdk_* targets
ohair
parents:
4187
diff
changeset
|
236 |
ifndef JT_HOME |
10607
1ba66093449c
7092627: use agentvm mode instead of samevm in regtests
weijun
parents:
10435
diff
changeset
|
237 |
JT_HOME = $(SLASH_JAVA)/re/jtreg/4.1/promoted/latest/binaries/jtreg |
4329
850b656a411e
6902666: Include closed tests in the test/Makefile jdk_* targets
ohair
parents:
4187
diff
changeset
|
238 |
ifdef JPRT_JTREG_HOME |
850b656a411e
6902666: Include closed tests in the test/Makefile jdk_* targets
ohair
parents:
4187
diff
changeset
|
239 |
JT_HOME = $(JPRT_JTREG_HOME) |
850b656a411e
6902666: Include closed tests in the test/Makefile jdk_* targets
ohair
parents:
4187
diff
changeset
|
240 |
endif |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
241 |
endif |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
242 |
|
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
243 |
# Problematic tests to be excluded |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
244 |
PROBLEM_LISTS=$(call MixedDirs,$(wildcard ProblemList.txt closed/ProblemList.txt)) |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
245 |
|
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
246 |
# Create exclude list for this platform and arch |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
247 |
ifdef NO_EXCLUDES |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
248 |
JTREG_EXCLUSIONS = |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
249 |
else |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
250 |
JTREG_EXCLUSIONS = $(PROBLEM_LISTS:%=-exclude:%) |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
251 |
endif |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
252 |
|
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
253 |
# convert list of directories to dos paths |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
254 |
define MixedDirs |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
255 |
$(foreach i,$1,$(shell $(GETMIXEDPATH) "${i}")) |
4329
850b656a411e
6902666: Include closed tests in the test/Makefile jdk_* targets
ohair
parents:
4187
diff
changeset
|
256 |
endef |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
257 |
|
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
258 |
define SummaryInfo |
4514 | 259 |
$(ECHO) "########################################################" |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
260 |
$(CAT) $(?:%=$(ABS_TEST_OUTPUT_DIR)/%/$(STATS_TXT_NAME)) |
4514 | 261 |
$(ECHO) "########################################################" |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
262 |
endef |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
263 |
|
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
264 |
# ------------------------------------------------------------------ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
265 |
|
21809
8afe7ed13ed9
8028478: Re-visit JPRT testsets to make it easier to run subsets of the tests
alanb
parents:
21643
diff
changeset
|
266 |
jdk_% core_% svc_%: |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
267 |
$(ECHO) "Running tests: $@" |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
268 |
for each in $@; do \ |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
269 |
$(MAKE) -j 1 TEST_SELECTION=":$$each" UNIQUE_DIR=$$each jtreg_tests; \ |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
270 |
done |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
271 |
|
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
272 |
# ------------------------------------------------------------------ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
273 |
|
27954
d2c87a8d2f37
8066507: JPRT is not capable of running jtreg tests located jdk/test
cjplummer
parents:
21809
diff
changeset
|
274 |
# When called from JPRT the TESTDIRS variable is set to the jtreg tests to run |
d2c87a8d2f37
8066507: JPRT is not capable of running jtreg tests located jdk/test
cjplummer
parents:
21809
diff
changeset
|
275 |
ifdef TESTDIRS |
d2c87a8d2f37
8066507: JPRT is not capable of running jtreg tests located jdk/test
cjplummer
parents:
21809
diff
changeset
|
276 |
TEST_SELECTION = $(TESTDIRS) |
d2c87a8d2f37
8066507: JPRT is not capable of running jtreg tests located jdk/test
cjplummer
parents:
21809
diff
changeset
|
277 |
endif |
d2c87a8d2f37
8066507: JPRT is not capable of running jtreg tests located jdk/test
cjplummer
parents:
21809
diff
changeset
|
278 |
|
19063
0aa7087394a1
8021588: Remove explicit othervm execution from jdk/test/Makefile
mduigou
parents:
17705
diff
changeset
|
279 |
ifdef CONCURRENCY |
0aa7087394a1
8021588: Remove explicit othervm execution from jdk/test/Makefile
mduigou
parents:
17705
diff
changeset
|
280 |
EXTRA_JTREG_OPTIONS += -concurrency:$(CONCURRENCY) |
0aa7087394a1
8021588: Remove explicit othervm execution from jdk/test/Makefile
mduigou
parents:
17705
diff
changeset
|
281 |
endif |
0aa7087394a1
8021588: Remove explicit othervm execution from jdk/test/Makefile
mduigou
parents:
17705
diff
changeset
|
282 |
|
28778
e388b3a31b37
8072458: jdk/test/Makefile references (to be removed) win32 directory in jtreg
sla
parents:
27954
diff
changeset
|
283 |
# Default JTREG to run |
e388b3a31b37
8072458: jdk/test/Makefile references (to be removed) win32 directory in jtreg
sla
parents:
27954
diff
changeset
|
284 |
JTREG = $(JT_HOME)/bin/jtreg |
19063
0aa7087394a1
8021588: Remove explicit othervm execution from jdk/test/Makefile
mduigou
parents:
17705
diff
changeset
|
285 |
# run in agentvm mode |
0aa7087394a1
8021588: Remove explicit othervm execution from jdk/test/Makefile
mduigou
parents:
17705
diff
changeset
|
286 |
JTREG_BASIC_OPTIONS += -agentvm |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
287 |
# Only run automatic tests |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
288 |
JTREG_BASIC_OPTIONS += -a |
4517
48e5b69c7e27
6909373: Add -ea to the testing done by jdk/test/Makefile
ohair
parents:
4514
diff
changeset
|
289 |
# Always turn on assertions |
48e5b69c7e27
6909373: Add -ea to the testing done by jdk/test/Makefile
ohair
parents:
4514
diff
changeset
|
290 |
JTREG_ASSERT_OPTION = -ea -esa |
48e5b69c7e27
6909373: Add -ea to the testing done by jdk/test/Makefile
ohair
parents:
4514
diff
changeset
|
291 |
JTREG_BASIC_OPTIONS += $(JTREG_ASSERT_OPTION) |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
292 |
# Report details on all failed or error tests, times too |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
293 |
JTREG_BASIC_OPTIONS += -v:fail,error,time |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
294 |
# Retain all files for failing tests |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
295 |
JTREG_BASIC_OPTIONS += -retain:fail,error |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
296 |
# Ignore tests are not run and completely silent about it |
4517
48e5b69c7e27
6909373: Add -ea to the testing done by jdk/test/Makefile
ohair
parents:
4514
diff
changeset
|
297 |
JTREG_IGNORE_OPTION = -ignore:quiet |
48e5b69c7e27
6909373: Add -ea to the testing done by jdk/test/Makefile
ohair
parents:
4514
diff
changeset
|
298 |
JTREG_BASIC_OPTIONS += $(JTREG_IGNORE_OPTION) |
4514 | 299 |
# Multiple by 4 the timeout numbers |
4517
48e5b69c7e27
6909373: Add -ea to the testing done by jdk/test/Makefile
ohair
parents:
4514
diff
changeset
|
300 |
JTREG_TIMEOUT_OPTION = -timeoutFactor:4 |
48e5b69c7e27
6909373: Add -ea to the testing done by jdk/test/Makefile
ohair
parents:
4514
diff
changeset
|
301 |
JTREG_BASIC_OPTIONS += $(JTREG_TIMEOUT_OPTION) |
17705 | 302 |
# Set the max memory for jtreg control vm |
4517
48e5b69c7e27
6909373: Add -ea to the testing done by jdk/test/Makefile
ohair
parents:
4514
diff
changeset
|
303 |
JTREG_MEMORY_OPTION = -J-Xmx512m |
48e5b69c7e27
6909373: Add -ea to the testing done by jdk/test/Makefile
ohair
parents:
4514
diff
changeset
|
304 |
JTREG_BASIC_OPTIONS += $(JTREG_MEMORY_OPTION) |
19063
0aa7087394a1
8021588: Remove explicit othervm execution from jdk/test/Makefile
mduigou
parents:
17705
diff
changeset
|
305 |
# Add any extra options |
0aa7087394a1
8021588: Remove explicit othervm execution from jdk/test/Makefile
mduigou
parents:
17705
diff
changeset
|
306 |
JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS) |
0aa7087394a1
8021588: Remove explicit othervm execution from jdk/test/Makefile
mduigou
parents:
17705
diff
changeset
|
307 |
# Set other vm and test options |
0aa7087394a1
8021588: Remove explicit othervm execution from jdk/test/Makefile
mduigou
parents:
17705
diff
changeset
|
308 |
JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%) |
0aa7087394a1
8021588: Remove explicit othervm execution from jdk/test/Makefile
mduigou
parents:
17705
diff
changeset
|
309 |
# Set the GC options for test vms |
0aa7087394a1
8021588: Remove explicit othervm execution from jdk/test/Makefile
mduigou
parents:
17705
diff
changeset
|
310 |
#JTREG_GC_OPTION = -vmoption:-XX:+UseSerialGC |
0aa7087394a1
8021588: Remove explicit othervm execution from jdk/test/Makefile
mduigou
parents:
17705
diff
changeset
|
311 |
#JTREG_TEST_OPTIONS += $(JTREG_GC_OPTION) |
17705 | 312 |
# Set the max memory for jtreg target test vms |
313 |
JTREG_TESTVM_MEMORY_OPTION = -vmoption:-Xmx512m |
|
314 |
JTREG_TEST_OPTIONS += $(JTREG_TESTVM_MEMORY_OPTION) |
|
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
315 |
|
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
316 |
# Make sure jtreg exists |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
317 |
$(JTREG): $(JT_HOME) |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
318 |
|
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
319 |
# Run jtreg |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
320 |
jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
321 |
( \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
322 |
( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)"); \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
323 |
export JT_HOME; \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
324 |
$(shell $(GETMIXEDPATH) "$(JTREG)") \ |
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
325 |
$(JTREG_BASIC_OPTIONS) \ |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
326 |
-r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTreport") \ |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
327 |
-w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTwork") \ |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
328 |
-jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \ |
29219
33fb011789eb
8072842: Add support for building native JTReg tests
ihse
parents:
28778
diff
changeset
|
329 |
$(JTREG_NATIVE_PATH) \ |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
330 |
$(JTREG_EXCLUSIONS) \ |
4187
d7111a88f0ec
6888927: Fix jdk jtreg tests to indicate which ones need othervm, allow for use of samevm option
ohair
parents:
2945
diff
changeset
|
331 |
$(JTREG_TEST_OPTIONS) \ |
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
332 |
$(TEST_SELECTION) \ |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
333 |
) ; \ |
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
334 |
$(BUNDLE_UP_AND_EXIT) \ |
4342
9f3aa1172803
6905705: Fix broken exit code values in jdk/test/Makefile
ohair
parents:
4335
diff
changeset
|
335 |
) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT) |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
336 |
|
21615
0231a565a5b7
8021309: replace test/Makefile jdk_* targets with jtreg groups
mduigou
parents:
20839
diff
changeset
|
337 |
PHONY_LIST += jtreg_tests |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
338 |
|
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
339 |
################################################################ |
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
340 |
|
2 | 341 |
# Phony targets (e.g. these are not filenames) |
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
342 |
.PHONY: all clean prep $(PHONY_LIST) |
2 | 343 |
|
2400
0d7007d99b0f
6502548: test/Makefile needs to be setup to allow for JPRT testrules (NSK and JCK testing too?)
ohair
parents:
2
diff
changeset
|
344 |
################################################################ |