Codebase list jtreg / ade25e9
Import Upstream version 6.1+2 Emmanuel Bourg 1 year, 1 month ago
38 changed file(s) with 402 addition(s) and 694 deletion(s). Raw diff Collapse all Expand all
0 name: Build and Test JTReg
1
2 on:
3 push:
4 branches-ignore:
5 - master
6
7 jobs:
8
9 linux-x64:
10 runs-on: ubuntu-20.04
11
12 steps:
13 - name: Checkout the source
14 uses: actions/checkout@v2
15 with:
16 path: jtreg
17 fetch-depth: 0
18
19 - name: build
20 working-directory: jtreg
21 shell: bash
22 run: bash make/build.sh --jdk ${JAVA_HOME_8_X64}
23
24 - name: upload artifact
25 uses: actions/upload-artifact@v2
26 with:
27 name: jtreg
28 path: jtreg/build/images/jtreg
29
30 - name: test
31 working-directory: jtreg
32 shell: bash
33 run:
34 MAKE_ARGS=test
35 HEADLESS=1
36 JDK8HOME=${JAVA_HOME_8_X64}
37 bash make/build.sh --jdk ${JAVA_HOME_8_X64} --skip-download
38
0 [general]
01 project=code-tools
12 comments=lax
2 tags=lax
3 jbs=CODETOOLS
4
5 [checks]
6 error=author,committer,reviewers,merge,issues,executable,symlink,message,whitespace
7
8 [repository]
9 tags=jtreg(?:4\.1-b[0-9]{2}|5\.[01]-b[0-9]{2}|6|-[6789](?:\.[0-9]+)?+[0-9]+)
10 branches=
11
12 [census]
13 version=0
14 domain=openjdk.org
15
16 [checks "whitespace"]
17 files=.*\.java|.*\.m|.*\.mm|.*\.gmk|.*\.m4|.*\.ac|Makefile
18 ignore-tabs=.*\.gmk|Makefile
19
20 [checks "merge"]
21 message=Merge
22
23 [checks "reviewers"]
24 ignore=duke
25
26 [checks "committer"]
27 role=committer
28
29 [checks "issues"]
30 pattern=^(79[0-9]{5}): (\S.*)$
+0
-196
README-v5 less more
0 Building The Regression Test Harness for the OpenJDK platform: jtreg
1
2 (This information is also available at http://openjdk.java.net/jtreg/build.html)
3
4 jtreg depends on a number of external components:
5 JT Harness, TestNG, JUnit, AsmTools, Ant, and JCov.
6
7 The fundamental way to build jtreg is with GNU make, specifying where to find
8 those external components, but a script is also available that will download
9 appropriate copies of those components before building jtreg.
10
11 Building jtreg with the build-all.sh script
12
13 This is the recommended way to build jtreg, for those that want a simple,
14 basic way to build jtreg.
15
16 The script is intended to be run in a Unix-like shell, such as bash on Linux or
17 Mac OS X, or with Cygwin or WSL on Windows. It takes one argument which is the
18 installation of JDK to be used to build jtreg. In addition, Ant must be on your
19 execution path as well as a suitable version of Java to run Ant. The version of
20 JDK must be either JDK 7 or JDK 8.
21
22 % cd jtreg-root-directory
23 % sh make/build-all.sh JDK-directory
24
25 The script will create a build sub-directory, download and build dependencies,
26 and finally build jtreg itself. The resulting image will be in
27 build/images/jtreg.
28
29 No environment variables need to be specified to get a standard build of jtreg.
30 However, the following environment variables may be set, for a non-standard
31 build:
32
33 ASMTOOLS_VERSION, JCOV_VERSION, JTHARNESS_VERSION
34 These variables may be set to the name of a tag identifying a specific
35 changeset in the corresponding OpenJDK repository, or to the pseudo-tag "tip".
36
37 MAKE_ARGS
38 Arguments for the internal invocation of "make". The default is to just build
39 jtreg, but setting this environment variable allows additional targets, such
40 as test targets, to be run. The explicit target to build jtreg is "build";
41 the target to run some basic sanity tests is "quick-test"; and the target
42 to run all tests is "test". You can also use the make "-j" option to build
43 targets in parallel. For example:
44 MAKE_ARGS="-j 4 build quick-test" sh make/build-all.sh
45
46 UNZIP_OPTS, WGET_OPTS
47 These two variables default to "-q", to suppress unnecessary output.
48 You can set these variables to change the default behavior.
49
50 Building jtreg with GNU Make
51
52 The Makefile is in make/Makefile, and creates deliverables in the build/
53 directory, similar to OpenJDK. By default, the build file just builds an image
54 for jtreg. You can build jtreg from a Unix-like command shell with the following
55 commands:
56
57 % cd <jtreg-root-directory>
58 % make -C make
59
60 Dependencies
61
62 jtreg has a number of build dependencies. These can be set with values on the
63 make command line or with values in make/Defs.gmk. You can also include the
64 appropriate license files in the jtreg image, by setting the appropriate make
65 variables. These are documented in make/Defs.gmk
66
67 JDK 1.8 (or better)
68 Set JDKHOME to the JDK or equivalent used to build jtreg. It must be
69 equivalent to JDK 1.8 or later.
70
71 JT Harness
72 See https://wiki.openjdk.java.net/display/CodeTools/JT+Harness.
73 Set JTHARNESS_HOME to the installed copy of the version of JT Harness to be
74 used. It should be version 5.0 or better.
75
76 Ant
77 See http://ant.apache.org/. Set ANTHOME to an installed copy of Ant. It
78 should be version 1.9.x. or better.
79
80 AsmTools
81 See https://wiki.openjdk.java.net/display/CodeTools/asmtools.
82 Set ASMTOOLS_HOME to the installed copy of the version of AsmTools to be
83 used. It should be version 6.0 or better.
84
85 Note: Do not confuse this component with ASM bytecode engineering library
86 available at http://asm.ow2.org/
87
88 JUnit
89 See http://junit.org/. The recommended version is currently JUnit 4.10.
90
91 TestNG
92 See http://testng.org/. The recommended version is currently 6.9.5.
93
94 The following dependencies are optional.
95
96 JCov
97 See https://wiki.openjdk.java.net/display/CodeTools/jcov.
98 Set JCOV_HOME to the installed copy of the version of JCov to be used.
99 It should be version 2.0 or better.
100
101 JDK 1.5
102 This is used when running some of the tests. Set JDK5HOME to run these
103 tests. It need not be set if you are just building jtreg.
104
105 JDK 1.6
106 This is used when running some of the tests. Set JDK6HOME to run these
107 tests. It need not be set if you are just building jtreg.
108
109 JDK 1.7
110 This is used when running some of the tests. Set JDK7HOME to run these
111 tests. It need not be set if you are just building jtreg.
112
113 JDK 1.8
114 This is used when running some of the tests. Set JDK8HOME to run these
115 tests. It need not be set if you are just building jtreg.
116
117 JDK 9
118 This is used when running some of the tests. Set JDK9HOME to run these
119 tests. It need not be set if you are just building jtreg.
120
121 JDK 14
122 This is used when running some of the tests. Set JDK14HOME to run these
123 tests. It need not be set if you are just building jtreg.
124
125 Running jtreg Self-Tests
126
127 The tests can be invoked with individual make targets, or collectively via the
128 "test" target.
129
130 Some of the tests need to pop up windows while they execute. No interaction with
131 these windows is normally required. Since this can be a problem on a headless
132 server machine, and an annoyance on a personal workstation, the tests will
133 attempt to use VNC to create a dummy X-server for use by the tests while they
134 are running. Various implementations of VNC are available, such as from
135 http://www.realvnc.com/. Using VNC is optional; it is not required in order to
136 run the tests.
137
138 By default, VNC will be used if vncserver is found on your execution path, or
139 if VNC_HOME points to an installed copy of VNC. To explicitly disable the use of
140 VNC, set the VNC environment variable to one of false, off, no, or 0. Unless
141 explicitly disabled, the tests will check the following:
142
143 * You must have a password set in $HOME/.vnc/passwd. This is the standard
144 location used by the vncserver command.
145 * If you set the environment variable VNC_HOME, it will be prepended to your
146 execution path to find vncserver.
147 * vncserver must be on your execution path, after VNC_HOME has been added,
148 if set.
149
150 If the tests find any issue with using VNC, it will not be used. If VNC is used
151 to create a dummy X server, the server will be terminated when the test is
152 complete.
153
154 The logic for using VNC is encapsulated within the script make/display.sh.
155
156 Building jtreg with Ant
157
158 It is possible to build jtreg with Ant, but this is primarily intended as a
159 convenience while working on the jtreg source code. If you are building jtreg
160 to run OpenJDK tests, it is recommended that you build jtreg using the Makefile,
161 perhaps via the build-all.sh wrapper script.
162
163 The build file is in make/build.xml; it creates intermediate files in the build/
164 directory and deliverables in the dist/ directory. By default, the build file
165 just builds jtreg, but does not run any tests. You can build jtreg from a
166 Unix-like command shell with the following commands:
167
168 % cd jtreg-root-directory
169 % ant -f make/build.xml
170
171 You can also use this build file when creating a NetBeans free form project with
172 an existing build file.
173
174 Dependencies
175
176 Some of the tasks that are used are listed as "Optional Tasks" in the Ant
177 manual. You may need to make sure that these tasks are available for use by Ant.
178 For example, on Ubuntu Linux these tasks are in the ant-optional package.
179
180 Running Tests
181
182 Some of the tests can be invoked with individual targets beginning
183 "-jtreg-test-", or collectively via the "jtreg-test" target. (The use of
184 "jtreg-test" rather than "test" is to protect against interactions with JUnit in
185 older versions of NetBeans.)
186
187 Using the IntelliJ IDE
188
189 The jtreg repo also contains a plugin for the IntelliJ IDE.
190 This is a convenience plugin which adds jtreg capabilities to the IntelliJ IDE.
191 With this plugin, OpenJDK developers can write, run, and debug jtreg tests
192 without leaving their IDE environment. For more details, see the file
193 `plugins/idea/README.md` in this repo.
194
195
2222
2323 % cd jtreg-root-directory
2424 % sh make/build.sh --jdk JDK-directory
25
26 If your shell is not compatible with `bash`, you may need to invoke `bash` explicitly:
27
28 % bash make/build.sh --jdk JDK-directory
2529
2630 The script will create a build sub-directory, download and build dependencies,
2731 and finally build jtreg itself. The resulting image will be in
112116 * JDK 14:
113117 This is used when running some of the tests. Set `JDK14HOME` to run these
114118 tests. It need not be set if you are just building jtreg.
115
119
120 * JDK 18:
121 This is used when running some of the tests. Set `JDK18HOME` to run these
122 tests. It need not be set if you are just building jtreg.
123
116124 The recommended versions are also defined in `make/build-support/version-numbers`.
117125
118126 ## Running jtreg Self-Tests
183191 This is a convenience plugin which adds jtreg capabilities to the IntelliJ IDE.
184192 With this plugin, OpenJDK developers can write, run, and debug jtreg tests
185193 without leaving their IDE environment. For more details, see the file
186 _plugins/idea/README.md_ in this repo.
194 [plugins/idea/README.md](plugins/idea/README.md) in this repo.
3838
3939 #----------------------------------------------------------------------
4040 #
41 # Support for Cygwin
41 # Support for Cygwin and MSYS2 (which may identify as MSYS, MINGW32 or MINGW64 (the default))
4242
4343 SYSTEM_UNAME := $(shell uname)
4444
5252
5353 ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
5454 USING_CYGWIN = true
55 endif
56
57 ifdef USING_CYGWIN
55 USING_CYGWIN_OR_USING_MSYS = true
56 endif
57
58 ifneq (,$(findstring MSYS,$(SYSTEM_UNAME))$(findstring MINGW,$(SYSTEM_UNAME)))
59 USING_MSYS = true
60 USING_CYGWIN_OR_USING_MSYS = true
61 endif
62
63 ifdef USING_CYGWIN_OR_USING_MSYS
5864 define FullPath
5965 $(shell cygpath -a -m $1 2> $(DEV_NULL))
6066 endef
147153 OLD_JAVAC_SOURCE_TARGET = -source 1.2 -target 1.1
148154 AGENT_JAVAC_SOURCE_TARGET = -source 5 -target 5
149155 TOOL_JAVAC_SOURCE_TARGET = -source 8 -target 8
156 REGTEST_TOOL_PATCH_JAVA_BASE_OPTIONS =
157 else
158 EXTRA_LINT_OPTS = -rawtypes,-unchecked
159 REGTEST_TOOL_PATCH_JAVA_BASE_OPTIONS = --patch-module java.base=$(JAVADIR)
150160 endif
151161
152162 ifdef JDK5HOME
159169 # for files needed to run othervm tests on oldest supported platforms
160170 REGTEST_OLD_JAVAC = $(JDKHOME)/bin/javac
161171 REGTEST_OLD_JAVAC_OPTIONS = \
162 $(OLD_JAVAC_SOURCE_TARGET) $(JDK5_BOOTCLASSPATH) -Xlint:all,-options -Werror
172 $(OLD_JAVAC_SOURCE_TARGET) $(JDK5_BOOTCLASSPATH) -Xlint:all,-options,-deprecation,$(EXTRA_LINT_OPTS) -Werror
163173
164174 # for files needed to run agentvm tests (on platforms back to JDK 1.5)
165175 REGTEST_AGENT_JAVAC = $(JDKHOME)/bin/javac
166176 REGTEST_AGENT_JAVAC_OPTIONS = \
167 $(AGENT_JAVAC_SOURCE_TARGET) $(JDK5_BOOTCLASSPATH) -Xlint:all,-options -Werror
177 $(AGENT_JAVAC_SOURCE_TARGET) $(JDK5_BOOTCLASSPATH) -Xlint:all,-options,-deprecation,$(EXTRA_LINT_OPTS) -Werror
168178
169179 # for files needed for jtreg tool
170180 REGTEST_TOOL_JAVAC = $(JDKHOME)/bin/javac
171181 REGTEST_TOOL_JAVAC_OPTIONS = \
172 $(TOOL_JAVAC_SOURCE_TARGET) $(JDK8_BOOTCLASSPATH) -Xlint:all,-options -Werror
182 $(TOOL_JAVAC_SOURCE_TARGET) $(JDK8_BOOTCLASSPATH) -Xlint:all,-options,-deprecation -Werror
173183
174184 #----- JavaTest: https://wiki.openjdk.java.net/display/CodeTools/JT+Harness
175185 #
5959 .NO_PARALLEL: clean
6060
6161 sanity:
62 ifdef JDK15HOME
63 @echo "JDK15HOME = $(JDK15HOME)"
62 ifdef JDK1_1HOME
63 @echo "JDK1_1HOME = $(JDK1_1HOME)"
6464 endif
65 ifdef JDK16HOME
66 @echo "JDK16HOME = $(JDK16HOME)"
65 ifdef JDK5HOME
66 @echo "JDK5HOME = $(JDK5HOME)"
6767 endif
68 ifdef JDK17HOME
69 @echo "JDK17HOME = $(JDK17HOME)"
68 ifdef JDK6HOME
69 @echo "JDK6HOME = $(JDK6HOME)"
70 endif
71 ifdef JDK7HOME
72 @echo "JDK7HOME = $(JDK7HOME)"
73 endif
74 ifdef JDK8HOME
75 @echo "JDK8HOME = $(JDK8HOME)"
76 endif
77 ifdef JDK9HOME
78 @echo "JDK9HOME = $(JDK9HOME)"
79 endif
80 ifdef JDK14HOME
81 @echo "JDK14HOME = $(JDK14HOME)"
7082 endif
7183 ifdef JDK18HOME
7284 @echo "JDK18HOME = $(JDK18HOME)"
7385 endif
7486 @echo "JDKHOME = $(JDKHOME)"
75 ifdef JAVAHELP_HOME
76 @echo "JAVAHELP_HOME = $(JAVAHELP_HOME)"
77 endif
7887 @echo "JAVATEST_HOME = $(JAVATEST_HOME)"
7988 ifneq ($(JTHARNESS_HOME), $(JAVATEST_HOME))
8089 @echo "JTHARNESS_HOME = $(JTHARNESS_HOME)"
+0
-317
make/build-all.sh less more
0 #!/bin/bash
1
2 #
3 # Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 #
6 # This code is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License version 2 only, as
8 # published by the Free Software Foundation. Oracle designates this
9 # particular file as subject to the "Classpath" exception as provided
10 # by Oracle in the LICENSE file that accompanied this code.
11 #
12 # This code is distributed in the hope that it will be useful, but WITHOUT
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 # version 2 for more details (a copy is included in the LICENSE file that
16 # accompanied this code).
17 #
18 # You should have received a copy of the GNU General Public License version
19 # 2 along with this work; if not, write to the Free Software Foundation,
20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 #
22 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 # or visit www.oracle.com if you need additional information or have any
24 # questions.
25 #
26
27 set -e
28 set -u
29
30 if [ "$#" -ne 1 ]; then
31 echo "Usage: $0 /path/to/jdk/1.8/image" >&2
32 exit 1
33 fi
34
35 if [ ! -d $1 ]; then
36 echo "Error: '$1' is not a directory" >&2
37 exit 1
38 fi
39
40 if [ ! -x $1/bin/java ]; then
41 echo "Error: Could not find an executable binary at '$1/bin/java'" >&2
42 exit 1
43 fi
44
45 JAVA_VERSION=$($1/bin/java -version 2>&1 | grep "^.* version \".*\"$" | sed 's/.*\"\(.*\)\".*/\1/')
46
47 if case ${JAVA_VERSION} in 1.8*) false ;; *) true; esac; then
48 echo "Error: Expected a path to JDK with version 1.8, got version ${JAVA_VERSION}" >&2
49 exit 1
50 fi
51
52 case `uname` in CYGWIN*) CYGWIN=1 ;; *) CYGWIN=0 ;; esac
53
54 native_path() {
55 if [ $CYGWIN -eq 1 ]; then echo `cygpath -w $1`; else echo $1; fi
56 }
57
58 mixed_path() {
59 if [ $CYGWIN -eq 1 ]; then echo `cygpath -m $1`; else echo $1; fi
60 }
61
62 get_scm_type() {
63 if [ -d .hg ]; then
64 echo "HG"
65 elif [ -d .git ]; then
66 echo "GIT"
67 else
68 echo "Error: unrecognized repository, it must be Git or Mercurial" >&2
69 exit 1
70 fi
71 }
72
73 SCM_TYPE=`get_scm_type`
74
75 get_root() {
76 case $SCM_TYPE in
77 HG) hg root ;;
78 GIT) git rev-parse --show-toplevel ;;
79 *) echo "Error: unknown SCM" >&2 ; exit 1 ;;
80 esac
81 }
82
83 get_tag_info() {
84 case $SCM_TYPE in
85 HG) hg tags | grep jtreg | head -1 ;;
86 GIT) git tag | grep jtreg | tail -1 ;;
87 *) echo "Error: unknown SCM" >&2 ; exit 1 ;;
88 esac
89 }
90
91 export JAVA_HOME=$1
92 export PATH="$JAVA_HOME:$PATH"
93
94 if [ -n "`which sha1sum`" ]; then
95 SHASUM=sha1sum;
96 elif [ -n "`which shasum`" ]; then
97 SHASUM="shasum -a 1"
98 else
99 echo "Error: can't find shasum or sha1sum" >&2
100 exit 1
101 fi
102
103 UNZIP=unzip
104 UNZIP_OPTS="${UNZIP_OPTS:--q} -u"
105 WGET=wget
106 WGET_OPTS=${WGET_OPTS:--q}
107
108
109 ROOT=`get_root`
110
111 BUILD_DIR=${BUILD_DIR:-${ROOT}/build}
112
113 if [ "${SKIP_WGET:-}" = "" -a -d ${BUILD_DIR} ]; then
114 echo "Error: Build directory '${BUILD_DIR}' already exists" >&2
115 exit 1
116 fi
117
118 mkdir -p ${BUILD_DIR}
119
120 WGet() {
121 if [ "${SKIP_WGET:-}" != "" -a -r $2 ]; then
122 echo "Skipping download of $1..."
123 else
124 ${WGET} ${WGET_OPTS} "$1" -O "$2"
125 fi
126 }
127
128 # DEPENDENCIES
129 ##############
130
131 APACHE_ANT_URL=https://archive.apache.org/dist/ant/binaries
132 MAVEN_REPO_URL=https://repo1.maven.org/maven2
133
134 CODE_TOOLS_URL="${CODE_TOOLS_URL:-https://git.openjdk.java.net}"
135 # The following are Mercurial tags for the corresponding OpenJDK Code Tools repo
136 ASMTOOLS_VERSION=${ASMTOOLS_VERSION:-7.0-b08} # early access for 7.0
137 JTHARNESS_VERSION=${JTHARNESS_VERSION:-jt6.0-b11} # early access for 6.0
138 JCOV_VERSION=${JCOV_VERSION:-jcov3.0-b05} # jcov3.0, ASM 6.2
139
140 # ANT
141 #####
142
143 ANT_DIR=${BUILD_DIR}/ant
144 mkdir -p ${ANT_DIR}
145
146 ANT_VERSION=${ANT_VERSION:-apache-ant-1.9.4}
147 ANT_ZIP=${ANT_DIR}/${ANT_VERSION}.zip
148 WGet ${APACHE_ANT_URL}/${ANT_VERSION}-bin.zip ${ANT_ZIP}
149 echo "ec57a35eb869a307abdfef8712f3688fff70887f ${ANT_ZIP}" | ${SHASUM} --check -
150 ${UNZIP} ${UNZIP_OPTS} -d ${ANT_DIR} ${ANT_ZIP}
151
152 ANT_JAR=${ANT_DIR}/${ANT_VERSION}/lib/ant.jar
153 ANT=${ANT_DIR}/${ANT_VERSION}/bin/ant
154
155 # ASMTOOLS
156 ##########
157
158 ASMTOOLS_BUILD_DIR=${BUILD_DIR}/asmtools
159 mkdir -p ${ASMTOOLS_BUILD_DIR}
160
161 # Build asmtools
162 ASMTOOLS_SRC_ZIP=${ASMTOOLS_BUILD_DIR}/source.zip
163 WGet ${CODE_TOOLS_URL}/asmtools/archive/${ASMTOOLS_VERSION}.zip ${ASMTOOLS_SRC_ZIP}
164 ${UNZIP} ${UNZIP_OPTS} -d ${ASMTOOLS_BUILD_DIR} ${ASMTOOLS_SRC_ZIP}
165
166 if [ "${ASMTOOLS_VERSION}" = "tip" ]; then
167 ASMTOOLS_VERSION=`cd ${ASMTOOLS_BUILD_DIR} ; ls -d asmtools-* | sed -e 's/asmtools-//'`
168 fi
169
170 ASMTOOLS_SRC=${ASMTOOLS_BUILD_DIR}/asmtools-${ASMTOOLS_VERSION}
171 ASMTOOLS_DIST=${ASMTOOLS_BUILD_DIR}/build
172 ${ANT} -DBUILD_DIR=`native_path ${ASMTOOLS_DIST}` -f `native_path ${ASMTOOLS_SRC}/build/build.xml`
173 ASMTOOLS_JAR=${ASMTOOLS_DIST}/binaries/lib/asmtools.jar
174 ASMTOOLS_LICENSE=${ASMTOOLS_SRC}/LICENSE
175
176 # JAVATEST
177 ##########
178
179 JTHARNESS_BUILD_DIR=${BUILD_DIR}/jtharness
180 mkdir -p ${JTHARNESS_BUILD_DIR}
181
182 # Build jtharness
183 JTHARNESS_SRC_ZIP=${JTHARNESS_BUILD_DIR}/source.zip
184 WGet ${CODE_TOOLS_URL}/jtharness/archive/${JTHARNESS_VERSION}.zip ${JTHARNESS_SRC_ZIP}
185 ${UNZIP} ${UNZIP_OPTS} -d ${JTHARNESS_BUILD_DIR} ${JTHARNESS_SRC_ZIP}
186
187 if [ "${JTHARNESS_VERSION}" = "tip" ]; then
188 JTHARNESS_VERSION=`cd ${JTHARNESS_BUILD_DIR} ; ls -d jtharness-* | sed -e 's/jtharness-//'`
189 fi
190
191 JTHARNESS_SRC=${JTHARNESS_BUILD_DIR}/jtharness-${JTHARNESS_VERSION}
192 JTHARNESS_DIST=${JTHARNESS_BUILD_DIR}/build
193 ${ANT} -DBUILD_DIR=`native_path ${JTHARNESS_DIST}` -f `native_path ${JTHARNESS_SRC}/build/build.xml`
194
195 JAVATEST_JAR=${JTHARNESS_DIST}/binaries/lib/javatest.jar
196 JTHARNESS_LICENSE=${JTHARNESS_SRC}/legal/license.txt
197 JTHARNESS_COPYRIGHT=${JTHARNESS_SRC}/legal/copyright.txt
198
199 # JCOV
200 ######
201
202 JCOV_BUILD_DIR=${BUILD_DIR}/jcov
203 mkdir -p ${JCOV_BUILD_DIR}
204
205 # Get jcov dependencies
206 JCOV_DEPS_DIR=${JCOV_BUILD_DIR}/deps
207 mkdir -p ${JCOV_DEPS_DIR}
208
209 ASM_JAR=${JCOV_DEPS_DIR}/asm-6.2.jar
210 ASM_JAR_CHECKSUM='1b6c4ff09ce03f3052429139c2a68e295cae6604'
211 WGet ${MAVEN_REPO_URL}/org/ow2/asm/asm/6.2/asm-6.2.jar ${ASM_JAR}
212 echo "${ASM_JAR_CHECKSUM} ${ASM_JAR}" | ${SHASUM} --check -
213
214 ASM_TREE_JAR=${JCOV_DEPS_DIR}/asm-tree-6.2.jar
215 ASM_TREE_JAR_CHECKSUM='61570e046111559f38d4e0e580c005f75988c0a6'
216 WGet ${MAVEN_REPO_URL}/org/ow2/asm/asm-tree/6.2/asm-tree-6.2.jar ${ASM_TREE_JAR}
217 echo "${ASM_TREE_JAR_CHECKSUM} ${ASM_TREE_JAR}" | ${SHASUM} --check -
218
219 ASM_UTIL_JAR=${JCOV_DEPS_DIR}/asm-utils-6.2.jar
220 ASM_UTIL_JAR_CHECKSUM='a9690730f92cc79eeadc20e400ebb41eccce10b1'
221 WGet ${MAVEN_REPO_URL}/org/ow2/asm/asm-util/6.2/asm-util-6.2.jar ${ASM_UTIL_JAR}
222 echo "${ASM_UTIL_JAR_CHECKSUM} ${ASM_UTIL_JAR}" | ${SHASUM} --check -
223
224 # Build jcov
225 JCOV_SRC_ZIP=${JCOV_BUILD_DIR}/source.zip
226 WGet ${CODE_TOOLS_URL}/jcov/archive/${JCOV_VERSION}.zip ${JCOV_SRC_ZIP}
227 ${UNZIP} ${UNZIP_OPTS} -d ${JCOV_BUILD_DIR} ${JCOV_SRC_ZIP}
228
229 if [ "${JCOV_VERSION}" = "tip" ]; then
230 JCOV_VERSION=`cd ${JCOV_BUILD_DIR} ; ls -d jcov-* | sed -e 's/jcov-//'`
231 fi
232
233 JCOV_SRC=${JCOV_BUILD_DIR}/jcov-${JCOV_VERSION}
234 JCOV_DIST=${JCOV_BUILD_DIR}/build
235 ( cd ${JCOV_SRC}/build
236 ${ANT} -Dresult.dir=`native_path ${JCOV_DIST}` \
237 -Dasm.jar=`native_path ${ASM_JAR}` \
238 -Dasm.checksum=${ASM_JAR_CHECKSUM} \
239 -Dasm.tree.jar=`native_path ${ASM_TREE_JAR}` \
240 -Dasm.tree.checksum=${ASM_TREE_JAR_CHECKSUM} \
241 -Dasm.util.jar=`native_path ${ASM_UTIL_JAR}` \
242 -Dasm.util.checksum=${ASM_UTIL_JAR_CHECKSUM} \
243 -Djavatestjar=`native_path ${JAVATEST_JAR}` \
244 -Dverify.strict= \
245 -f `native_path ${JCOV_SRC}/build/build.xml`
246 )
247
248 JCOV_JAR=${JCOV_DIST}/jcov_3.0/jcov.jar
249 JCOV_NETWORK_SAVER_JAR=${JCOV_DIST}/jcov_3.0/jcov_network_saver.jar
250 JCOV_LICENSE=${JCOV_SRC}/LICENSE
251
252 # JTREG
253 #######
254
255 # Get jtreg dependencies
256 JTREG_DEPS_DIR=${BUILD_DIR}/deps
257 mkdir -p ${JTREG_DEPS_DIR}
258
259 ## JUnit
260 JUNIT_DEPS_DIR=${JTREG_DEPS_DIR}/junit
261 mkdir -p ${JUNIT_DEPS_DIR}
262
263 JUNIT_JAR=${JUNIT_DEPS_DIR}/junit-4.10.jar
264 WGet ${MAVEN_REPO_URL}/junit/junit/4.10/junit-4.10.jar ${JUNIT_JAR}
265 echo "e4f1766ce7404a08f45d859fb9c226fc9e41a861 ${JUNIT_JAR}" | ${SHASUM} --check -
266
267 ${UNZIP} ${UNZIP_OPTS} ${JUNIT_JAR} LICENSE.txt -d ${JUNIT_DEPS_DIR}
268 JUNIT_LICENSE=${JUNIT_DEPS_DIR}/LICENSE.txt
269
270 ## TestNG
271 TESTNG_DEPS_DIR=${JTREG_DEPS_DIR}/testng
272 mkdir -p ${TESTNG_DEPS_DIR}
273
274 TESTNG_JAR=${TESTNG_DEPS_DIR}/testng-6.9.5.jar
275 WGet ${MAVEN_REPO_URL}/org/testng/testng/6.9.5/testng-6.9.5.jar ${TESTNG_JAR}
276 echo "5d12ea207fc47c3f341a3f8ecc88a3eac396a777 ${TESTNG_JAR}" | ${SHASUM} --check -
277
278 TESTNG_LICENSE=${TESTNG_DEPS_DIR}/LICENSE.txt
279 WGet https://raw.githubusercontent.com/cbeust/testng/testng-6.9.5/LICENSE.txt ${TESTNG_LICENSE}
280
281 JCOMMANDER_JAR=${TESTNG_DEPS_DIR}/jcommander-1.72.jar
282 WGet ${MAVEN_REPO_URL}/com/beust/jcommander/1.72/jcommander-1.72.jar ${JCOMMANDER_JAR}
283 echo "6375e521c1e11d6563d4f25a07ce124ccf8cd171 ${JCOMMANDER_JAR}" | ${SHASUM} --check -
284
285
286 ## Set version and build numbers to the latest tagged version by default
287 TAG_INFO=`get_tag_info`
288 if [ -z ${BUILD_NUMBER:-} ]; then
289 BUILD_NUMBER=`echo $TAG_INFO | sed 's/jtreg\([0-9]\.[0-9]\)-\(b[0-9]*\).*/\2/'`
290 fi
291 if [ -z ${BUILD_VERSION:-} ]; then
292 BUILD_VERSION=`echo $TAG_INFO | sed 's/jtreg\([0-9]\.[0-9]\)-\(b[0-9]*\).*/\1/'`
293 fi
294
295 # Build jtreg
296 cd ${ROOT}/make
297 make JUNIT_JAR=`mixed_path ${JUNIT_JAR}` \
298 JUNIT_LICENSE=${JUNIT_LICENSE} \
299 TESTNG_JAR=`mixed_path ${TESTNG_JAR}` \
300 TESTNG_LICENSE=${TESTNG_LICENSE} \
301 JCOMMANDER_JAR=${JCOMMANDER_JAR} \
302 ANT=${ANT} \
303 ANT_JAR=`mixed_path ${ANT_JAR}` \
304 JCOV_JAR=${JCOV_JAR} \
305 JCOV_LICENSE=${JCOV_LICENSE} \
306 JCOV_NETWORK_SAVER_JAR=${JCOV_NETWORK_SAVER_JAR} \
307 JAVATEST_JAR=`mixed_path ${JAVATEST_JAR}` \
308 JTHARNESS_LICENSE=${JTHARNESS_LICENSE} \
309 JTHARNESS_COPYRIGHT=${JTHARNESS_COPYRIGHT} \
310 ASMTOOLS_JAR=${ASMTOOLS_JAR} \
311 ASMTOOLS_LICENSE=${ASMTOOLS_LICENSE} \
312 BUILD_VERSION=${BUILD_VERSION} \
313 BUILD_MILESTONE=${BUILD_MILESTONE:=dev} \
314 BUILD_NUMBER=${BUILD_NUMBER} \
315 JDKHOME=$JAVA_HOME \
316 ${MAKE_ARGS:-}
8686 native_path() {
8787 check_arguments "${FUNCNAME}" 1 $#
8888
89 if [ $CYGWIN -eq 1 ]; then echo $(cygpath -w $1); else echo "$1"; fi
89 if [ $CYGWIN_OR_MSYS -eq 1 ]; then echo $(cygpath -w $1); else echo "$1"; fi
9090 }
9191
9292 mixed_path() {
9393 check_arguments "${FUNCNAME}" 1 $#
9494
95 if [ $CYGWIN -eq 1 ]; then echo $(cygpath -m $1); else echo "$1"; fi
95 if [ $CYGWIN_OR_MSYS -eq 1 ]; then echo $(cygpath -m $1); else echo "$1"; fi
9696 }
9797
9898 ##
330330
331331 setup_shasum
332332
333 case $(uname) in CYGWIN*) CYGWIN=1 ;; *) CYGWIN=0 ;; esac
333 ##
334 # Support for Cygwin and MSYS2 (which may identify as MSYS, MINGW32 or MINGW64 (the default))
335 #
336 case $(uname) in CYGWIN*|MSYS*|MINGW*) CYGWIN_OR_MSYS=1 ;; *) CYGWIN_OR_MSYS=0 ;; esac
337 info "CYGWIN_OR_MSYS=$CYGWIN_OR_MSYS"
2222 # questions.
2323 #
2424
25 JTREG_VERSION=6
25 JTREG_VERSION=6.1
2626
2727 DEFAULT_ANT_VERSION=1.10.8
2828 DEFAULT_ANT_ARCHIVE_CHECKSUM=dbe187ce2963f9df8a67de8aaff3b0a437d06978
925925 JCOV_JAR="${JCOV_JAR}" \
926926 JCOV_LICENSE="${JCOV_LICENSE}" \
927927 JCOV_NETWORK_SAVER_JAR="${JCOV_NETWORK_SAVER_JAR}" \
928 JDKHOME="${JAVA_HOME}" \
928 JDKHOME="$(mixed_path ${JAVA_HOME})" \
929929 JTHARNESS_COPYRIGHT="${JTHARNESS_COPYRIGHT}" \
930930 JTHARNESS_LICENSE="${JTHARNESS_LICENSE}" \
931931 JUNIT_JAR="$(mixed_path "${JUNIT_JAR}")" \
+0
-88
make/display.sh less more
0 #!/bin/sh
1
2 #
3 # Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 #
6 # This code is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License version 2 only, as
8 # published by the Free Software Foundation. Oracle designates this
9 # particular file as subject to the "Classpath" exception as provided
10 # by Oracle in the LICENSE file that accompanied this code.
11 #
12 # This code is distributed in the hope that it will be useful, but WITHOUT
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 # version 2 for more details (a copy is included in the LICENSE file that
16 # accompanied this code).
17 #
18 # You should have received a copy of the GNU General Public License version
19 # 2 along with this work; if not, write to the Free Software Foundation,
20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 #
22 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 # or visit www.oracle.com if you need additional information or have any
24 # questions.
25 #
26
27 # display.sh [-kill]
28 #
29 # A wrapper around optional use of vncserver.
30 #
31 # If available and enabled, a vnc server will be started and its display
32 # name returned. Otherwise $DISPLAY or a default will be returned.
33 # If the -kill option is given the vnc server on $DISPLAY will be killed.
34 #
35 # Set environment variable VNC to false|off|no|0 to disable VNC;
36 # this is useful if you need to debug GUI targets
37
38 #echo debug: VNC=$VNC 1>&2
39 #echo debug: DISPLAY=$DISPLAY 1>&2
40
41 # setup VNC if enabled
42 case "${VNC:-1}" in
43 false|off|no|0 )
44 VNC=0
45 ;;
46 * ) if [ -f $HOME/.vnc/passwd ]; then
47 # put VNC_HOME on front of path, if set
48 # otherwise, try and find vncserver if not on PATH
49 if [ -n "$VNC_HOME" ]; then
50 PATH=$VNC_HOME:$PATH
51 export PATH
52 elif [ -z "`which vncserver`" ]; then
53 if [ -f /usr/dist/exe/vncserver ]; then
54 PATH=/usr/dist/exe:$PATH
55 export PATH
56 fi
57 fi
58 # final check
59 if [ -n "`which vncserver`" ]; then
60 VNC=1
61 else
62 VNC=0
63 fi
64 else
65 # user does not have VNC password set
66 VNC=0
67 fi
68 ;;
69 esac
70
71 # use VNC if enabled and available
72 if [ $VNC = 1 ]; then
73 if [ "$1" = "-kill" ]; then
74 vncserver -kill $DISPLAY
75 else
76 # echo debug: starting VNC 1>&2
77 VNC_SERVERLOG=${BUILDDIR:-../build}/vncserver.log
78 vncserver 2>&1 | tee $VNC_SERVERLOG 1>&2
79 grep 'New .* desktop is' $VNC_SERVERLOG | \
80 sed -e 's/^.*desktop is \(.*\)/\1/'
81 fi
82 else
83 if [ "$1" != "-kill" ]; then
84 echo ${DISPLAY:-`uname -n`:0.0}
85 fi
86 fi
87
6262 ### The following files are for the jtreg and jtdiff tools
6363
6464 JAVAFILES.com.sun.javatest.regtest-tools := \
65 $(shell $(FIND) $(JAVADIR)/com/sun/javatest/regtest -name agent -prune -o -name \*.java -print ) \
66 $(JAVADIR)/java/lang/JTRegModuleHelper.java
65 $(shell $(FIND) $(JAVADIR)/com/sun/javatest/regtest -name agent -prune -o -name \*.java -print )
6766
6867 $(BUILDDIR)/classes.com.sun.javatest.regtest.ok: \
6968 $(JAVAFILES.com.sun.javatest.regtest-tools) \
7675 echo "classes built at `date`" > $@
7776
7877 TARGETS.com.sun.javatest.regtest += $(BUILDDIR)/classes.com.sun.javatest.regtest.ok
78
79
80 JAVAFILES.java.lang := \
81 $(JAVADIR)/java/lang/JTRegModuleHelper.java
82
83 $(BUILDDIR)/classes.java.lang.ok: \
84 $(JAVAFILES.java.lang)
85 CLASSPATH= \
86 $(REGTEST_TOOL_JAVAC) $(REGTEST_TOOL_JAVAC_OPTIONS) $(REGTEST_TOOL_PATCH_JAVA_BASE_OPTIONS) \
87 -d $(CLASSDIR) \
88 -encoding ISO8859-1 \
89 $(JAVAFILES.java.lang)
90 echo "classes built at `date`" > $@
91
92 TARGETS.com.sun.javatest.regtest += $(BUILDDIR)/classes.java.lang.ok
7993
8094
8195 #----------------------------------------------------------------------
00 plugins {
11 id 'java'
2 id 'org.jetbrains.intellij' version '0.7.3'
2 id 'org.jetbrains.intellij' version '1.0'
33 }
44
55 def jtregLib = jtregHome + File.separator + "lib" + File.separator + "jtreg.jar"
2525
2626 // See https://github.com/JetBrains/gradle-intellij-plugin/
2727 intellij {
28 version intellijVersion
2928 plugins = ['java', 'AntSupport', 'TestNG-J']
3029 }
3130
3231 patchPluginXml {
33 changeNotes notes
32 changeNotes = notes
33 sinceBuild = minBuild
34 untilBuild = ''
3435 }
00 jtregHome = /path/to/jtreg
1 intellijVersion = 2021.1.1
2 pluginVersion = 1.12
1 minBuild = 211
2 pluginVersion = 1.13
33 javaLevel = 11
44 notes = <ul>\
5 <li>Fix compatibility with 2020.3</li>\
5 <li>Fix compatibility with 2021.2</li>\
66 </ul>
77 <option name="JAVA_COMMENT" value="true" />
88 </context>
99 </template>
10 <template name="@test /nodynamiccopyright/" value="@test /nodynamioccopyright/&#10;* @bug $BUG_ID$&#10;* @summary $BUG_SUMMARY$&#10;* $JTREG_ACTION$/fail/ref=$GOLDEN_NAME$ -XDrawDiagnostics $FILE_NAME$" description="jtreg header (negative test)" toReformat="false" toShortenFQNames="true">
10 <template name="@test /nodynamiccopyright/" value="@test /nodynamiccopyright/&#10;* @bug $BUG_ID$&#10;* @summary $BUG_SUMMARY$&#10;* $JTREG_ACTION$/fail/ref=$GOLDEN_NAME$ -XDrawDiagnostics $FILE_NAME$" description="jtreg header (negative test)" toReformat="false" toShortenFQNames="true">
1111 <variable name="BUG_ID" expression="groovyScript(&quot;_1 ==~ /T\\d{7}/ ? _1.substring(1).take(7) : 'NNNNNNN'&quot;, fileNameWithoutExtension())" defaultValue="NNNNNNN" alwaysStopAt="true" />
1212 <variable name="BUG_SUMMARY" expression="&quot;Bug summary&quot;" defaultValue="" alwaysStopAt="true" />
1313 <variable name="JTREG_ACTION" expression="&quot;@compile&quot;" defaultValue="" alwaysStopAt="true" />
00 /*
1 * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
1 * Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
22 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33 *
44 * This code is free software; you can redistribute it and/or modify it
7474 private void writeHead() throws IOException {
7575 for (int i = 0; i < size; i++) {
7676 int[] c = testCounts.get(i);
77 int p = c[Status.PASSED];
78 int f = c[Status.FAILED];
79 int e = c[Status.ERROR];
80 int nr = c[Status.NOT_RUN];
77 int passed = c[Status.PASSED];
78 int failed = c[Status.FAILED];
79 int error = c[Status.ERROR];
80 int notRun = c[Status.NOT_RUN];
8181 writeI18N("simple.set", i, table.getColumnName(i));
8282 print(" ");
8383 writeI18N("simple.counts",
84 new Integer(p),
85 new Integer((p > 0) && (f + e + nr > 0) ? 1 : 0),
86 new Integer(f),
87 new Integer((f > 0) && (e + nr > 0) ? 1 : 0),
88 new Integer(e),
89 new Integer((e > 0) && (nr > 0) ? 1 : 0),
90 new Integer(nr));
84 passed,
85 (passed > 0) && (failed + error + notRun > 0) ? 1 : 0,
86 failed,
87 (failed > 0) && (error + notRun > 0) ? 1 : 0,
88 error,
89 (error > 0) && (notRun > 0) ? 1 : 0,
90 notRun);
9191 println();
9292 }
9393 }
256256 ((RegressionSecurityManager) sc).setAllowSetIO(prev);
257257 } else {
258258 //return Status.error(MAIN_SECMGR_BAD);
259 System.setOut(out);
260 System.setErr(err);
259261 }
260262 }
261263 return passed("OK");
2929
3030 public class RegressionSecurityManager extends JavaTestSecurityManager {
3131 /**
32 * Try to install a copy of this security manager. If another security manager is
33 * already installed, the install will fail; a warning message will be written to
34 * the console if the previously installed security manager is not a subtype of
35 * com.sun.javatest.JavaTestSecurityManager.
32 * Try to install a copy of this security manager, up to but not including JDK 18.
33 * If another security manager is already installed, the install will fail;
34 * a warning message will be written to the console if the previously installed
35 * security manager is not a subtype of com.sun.javatest.JavaTestSecurityManager.
3636 * The install can be suppressed by setting the system property
3737 * "javatest.security.noSecurityManager" to true.
3838 */
3939 public static void install() {
40 String sv = System.getProperty("java.specification.version");
41 if (sv != null && sv.matches("[0-9]+")) { // older versions are 1.N
42 int v = Integer.parseInt(sv);
43 if (v >= 18) {
44 // Do not install any security manager for JDK 18 or later;
45 // see JEP 411: Deprecate the Security Manager for Removal
46 return;
47 }
48 }
49
4050 try {
4151 // install our own permissive security manager, to prevent anyone else
4252 // installing a less permissive one.
332332 if (nativeCode && script.getNativeDir() == null)
333333 return error(MAIN_NO_NATIVES);
334334
335 startAction(true);
336
337335 if (script.isCheck()) {
336 startAction(true);
338337 status = passed(CHECK_PASS);
338 endAction(status);
339339 } else {
340340 Lock lock = script.getLockIfRequired();
341341 if (lock != null) lock.lock();
342
343 // Start action after the lock is taken to ensure correct "elapsed time".
344 startAction(true);
345
342346 try {
343347 switch (!othervmOverrideReasons.isEmpty() ? ExecMode.OTHERVM : script.getExecMode()) {
344348 case AGENTVM:
353357 throw new AssertionError();
354358 }
355359 } finally {
360 // End action before releasing the lock.
361 endAction(status);
356362 if (lock != null) lock.unlock();
357363 }
358364 }
359365
360 endAction(status);
361366 return status;
362367 } // run()
363368
00 /*
1 * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
1 * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
22 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33 *
44 * This code is free software; you can redistribute it and/or modify it
3232 * <i>This code is temporary, and should eventually be replaced by
3333 * injecting code into the relevant modules.</i>
3434 */
35 public class JTRegModuleHelper {
35 public final class JTRegModuleHelper {
36
37 // Non-instantiable helper
38 private JTRegModuleHelper() {
39 }
40
3641 /*
3742 * Use reflection to simulate:
3843 * module.implAddExports(packageName, targetModule);
10721072 identification it may be useful to put information such as SCCS ID keywords after the `@test` tag.
10731073
10741074 While not part of the tag specification, some tests use the
1075 string "`/nodynamiccopyright`" after `@test`
1075 string "`/nodynamiccopyright/`" after `@test`
10761076 to indicate that that the file should not be subject to automated
10771077 copyright processing that might affect the operation of the test,
10781078 for example, by affecting the line numbers of the test source code.
6565 -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \
6666 -jdk:$(JDKHOME) \
6767 -agentvm -allowSetSecurityManager:no \
68 $(TESTDIR)/SecurityManager \
68 $(TESTDIR)/SecurityManager/pass \
69 $(TESTDIR)/SecurityManager/error \
6970 2>&1 | tee $(@:%.ok=%)/out.txt
7071 grep "Test results: failed: 5" $(@:%.ok=%)/out.txt
7172 echo "test passed at `date`" > $@
8889 TESTS.jtreg += \
8990 $(BUILDDIR)/SecurityManagerTest_othervm.ok
9091
92 #----------------------------------------------------------------------
93
94 $(BUILDDIR)/SecurityManagerTest_8.ok \
95 $(BUILDDIR)/SecurityManagerTest_14.ok \
96 $(BUILDDIR)/SecurityManagerTest_18.ok: \
97 $(JTREG_IMAGEDIR)/lib/jtreg.jar \
98 $(JTREG_IMAGEDIR)/bin/jtreg
99 $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \
100 -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \
101 -jdk:$(JDK$(@:$(BUILDDIR)/SecurityManagerTest_%.ok=%)HOME) \
102 -agentvm \
103 $(TESTDIR)/SecurityManager/ShowSecurityManager.java
104 case "$(@:$(BUILDDIR)/SecurityManagerTest_%.ok=%)" in \
105 18 ) $(GREP) "SM=null" \
106 $(@:%.ok=%)/work/ShowSecurityManager.jtr ;; \
107 * ) $(GREP) "SM=com.sun.javatest.regtest.agent.RegressionSecurityManager" \
108 $(@:%.ok=%)/work/ShowSecurityManager.jtr ;; \
109 esac
110 if $(GREP) "WARNING: System::setSecurityManager has been called" \
111 $(@:%.ok=%)/work/ShowSecurityManager.jtr ; then \
112 echo "error: warning message found" ; \
113 fi
114 echo "test passed at `date`" > $@
115
116 ifdef JDK8HOME
117 TESTS.jtreg += \
118 $(BUILDDIR)/SecurityManagerTest_8.ok
119 endif
120
121 ifdef JDK14HOME
122 TESTS.jtreg += \
123 $(BUILDDIR)/SecurityManagerTest_14.ok
124 endif
125
126 ifdef JDK18HOME
127 TESTS.jtreg += \
128 $(BUILDDIR)/SecurityManagerTest_18.ok
129 endif
0 /*
1 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 *
4 * This code is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 only, as
6 * published by the Free Software Foundation.
7 *
8 * This code is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * version 2 for more details (a copy is included in the LICENSE file that
12 * accompanied this code).
13 *
14 * You should have received a copy of the GNU General Public License version
15 * 2 along with this work; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19 * or visit www.oracle.com if you need additional information or have any
20 * questions.
21 */
22
23 /*
24 * @test
25 * @run main ShowSecurityManager
26 */
27
28 public class ShowSecurityManager {
29 public static void main(String... args) {
30 System.err.println("SM=" + System.getSecurityManager());
31 }
32 }
105105 $(JTREG_IMAGEDIR)/lib/testng.jar \
106106 $(TESTDIR)/basic/Basic.java \
107107 $(BUILDDIR)/i18n.com.sun.javatest.regtest.ok \
108 $(BASIC.files) \
109 display.sh
108 $(BASIC.files)
110109 $(RM) $(@:%.ok=%/work) $(@:%.ok=%/report)
111110 $(MKDIR) -p $(@:%.ok=%/work/scratch) $(@:%.ok=%/report) $(BUILDDIR)/basic/classes
112111 CLASSPATH="$(CLASSDIR)$(PS)$(JAVADIR)$(PS)$(JAVATEST_JAR)" \
113112 $(JDKJAVAC) -Xlint -Werror -encoding ISO8859-1 -d $(BUILDDIR)/basic/classes $(TESTDIR)/basic/Basic.java
114 DISPLAY=`BUILDDIR=$(BUILDDIR) sh display.sh` export DISPLAY ; \
115 trap "BUILDDIR=$(BUILDDIR) sh `pwd`/display.sh -kill" 0 ; \
116113 cd $(@:%.ok=%/work/scratch) ; \
117114 $(JDKJAVA) \
118115 -cp "../../../basic/classes$(PS)$(ABS_JTREG_IMAGEJARDIR)/jtreg.jar" \
133130 || (cat ../../log ; exit 1)
134131 echo $@ passed at `date` > $@
135132
133 ifndef HEADLESS
136134 INITIAL_TESTS += \
137135 $(BUILDDIR)/Basic.othervm.ok \
138136 $(BUILDDIR)/Basic.agentvm.ok
137 endif
139138
4040 $(GREP) -s 'Test results: passed: 92; failed: 44; error: 87' $(@:%.ok=%.jt.log) > /dev/null
4141 echo $@ passed at `date` > $@
4242
43 ifndef HEADLESS
4344 TESTS.jtreg += $(BUILDDIR)/ReportOnlyTest.ok
45 endif
4446
2424
2525 UCD_FILES := $(shell find $(TESTDIR)/classIsolation -type f )
2626
27 # Up until jtreg 4.2 b08, class files were placed in a shared classes directory.
28 # When enabled in jtreg 4.2 b08 or later, class files are placed in an unshared test-specific directory
29 # See Locations constructor, local variable useUniqueClassDir
30
2731 $(BUILDDIR)/ClassIsolation.disable.b07.ok: $(UCD_FILES) \
2832 $(JTREG_IMAGEDIR)/lib/javatest.jar \
2933 $(JTREG_IMAGEDIR)/lib/jtreg.jar \
3741 -w $(@:%.ok=%)/work \
3842 -r $(@:%.ok=%)/report \
3943 $(TESTDIR)/classIsolation/disable
40 files=`$(FIND) $(@:%.ok=%)/work -name \*.class | grep 'Test.\.d'` ; \
44 files=`$(FIND) $(@:%.ok=%)/work -name patches -prune -o -name \*.class -print | grep 'Test.\.d'` ; \
4145 if [ -n "$$files" ]; then \
4246 echo "Unexpected files found:" ; \
4347 for f in $$files ; do echo $$f ; done ; \
5963 -w $(@:%.ok=%)/work \
6064 -r $(@:%.ok=%)/report \
6165 $(TESTDIR)/classIsolation/disable
62 files=`$(FIND) $(@:%.ok=%)/work -name \*.class | grep 'Test.\.d'` ; \
66 files=`$(FIND) $(@:%.ok=%)/work -name patches -prune -o -name \*.class -print | grep 'Test.\.d'` ; \
6367 if [ -n "$$files" ]; then \
6468 echo "Unexpected files found:" ; \
6569 for f in $$files ; do echo $$f ; done ; \
8084 -w $(@:%.ok=%)/work \
8185 -r $(@:%.ok=%)/report \
8286 $(TESTDIR)/classIsolation/default
83 files=`$(FIND) $(@:%.ok=%)/work -name \*.class | grep 'Test.\.d'` ; \
87 files=`$(FIND) $(@:%.ok=%)/work -name patches -prune -o -name \*.class -print | grep 'Test.\.d'` ; \
8488 if [ -n "$$files" ]; then \
8589 echo "Unexpected files found:" ; \
8690 for f in $$files ; do echo $$f ; done ; \
101105 -w $(@:%.ok=%)/work \
102106 -r $(@:%.ok=%)/report \
103107 $(TESTDIR)/classIsolation/enable
104 files=`$(FIND) $(@:%.ok=%)/work -name \*.class | grep -v 'Test.\.d'` ; \
108 files=`$(FIND) $(@:%.ok=%)/work -name patches -prune -o -name \*.class -print | grep -v 'Test.\.d'` ; \
105109 if [ -n "$$files" ]; then \
106110 echo "Unexpected files found:" ; \
107111 for f in $$files ; do echo $$f ; done ; \
2828 $(JTREG_IMAGEDIR)/lib/javatest.jar \
2929 $(JTREG_IMAGEDIR)/lib/jtreg.jar \
3030 $(JTREG_IMAGE_JAVAHELP_JAR) \
31 $(JTREG_IMAGEDIR)/bin/jtreg \
32 display.sh
31 $(JTREG_IMAGEDIR)/bin/jtreg
3332 $(RM) $(@:%.ok=%)
3433 $(MKDIR) $(@:%.ok=%)
3534 ( echo "testRoot=`cd $(TESTDIR)/env ; pwd`" ; \
4039 echo "test.java.opts="; \
4140 echo "test.jdk=$(JDK6HOME)"; \
4241 echo "compile.jdk=$(JDK6HOME)" ) > $(@:%.ok=%/ref.properties)
43 DISPLAY=`BUILDDIR=$(BUILDDIR) sh display.sh` export DISPLAY ; \
44 trap "BUILDDIR=$(BUILDDIR) sh `pwd`/display.sh -kill" 0 ; \
4542 JT_JAVA=$(JDKHOME) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \
4643 -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \
4744 -jdk:$(JDK6HOME) \
5653 $(JTREG_IMAGEDIR)/lib/javatest.jar \
5754 $(JTREG_IMAGEDIR)/lib/jtreg.jar \
5855 $(JTREG_IMAGE_JAVAHELP_JAR) \
59 $(JTREG_IMAGEDIR)/bin/jtreg \
60 display.sh
56 $(JTREG_IMAGEDIR)/bin/jtreg
6157 $(RM) $(@:%.ok=%)
6258 $(MKDIR) $(@:%.ok=%)
6359 ( echo "testRoot=`cd $(TESTDIR)/env ; pwd`" ; \
6864 echo "test.java.opts=-DJAVA_OPT=java_opt"; \
6965 echo "test.jdk=$(JDK7HOME)"; \
7066 echo "compile.jdk=$(JDK6HOME)" ) > $(@:%.ok=%/ref.properties)
71 DISPLAY=`BUILDDIR=$(BUILDDIR) sh display.sh` export DISPLAY ; \
72 trap "BUILDDIR=$(BUILDDIR) sh `pwd`/display.sh -kill" 0 ; \
7367 JT_JAVA=$(JDKHOME) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \
7468 -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \
7569 -compilejdk:$(JDK6HOME) \
8882 ifneq ($(OS_NAME), windows)
8983 ifdef JDK6HOME
9084 ifdef JDK7HOME
85 ifndef HEADLESS
9186 TESTS.jtreg += \
9287 $(BUILDDIR)/EnvTest.simple.ok \
9388 $(BUILDDIR)/EnvTest.full.ok
9489 endif
9590 endif
9691 endif
92 endif
3434 JTREG_USE_AGENTVM_FOR_SAMEVM=false \
3535 $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \
3636 -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \
37 -jdk:$(JDKHOME) \
37 -jdk:$(JDK8HOME) \
3838 $(@:$(BUILDDIR)/javac/%.ok=-%) \
3939 $(TESTDIR)/javac
4040 echo "test passed at `date`" > $@
4141
42 # test requires access to javac internals, so needs @modules tag to run on JDK 9 or later
43 ifdef JDK8HOME
4244 TESTS.jtreg += \
4345 $(BUILDDIR)/javac/othervm.ok \
4446 $(BUILDDIR)/javac/agentvm.ok
47 endif
4548
3434 JT_JAVA=$(JDK6HOME) \
3535 $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \
3636 -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \
37 -jdk:$(JDK11HOME) \
37 -jdk:$(JDK1_1HOME) \
3838 $(TESTDIR)/jdk11/ExecuteTest.java
3939 echo "test passed at `date`" > $@
4040
4747 JT_JAVA=$(JDK6HOME) \
4848 $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \
4949 -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \
50 -compilejdk:$(JDK11HOME) \
50 -compilejdk:$(JDK1_1HOME) \
5151 -jdk:$(JDK6HOME) \
5252 $(TESTDIR)/jdk11/ExecuteTest.java
5353 echo "test passed at `date`" > $@
5454
55 ifneq ($(JDK11HOME),)
55 ifdef JDK1_1HOME
56 ifdef JDK6HOME
5657 TESTS.jtreg += \
5758 $(BUILDDIR)/JDK11Test.1.ok \
5859 $(BUILDDIR)/JDK11Test.2.ok
5960 endif
61 endif
6062
0 /*
1 * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 *
4 * This code is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 only, as
6 * published by the Free Software Foundation.
7 *
8 * This code is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * version 2 for more details (a copy is included in the LICENSE file that
12 * accompanied this code).
13 *
14 * You should have received a copy of the GNU General Public License version
15 * 2 along with this work; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19 * or visit www.oracle.com if you need additional information or have any
20 * questions.
21 */
22
23 /*
24 * @test
25 * @summary checks that user modules can be used as library classes by tests
26 * @library /libs/usermods
27 * @build lum1/*
28 * @run main UseUserModAsLib
29 * @run driver UseUserModAsLib
30 */
31
32 public class UseUserModAsLib {
33 public static void main(String[] args) {
34 new lum1_p1.lum1_p1_C().run();
35 }
36 }
2121 */
2222
2323 module um1 {
24 requires testng;
24 requires org.testng;
2525 exports um1_p1;
2626 }
2121 */
2222
2323 module um2 {
24 requires testng;
24 requires org.testng;
2525 exports um2_p1;
2626 }
3232 $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%)
3333 $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \
3434 -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \
35 -jdk:$(JDKHOME) \
35 -jdk:$(JDK8HOME) \
3636 $(TESTDIR)/refIgnoreLines \
3737 > $(@:%.ok=%/jt.log)
3838 echo "test passed at `date`" > $@
3939
40 ifdef JDK8HOME
4041 TESTS.jtreg += $(BUILDDIR)/RefIgnoreLines_std.ok
42 endif
4143
4244 testRefIgnoreLines: $(BUILDDIR)/RefIgnoreLines_std.ok
4345
5153 $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%)
5254 $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \
5355 -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \
54 -jdk:$(JDKHOME) \
56 -jdk:$(JDK8HOME) \
5557 -Xmx100m \
5658 $(TESTDIR)/refIgnoreLines \
5759 > $(@:%.ok=%/jt.log)
5860 echo "test passed at `date`" > $@
5961
62 ifdef JDK8HOME
6063 TESTS.jtreg += $(BUILDDIR)/RefIgnoreLines_Xmx.ok
64 endif
65
6166 testRefIgnoreLines: $(BUILDDIR)/RefIgnoreLines_Xmx.ok
6267
6368 #------------------------------------------------------------
7277 $(@:$(BUILDDIR)/RefIgnoreLines_%_1.ok=%)=-Xmx100m \
7378 $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \
7479 -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \
75 -jdk:$(JDKHOME) \
80 -jdk:$(JDK8HOME) \
7681 -e:$(@:$(BUILDDIR)/RefIgnoreLines_%_1.ok=%) \
7782 $(TESTDIR)/refIgnoreLines \
7883 > $(@:%.ok=%/jt.log)
7984 $(GREP) 'Ignoring line: Picked up' $(@:%.ok=%)/work/Test.jtr
8085 echo "test passed at `date`" > $@
8186
87 ifdef JDK8HOME
8288 TESTS.jtreg += \
8389 $(BUILDDIR)/RefIgnoreLines_JAVA_TOOL_OPTIONS_1.ok \
8490 $(BUILDDIR)/RefIgnoreLines__JAVA_OPTIONS_1.ok
91 endif
8592
8693 testRefIgnoreLines: \
8794 $(BUILDDIR)/RefIgnoreLines_JAVA_TOOL_OPTIONS_1.ok \
98105 $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%)
99106 $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \
100107 -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \
101 -jdk:$(JDKHOME) \
108 -jdk:$(JDK8HOME) \
102109 -e:$(@:$(BUILDDIR)/RefIgnoreLines_%_2.ok=%)=-Xmx100m \
103110 $(TESTDIR)/refIgnoreLines \
104111 > $(@:%.ok=%/jt.log)
105112 $(GREP) 'Ignoring line: Picked up' $(@:%.ok=%)/work/Test.jtr
106113 echo "test passed at `date`" > $@
107114
115
116 ifdef JDK8HOME
108117 TESTS.jtreg += \
109118 $(BUILDDIR)/RefIgnoreLines_JAVA_TOOL_OPTIONS_2.ok \
110119 $(BUILDDIR)/RefIgnoreLines__JAVA_OPTIONS_2.ok
120 endif
111121
112122 testRefIgnoreLines: \
113123 $(BUILDDIR)/RefIgnoreLines_JAVA_TOOL_OPTIONS_2.ok \
3131 $(BUILDDIR)/RerunTest.agentvm.ok \
3232 $(BUILDDIR)/RerunTest.othervm.ok: \
3333 $(JTREG_IMAGEDIR)/lib/jtreg.jar \
34 $(JTREG_IMAGEDIR)/bin/jtreg \
35 display.sh
34 $(JTREG_IMAGEDIR)/bin/jtreg
3635 $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%)
37 DISPLAY=`BUILDDIR=$(BUILDDIR) sh display.sh` export DISPLAY ; \
38 trap "BUILDDIR=$(BUILDDIR) sh `pwd`/display.sh -kill" 0 ; \
3936 unset GNOME_DESKTOP_SESSION_ID ; \
4037 unset XMODIFIERS ; \
4138 LANG=en_US.UTF-8 TZ=GMT+0.00 \
6461 -e "s|`cd $(JDK8HOME); pwd -P`|%JDKHOME%|g" \
6562 -e 's|$(BUILDDIR)|%BUILD%|g' \
6663 -e 's|$(ABSTOPDIR)|%WS%|g' \
64 -e 's|%BUILD%.images.jtreg.lib.guice\.jar.||g' \
65 -e 's|%BUILD%.images.jtreg.lib.hamcrest\.jar.||g' \
6766 -e 's|%BUILD%.images.jtreg.lib.jcommander\.jar.||g' \
6867 > $(@:%.ok=%)/out/$${i%.*}.out ; \
6968 diff -c $(TESTDIR)/rerun/$${i%.*}.$(@:$(BUILDDIR)/RerunTest.%.ok=%).out \
7372
7473 ifdef JDK8HOME
7574 ifneq ($(OS_NAME), windows)
75 ifndef HEADLESS
7676 TESTS.jtreg += \
7777 $(BUILDDIR)/RerunTest.agentvm.ok \
7878 $(BUILDDIR)/RerunTest.othervm.ok
7979 endif
8080 endif
81 endif
2222 # questions.
2323 #
2424
25 # Tests use pre-module features, such as bootclasspath
26
2527 $(BUILDDIR)/RerunTest2.ok: \
2628 $(TESTDIR)/rerun2/RerunTest2.java \
2729 $(JTREG_IMAGEDIR)/lib/jtreg.jar \
3032 $(JTREG_IMAGEDIR)/bin/jtreg
3133 $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%)
3234 $(MKDIR) $(@:%.ok=%)/classes
33 $(JDKJAVAC) \
35 $(JDK8HOME)/bin/javac \
3436 -d $(@:%.ok=%)/classes \
3537 -cp $(JTREG_IMAGEDIR)/lib/jtreg.jar \
3638 -Xlint -Werror \
3739 $(TESTDIR)/rerun2/RerunTest2.java
38 cd $(@:%.ok=%) && $(JDKJAVA) \
40 cd $(@:%.ok=%) && $(JDK8HOME)/bin/java \
3941 -classpath classes$(PS)$(JTREG_IMAGEDIR)/lib/jtreg.jar \
4042 RerunTest2 \
4143 ../$(TESTDIR)/rerun2/test
4244 echo "test passed at `date`" > $@
4345
46 ifdef JDK8HOME
4447 ifneq ($(OS_NAME), windows)
4548 TESTS.jtreg += \
4649 $(BUILDDIR)/RerunTest2.ok
4750 endif
51 endif
4852
4953
0 #
1 # Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
2 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 #
4 # This code is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU General Public License version 2 only, as
6 # published by the Free Software Foundation. Oracle designates this
7 # particular file as subject to the "Classpath" exception as provided
8 # by Oracle in the LICENSE file that accompanied this code.
9 #
10 # This code is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 # version 2 for more details (a copy is included in the LICENSE file that
14 # accompanied this code).
15 #
16 # You should have received a copy of the GNU General Public License version
17 # 2 along with this work; if not, write to the Free Software Foundation,
18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 #
20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 # or visit www.oracle.com if you need additional information or have any
22 # questions.
23 #
24
25 $(BUILDDIR)/TestSanityTest.ok:
26 $(RM) $(@:%.ok=%)
27 $(MKDIR) -p $(@:%.ok=%)
28 $(FIND) $(TOPDIR)/make $(TOPDIR)/test -name \*.gmk | \
29 xargs $(GREP) -o 'JDK[1-9][0-9_]*HOME' | $(SED) -e 's/.*://' | $(SORT) -u \
30 > $(@:%.ok=%/refs.txt)
31 $(GREP) -o 'JDK[1-9][0-9_]*HOME' $(TOPDIR)/make/Makefile | $(SED) -e 's/.*://' | $(SORT) -u \
32 > $(@:%.ok=%/sanity.txt)
33 if $(DIFF) $(@:%.ok=%/refs.txt) $(@:%.ok=%/sanity.txt) ; then \
34 echo "expected defs found" ; \
35 else \
36 echo "differences found" ; exit 1 ; \
37 fi
38 echo "test passed at `date`" > $@
39
40 TESTS.jtreg += $(BUILDDIR)/TestSanityTest.ok
4040 $(TESTDIR)/testng-junit \
4141 > $(@:%.ok=%/jt.log) 2>&1
4242 $(GREP) -s 'Test results: passed: 2' $(@:%.ok=%/jt.log) > /dev/null
43 $(GREP) -s 'Total tests run: 3, Failures: 0, Skips: 0' $(@:%.ok=%/work)/testng/p/T1.jtr > /dev/null
44 $(GREP) -s 'Total tests run: 3, Failures: 0, Skips: 0' $(@:%.ok=%/work)/testng/p/T2.jtr > /dev/null
43 $(GREP) -s 'Total tests run: 3, Passes: 3, Failures: 0, Skips: 0' $(@:%.ok=%/work)/testng/p/T1.jtr > /dev/null
44 $(GREP) -s 'Total tests run: 3, Passes: 3, Failures: 0, Skips: 0' $(@:%.ok=%/work)/testng/p/T2.jtr > /dev/null
4545 echo $@ passed at `date` > $@
4646
4747 ifdef JDK8HOME
3131 $(JTREG_IMAGEDIR)/lib/jtreg.jar \
3232 $(JTREG_IMAGEDIR)/bin/jtreg
3333 $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \
34 -jdk:$(JDKHOME) -Dfoo=bar -Xbootclasspath/p:baz \
34 -jdk:$(JDK8HOME) -Dfoo=bar -Xbootclasspath/p:baz \
3535 -w:$(BUILDDIR)/jtreg/cmd.othervm/work \
3636 -r:$(BUILDDIR)/jtreg/cmd.othervm/report \
3737 -verbose:fail \
3838 $(TESTDIR)/vmopts
3939 ifdef ANT
40 JAVA_HOME=$(JDKHOME) $(ANT) -f $(TESTDIR)/vmopts/build.xml \
40 JAVA_HOME=$(JDK8HOME) $(ANT) -f $(TESTDIR)/vmopts/build.xml \
4141 -Dbuild.jtreg=$(BUILDDIR)/jtreg \
4242 -Djtreg.jar=$(JTREG_IMAGEDIR)/lib/jtreg.jar \
43 -Dtestjdk=$(JDKHOME)
43 -Dtestjdk=$(JDK8HOME)
4444 endif
4545 echo "test passed at `date`" > $@
4646
47 ifdef JDK8HOME
4748 TESTS.jtreg += $(BUILDDIR)/TestVMOpts.ok
49 endif
4850
51