Skip to content

Commits on Source 9

repo: 9f51ef22f00a3d5b681472cacf3ce15868073103
node: 746c6d1328721541d3b16154c25a0179fbf53f7c
node: 7a38f21e077821a5015792e85b3793c90c81b866
branch: default
tag: jtreg4.2-b10
tag: jtreg4.2-b13
......@@ -23,3 +23,6 @@ dbccea90c34dacf7e0824d5e3d3e9e1e930a103a jtreg4.2-b02
26d8a4a47674c4ca304b9e290dccca1dd1c7224f jtreg4.2-b07
cce0ac75e87864ed365a420fb836a4430421ab0f jtreg4.2-b08
684f12eef4a8c2f42afe2abe3d79eead72efcc5f jtreg4.2-b09
746c6d1328721541d3b16154c25a0179fbf53f7c jtreg4.2-b10
a13ec77e7adcc4c9ed434e664abc350abaacc045 jtreg4.2-b11
652902f7fb0ed0b4f307d61a799caf50a6e609be jtreg4.2-b12
Building The Regression Test Harness for the OpenJDK platform: jtreg
There are two ways to build jtreg. The first way uses GNU Make to build jtreg
and run all the tests. The second way uses Ant, and is primarily intended for
developers using an IDE such as NetBeans. Not all of the tests are available
using the Ant build.
(This information is also available at http://openjdk.java.net/jtreg/build.html)
jtreg depends on a number of external components:
JT Harness, TestNG, JUnit, AsmTools. Ant, and JCov.
The fundamental way to build jtreg is with GNU make, specifying where to find
those external components, but a script is also available that will download
appropriate copies of those components before building jtreg.
Building jtreg with the build-all.sh script
This is the recommended way to build jtreg, for those that want a simple,
basic way to build jtreg.
The script is intended to be run in a Unix-like shell, such as bash on Linux or
MacOS, or with Cygwin on Windows. It takes one argument which is the
installation of JDK to be used to build jtreg. In addition, Ant must be on your
execution path as well as a suitable version of Java to run Ant. The version of
JDK must be either JDK 7 or JDK 8.
% cd jtreg-root-directory
% sh make/build-all.sh JDK-directory
The script will create a build sub-directory, download and build dependencies,
and finally build jtreg itself. The resulting image will be in
build/images/jtreg.
No environment variables need to be specified to get a standard build of jtreg.
However, the following environment variables may be set, for a non-standard
build:
ASMTOOLS_VERSION, JCOV_VERSION, JTHARNESS_VERSION
These variables may be set to the name of a tag identifying a specific
changeset in the corresponding OpenJDK repository, or to the pseudo-tag "tip".
MAKE_ARGS
Arguments for the internal invocation of "make". The default is to just build
jtreg, but setting this environment variable allows additional targets, such
as test targets, to be run. The explicit target to build jtreg is "build";
the target to run some basic sanity tests is "quick-test"; and the target
to run all tests is "test". You can also use the make "-j" option to build
targets in parallel. For example:
MAKE_ARGS="-j 4 build quick-test" sh make/build-all.sh
UNZIP_OPTS, WGET_OPTS
These two variables default to "-q", to suppress unnecessary output.
You can set these variables to change the default behavior.
Building jtreg with GNU Make
The Makefile is in make/Makefile, and creates deliverables in the build/
directory, similar to OpenJDK. By default, the build file builds jtreg and runs
the tests. You can build jtreg from a Unix-like command shell with the following
directory, similar to OpenJDK. By default, the build file just builds an image
for jtreg. You can build jtreg from a Unix-like command shell with the following
commands:
% cd jtreg-root-directory
% cd <jtreg-root-directory>
% make -C make
Dependencies
jtreg has a number of build dependencies. These can be set with values on the
make command line or with values in make/Defs.gmk.
make command line or with values in make/Defs.gmk. You can also include the
appropriate license files in the jtreg image, by setting the appropriate make
variables. These are documented in make/Defs.gmk
JDK 1.7 (or better)
Set JDK17HOME to the JDK or equivalent used to build jtreg. It must be
Set JDKHOME to the JDK or equivalent used to build jtreg. It must be
equivalent to JDK 1.7 or later.
JavaHelp
See https://javahelp.dev.java.net/. Set JAVAHELP_HOME to an installed copy
of JavaHelp. It should be version 2.0_01 or better.
JT Harness
See https://jtharness.dev.java.net/. Set JTHARNESS_HOME to the installed
copy of the version of JT Harness to be used. It should be version 4.1.3 or
better. (Note, the license changed for version 4.1.3.) See the notes below
on building JT Harness from source for use in jtreg.
Note: there is a bug in JT Harness 4.1.3 which causes some of the jtreg self
tests to fail. These are run automatically if you build jtreg with the
default "all" target. The bug affects the ability to run tests in the root
directory of a test suite. (This does not apply to OpenJDK test suites.) To
work around this issue, you can either download and build JT Harness 4.1.3a
from source, or you can use version 4.1.3 and just build jtreg, with the
"build" target, and avoid running the jtreg self tests invoked by the "test"
target in the Makefile.
Xalan
See http://xml.apache.org/xalan-j/. This is used while building jtreg to
process XML files.
See https://wiki.openjdk.java.net/display/CodeTools/JT+Harness.
Set JTHARNESS_HOME to the installed copy of the version of JT Harness to be
used. It should be version 5.0 or better.
The following dependencies are optional.
Ant
See http://ant.apache.org/. Set ANTHOME to an installed copy of Ant. It
should be version 1.9.x. or better.
AsmTools
See https://wiki.openjdk.java.net/display/CodeTools/asmtools.
Set ASMTOOLS_HOME to the installed copy of the version of AsmTools to be
used. It should be version 6.0 or better.
Note: Do not confuse this component with ASM bytecode engineering library
available at http://asm.ow2.org/
HTMLCheck
This uses nsgmlns, available from http://www.jclark.com/sp/, and DTDs,
available from http://w3c.org/ to validate HTML documentation files.
Set HTMLCHECK to an HTML validation program. It should take a single file
as argument, and exit with a zero return code for a valid file, and non-zero
for an invalid one. This is optional, and if available, it will be used
while building jtreg. It may be left unset to ignore the checks.
JUnit
See http://junit.org/. The recommended version is currently JUnit 4.10.
TestNG
See http://testng.org/. The recommended version is currently 6.9.5.
The following dependencies are optional.
LinkLint
See http://www.linklint.org/. This is used to validate the links in HTML
documentation files. Set LINKLINT to your installed copy of LinkLint.
This is optional, and if available, it will be used while building jtreg.
It may be left unset to ignore the checks.
JCov
See https://wiki.openjdk.java.net/display/CodeTools/jcov.
Set JCOV_HOME to the installed copy of the version of JCov to be used.
It should be version 2.0 or better.
The following dependencies are only required when running the tests for jtreg.
(Note: this only applies to the tests for jtreg itself; these dependencies are
not required when using jtreg to run the JDK regression tests.
JDK 1.5
This is used when running some of the tests. Set JDK15HOME to run these
tests. It need not be set if you are just building jtreg.
JDK 1.6
This is used when running some of the tests. Set JDK16HOME to run these
tests. It must be equivalent to JDK 1.6 or later. It need not be set if you are
just building jtreg.
tests. It need not be set if you are just building jtreg.
Ant
See http://ant.apache.org/. Set ANTHOME to an installed copy of Ant. This is
used when running some of the tests. It should be version 1.6.5. or better.
It need not be set if you are just building jtreg.
JDK 1.7
This is used when running some of the tests. Set JDK17HOME to run these
tests. It need not be set if you are just building jtreg.
Running Tests
JDK 1.8
This is used when running some of the tests. Set JDK18HOME to run these
tests. It need not be set if you are just building jtreg.
JDK 1.9
This is used when running some of the tests. Set JDK19HOME to run these
tests. It need not be set if you are just building jtreg.
Running jtreg Self-Tests
The tests can be invoked with individual make targets, or collectively via the
"test" target.
......@@ -90,8 +132,8 @@ are running. Various implementations of VNC are available, such as from
http://www.realvnc.com/. Using VNC is optional; it is not required in order to
run the tests.
By default, VNC will be used if vncserver is found on your execution path, or if
VNC_HOME points to an installed copy of VNC. To explicitly disable the use of
By default, VNC will be used if vncserver is found on your execution path, or
if VNC_HOME points to an installed copy of VNC. To explicitly disable the use of
VNC, set the VNC environment variable to one of false, off, no, or 0. Unless
explicitly disabled, the tests will check the following:
......@@ -108,9 +150,13 @@ complete.
The logic for using VNC is encapsulated within the script make/display.sh.
Building jtreg with Ant
It is possible to build jtreg with Ant, but this is primarily intended as a
convenience while working on the jtreg source code. If you are building jtreg
to run OpenJDK tests, it is recommended that you build jtreg using the Makefile,
perhaps via the build-all.sh wrapper script.
The build file is in make/build.xml; it creates intermediate files in the build/
directory and deliverables in the dist/ directory. By default, the build file
just builds jtreg, but does not run any tests. You can build jtreg from a
......@@ -130,35 +176,8 @@ For example, on Ubuntu Linux these tasks are in the ant-optional package.
Running Tests
Some of the tests can be invoked with individual targets beginning "test-", or
collectivly via the "test-jtreg" target.
Building JT Harness for jtreg
JT Harness has build-time dependencies on a number of components, some of which
may cause issues. There are workarounds available which allow you to build
JT Harness while not affecting its use for jtreg.
JUnit 4
If your system does not yet support JUnit 4, you can build JT Harness
without needing to install JUnit 4 by executing the "jar" and "dist-doc"
targets instead of the default "build" target. This will avoid building the
jar file which references JUnit 4. The jar file (jt-junit.jar) is not
required when running jtreg.
The Java Communications API (also known as javax.comm)
This API is not widely available under an OSI-approved license. There is a
replacement known as "librxtx-java" which provides the same functionality
in the "gnu.io" package. To use this package, you will have to edit the
JT Harness source code so that references to "javax.comm." are replaced
by references to "gnu.io.". These references are all in the
"com.sun.javatest.agent" package. These changes are just required to
compile JT Harness. The resulting classes are not required when running
jtreg itself.
Note: if you are building jtreg with GNU Make, and want to run all the self
tests for jtreg, you should make sure you use a patched version of JT Harness,
available on the JT Harness 4.1.3a development branch (or later). The patch
fixes a bug which is exhibited when the jtreg self tests are run. It does not
affect the use of jtreg to run the OpenJDK regression tests.
Some of the tests can be invoked with individual targets beginning
"-jtreg-test-", or collectively via the "jtreg-test" target. (The use of
"jtreg-test" rather than "test" is to protect against interactions with JUnit in
older versions of NetBeans.)
jtreg (4.2-b13-1) unstable; urgency=medium
* Team upload.
* New upstream release
- Refreshed the patches
* Standards-Version updated to 4.2.0
* Switch to debhelper level 11
* Use salsa.debian.org Vcs-* URLs
-- Emmanuel Bourg <ebourg@apache.org> Thu, 02 Aug 2018 09:16:44 +0200
jtreg (4.2-b10-1) unstable; urgency=medium
* Team upload.
......
......@@ -3,16 +3,16 @@ Section: java
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
Uploaders: Guillaume Mazoyer <respawneral@gmail.com>
Build-Depends: debhelper (>= 10), javahelper, help2man
Build-Depends: debhelper (>= 11~), javahelper, help2man
Build-Depends-Indep: default-jdk,
libjtharness-java,
ant,
javahelp2,
libxalan2-java,
testng
Standards-Version: 4.1.1
Vcs-Git: https://anonscm.debian.org/git/pkg-java/jtreg.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/jtreg.git
Standards-Version: 4.2.0
Vcs-Git: https://salsa.debian.org/java-team/jtreg.git
Vcs-Browser: https://salsa.debian.org/java-team/jtreg
Homepage: http://openjdk.java.net/jtreg
Package: jtreg
......
......@@ -14,7 +14,7 @@ Forwarded: no
SearchPath classpath = paths.get(PathKind.CLASSPATH);
--- a/src/share/classes/com/sun/javatest/regtest/exec/RegressionScript.java
+++ b/src/share/classes/com/sun/javatest/regtest/exec/RegressionScript.java
@@ -712,16 +712,20 @@
@@ -732,16 +732,20 @@
File md = workDir.getFile("modules");
if (needJUnit)
install(params.getJUnitPath(), md);
......@@ -37,7 +37,7 @@ Forwarded: no
}
// Extras:
@@ -813,8 +817,10 @@
@@ -833,8 +837,10 @@
File md = workDir.getFile("modules");
if (needJUnit)
install(params.getJUnitPath(), md);
......@@ -49,7 +49,7 @@ Forwarded: no
mp.append(md);
}
} else {
@@ -822,8 +828,10 @@
@@ -842,8 +848,10 @@
if (needJUnit)
fp.append(params.getJUnitPath());
......
#
# Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -79,10 +79,12 @@ override BUILDDIR := $(call FullPath, $(BUILDDIR))
#----------------------------------------------------------------------
#
# Parameters to control what to build with
# explicit JDK versions, for use as needed
# Parameters to control what to build and test with.
#----- Java: see http://java.sun.com
#----- Java: http://openjdk.java.net/ http://jdk.java.net/
#
# Explicit JDK versions, for use as needed by tests, all optional for build.
# At a minimum, JDKHOME must be set, either directly or indirectly. (See below).
ifndef JDK15HOME
ifdef SLASHJAVA
......@@ -117,111 +119,225 @@ ifndef JDK9HOME
JDK9HOME = $(SLASHJAVA)/re/jdk/9/promoted/latest/binaries/linux-i586
endif
endif
JDK9HOME := $(call FullPath,$(JDK19HOME))
JDK9HOME := $(call FullPath,$(JDK9HOME))
# The JDK used to build jtreg and to run most tests.
# It should be set to JDK 7 or later.
# If not set, it defaults to $(JDK18HOME), or to $(J2SEHOME) for backwards
# compatibility
ifndef JDKHOME
ifdef JDK18HOME
JDKHOME = $(JDK18HOME)
else
ifdef J2SEHOME
JDKHOME = $(J2SEHOME)
endif
endif
endif
# J2SE for most classes
J2SEHOME = $(JDK17HOME)
J2SEJAVA = $(J2SEHOME)/bin/java
J2SEJAVAC = $(J2SEHOME)/bin/javac
JAR = $(J2SEHOME)/bin/jar
# derived values
JDKJAVA = $(JDKHOME)/bin/java
JDKJAVAC = $(JDKHOME)/bin/javac
JAR = $(JDKHOME)/bin/jar
ifdef JDK15HOME
JDK15_BOOTCLASSPATH = -bootclasspath $(JDK15HOME)/jre/lib/rt.jar
endif
ifdef JDK17HOME
JDK17_BOOTCLASSPATH = -bootclasspath $(JDK17HOME)/jre/lib/rt.jar
endif
# for files needed to run othervm tests on oldest supported platforms
REGTEST_OLD_JAVAC = $(JDK17HOME)/bin/javac
REGTEST_OLD_JAVAC_OPTIONS = -source 1.2 -target 1.1 -Xlint:all,-options -Werror
REGTEST_OLD_JAVAC = $(JDKHOME)/bin/javac
REGTEST_OLD_JAVAC_OPTIONS = \
-source 1.2 -target 1.1 $(JDK15_BOOTCLASSPATH) -Xlint:all,-options -Werror
# for files needed to run agentvm tests (on platforms back to JDK 1.5)
REGTEST_AGENT_JAVAC = $(JDK17HOME)/bin/javac
REGTEST_AGENT_JAVAC_OPTIONS = -source 5 -target 5 -Xlint:all,-options -Werror
REGTEST_AGENT_JAVAC = $(JDKHOME)/bin/javac
REGTEST_AGENT_JAVAC_OPTIONS = \
-source 5 -target 5 $(JDK15_BOOTCLASSPATH) -Xlint:all,-options -Werror
# for files needed for jtreg tool
REGTEST_TOOL_JAVAC = $(J2SEHOME)/bin/javac
REGTEST_TOOL_JAVAC_OPTIONS = -source 7 -target 7 -Xlint:all,-options -Werror
REGTEST_TOOL_JAVAC = $(JDKHOME)/bin/javac
REGTEST_TOOL_JAVAC_OPTIONS = \
-source 7 -target 7 $(JDK17_BOOTCLASSPATH) -Xlint:all,-options -Werror
#----- JavaHelp
#
# JavaHelp, previously available at https://javahelp.dev.java.net/,
# is no longer supported or generally available.
# If you use JT Harness 5.0 or later, you do not need JavaHelp.
# If you use JT Harness 4.6 (in order to test on very old versions of JDK),
# you will need JavaHelp.
ifndef JAVAHELP_HOME
ifdef SLASHJAVA
JAVAHELP_HOME = $(SLASHJAVA)/re/jh/2.0_01/promoted/fcs/latest/binaries/jh2.0/javahelp
endif
endif
ifndef JAVAHELP_JAR
ifdef JAVAHELP_HOME
JAVAHELP_HOME := $(call FullPath,$(JAVAHELP_HOME))
JAVAHELP_JAR = $(JAVAHELP_HOME)/lib/jh.jar
endif
endif
JAVAHELP_JAR := $(call FullPath,$(JAVAHELP_JAR))
#----- JavaTest: see https://wiki.openjdk.java.net/display/CodeTools/JT+Harness
#----- JavaTest: https://wiki.openjdk.java.net/display/CodeTools/JT+Harness
#
# At a minimum, JAVATEST_JAR must be set, either directly or indirectly.
# If not set explicitly, it defaults to values derived from JAVATEST_HOME,
# JTHARNESS_HOME or SLASH_JAVA.
# Set JTHARNESS_LICENSE and JTHARNESS_COPYRIGHT to include license and
# copyright files in the product image. If not set explicitly, these
# default to values derived from JAVATEST_HOME, JTHARNESS_HOME or SLASH_JAVA.
ifndef JTHARNESS_HOME
ifdef SLASHJAVA
JTHARNESS_HOME = $(SLASHJAVA)/re/jtharness/4.6/archive/MR1/binaries
JTHARNESS_HOME = $(SLASHJAVA)/re/jtharness/6.0/promoted/latest/binaries/
endif
endif
JTHARNESS_HOME := $(call FullPath,$(JTHARNESS_HOME))
ifndef JAVATEST_HOME
ifdef JTHARNESS_HOME
JAVATEST_HOME = $(JTHARNESS_HOME)
else
ifdef SLASHJAVA
JAVATEST_HOME = $(SLASHJAVA)/re/javatest/4.6/archive/binaries/javatest
JAVATEST_HOME = $(SLASHJAVA)/re/javatest/6.0/promoted/latest/binaries/javatest/
endif
endif
endif
JAVATEST_HOME := $(call FullPath,$(JAVATEST_HOME))
ifndef JAVATEST_JAR
ifdef JAVATEST_HOME
JAVATEST_JAR = $(JAVATEST_HOME)/lib/javatest.jar
endif
endif
JAVATEST_JAR := $(call FullPath,$(JAVATEST_JAR))
ifndef JTHARNESS_LICENSE
JTHARNESS_LICENSE = $(wildcard $(JTHARNESS_HOME)/legal/license.txt)
endif
JTHARNESS_LICENSE := $(call FullPath,$(JTHARNESS_LICENSE))
#----- JCov 2.0
ifndef JTHARNESS_COPYRIGHT
JTHARNESS_COPYRIGHT = $(wildcard $(JTHARNESS_HOME)/legal/copyright.txt)
endif
JTHARNESS_COPYRIGHT := $(call FullPath,$(JTHARNESS_COPYRIGHT))
#----- JCov 3.0: https://wiki.openjdk.java.net/display/CodeTools/jcov
#
# JCov is optional.
# If provided, coverage-collection features in jtreg will be enabled.
#
# To include support for JCov, JCOV_JAR and JCOV_NETWORK_SAVER_JAR
# must be set. If not set explicitly, these default to values derived
# from JCOV_HOME or SLASH_JAVA.
# Set JCOV_LICENSE to include the license file in the product image.
# If not set explicitly, this defaults to a value derived from JCOV_HOME
# or SLASH_JAVA.
ifndef JCOV_HOME
ifdef SLASHJAVA
JCOV_HOME = $(SLASHJAVA)/re/jcov/2.0/promoted/latest/binaries/jcov_2.0/
JCOV_HOME = $(SLASHJAVA)/re/jcov/3.0/promoted/fcs/latest/binaries/jcov_3.0/
endif
endif
JCOV_HOME := $(call FullPath,$(JCOV_HOME))
ifndef JCOV_JAR
ifdef JCOV_HOME
JCOV_JAR = $(JCOV_HOME)/lib/jcov.jar
endif
endif
JCOV_JAR := $(call FullPath,$(JCOV_JAR))
ifndef JCOV_NETWORK_SAVER_JAR
ifdef JCOV_HOME
JCOV_NETWORK_SAVER_JAR = $(JCOV_HOME)/lib/jcov_network_saver.jar
endif
endif
JCOV_NETWORK_SAVER_JAR := $(call FullPath,$(JCOV_NETWORK_SAVER_JAR))
JCOV = $(JDK16HOME)/bin/java -jar $(JCOV_JAR)
ifndef JCOV_LICENSE
ifdef JCOV_HOME
JCOV_LICENSE = $(wildcard $(JCOV_HOME)/LICENSE)
endif
endif
JCOV_LICENSE := $(call FullPath,$(JCOV_LICENSE))
#----- AsmTools 6.0
JCOV = $(JDK16HOME)/bin/java -jar $(JCOV_JAR)
ifndef ASMTOOLS_JAR
ifdef ASMTOOLS_HOME
ASMTOOLS_JAR = $(ASMTOOLS_HOME)/lib/asmtools.jar
else
#----- AsmTools 7.0: https://wiki.openjdk.java.net/display/CodeTools/asmtools
#
# AsmTools is required, to support the execution of tests using
# *.jasm and *.jcod files.
#
# ASMTOOLS_JAR must be set, either directly or indirectly.
# If not set explicitly, it defaults to a value derived from
# ASMTOOLS_HOME or SLASHJAVA.
# Set ASMTOOLS_LICENSE to include the license file in the product image.
# If not set explicitly, this defaults to a value derived from
# ASMTOOLS_HOME or SLASH_JAVA.
ifndef ASMTOOLS_HOME
ifdef SLASHJAVA
ASMTOOLS_JAR = $(SLASHJAVA)/re/asmtools/6.0/promoted/latest/binaries/asmtools-6.0/lib/asmtools.jar
ASMTOOLS_HOME = $(SLASHJAVA)/re/asmtools/7.0/opensource/promoted/latest/binaries/asmtools-7.0
endif
endif
ifndef ASMTOOLS_JAR
ASMTOOLS_JAR = $(ASMTOOLS_HOME)/lib/asmtools.jar
endif
ASMTOOLS_JAR := $(call FullPath,$(ASMTOOLS_JAR))
#----- JUnit 4.10: see http://www.junit.org/
ifndef ASMTOOLS_LICENSE
ASMTOOLS_LICENSE = $(wildcard $(ASMTOOLS_HOME)/LICENSE)
endif
ASMTOOLS_LICENSE := $(call FullPath,$(ASMTOOLS_LICENSE))
#----- JUnit 4.10: http://www.junit.org/
# https://sourceforge.net/projects/junit/files/junit/4.10/junit-4.10.jar/download
#
# JUnit is required, to support the execution of tests using JUnit
#
# JUNIT_JAR must be set, either directly or indirectly.
# If not set explicitly, it defaults to a value derived from
# JUNIT_HOME or SLASHJAVA.
# Set JUNIT_LICENSE to include the license file in the product image.
# If not set explicitly, this defaults to a value derived from
# JUNIT_HOME or SLASH_JAVA.
ifndef JUNIT_HOME
ifdef SLASHJAVA
JUNIT_HOME = $(SLASHJAVA)/devtools/share/junit/junit-4.10/
endif
endif
ifndef JUNIT_JAR
ifdef SLASHJAVA
JUNIT_JAR = $(SLASHJAVA)/devtools/share/junit/junit-4.10/junit-4.10.jar
ifdef JUNIT_HOME
JUNIT_JAR = $(JUNIT_HOME)/junit-4.10.jar
endif
endif
JUNIT_JAR := $(call FullPath,$(JUNIT_JAR))
ifndef JUNIT_LICENSE
ifdef JUNIT_HOME
JUNIT_LICENSE = $(wildcard $(JUNIT_HOME)/LICENSE.txt)
endif
endif
JUNIT_LICENSE := $(call FullPath,$(JUNIT_LICENSE))
#----- TestNG 6.9.5: see http://www.testng.org/
# http://testng.org/doc/download.html
#
# TestNG is required, to support the execution of tests using TestNG
#
# TESTNG_JAR must be set, either directly or indirectly.
# If not set explicitly, it defaults to a value derived from
# TESTNG_HOME or SLASHJAVA.
# Set TESTNG_LICENSE to include the license file in the product image.
# If not set explicitly, this defaults to a value derived from
# TESTNG_HOME or SLASH_JAVA.
ifndef TESTNG_HOME
ifdef SLASHJAVA
......@@ -237,6 +353,11 @@ ifndef TESTNG_JAR
endif
TESTNG_JAR := $(call FullPath,$(TESTNG_JAR))
ifndef TESTNG_LICENSE
TESTNG_LICENSE = $(wildcard $(TESTNG_HOME)/LICENSE.txt)
endif
TESTNG_LICENSE := $(call FullPath,$(JUNIT_LICENSE))
# TestNG requires jcommander, which may or may not be bundled with TESTNG_JAR.
# If it is not, set JCOMMANDER_JAR to an appropriate version
ifndef JCOMMANDER_JAR
......@@ -248,18 +369,27 @@ ifdef JCOMMANDER_JAR
JCOMMANDER_JAR := $(call FullPath,$(JCOMMANDER_JAR))
endif
#----- Ant: see http://ant.apache.org/
#----- Ant: http://ant.apache.org/
#
# Ant is required, to support the provision of a <jtreg> Ant task
#
# ANT_JAR must be set, either directly or indirectly.
# If not set explicitly, it defaults to a value derived from
# ANTHOME or SLASHJAVA. The jar file is just used when building
# jtreg, and is not included in the product image.
ifndef ANTHOME
ifdef SLASHJAVA
ANTHOME = $(SLASHJAVA)/devtools/share/ant/1.7.0
ANTHOME = $(SLASHJAVA)/devtools/share/ant/1.9.4
endif
endif
ANTHOME := $(call FullPath,$(ANTHOME))
ifndef ANT_JAR
ifdef ANTHOME
ANT_JAR = $(ANTHOME)/lib/ant.jar
endif
endif
ANT_JAR := $(call FullPath,$(ANT_JAR))
ifdef ANTHOME
ANT = $(ANTHOME)/bin/ant
......@@ -277,6 +407,7 @@ FIND = /usr/bin/find
GREP := $(shell if [ -r /bin/grep ]; then echo /bin/grep ; else echo /usr/bin/grep ; fi )
LN = /bin/ln
MKDIR = /bin/mkdir
MV = /bin/mv
PERL = /usr/bin/perl
RM = /bin/rm -rf
SED := $(shell if [ -r /bin/sed ]; then echo /bin/sed ; else echo /usr/bin/sed ; fi )
......
#
# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -43,6 +43,12 @@ include Rules.gmk
build: $(BUILDFILES)
test: $(INITIAL_TESTS) $(TESTS) $(FINAL_TESTS)
count=`echo $+ | wc -w` ; \
echo "All ($${count}) selected tests completed successfully"
quick-test: $(INITIAL_TESTS)
count=`echo $+ | wc -w` ; \
echo "All ($${count}) selected tests completed successfully"
images: $(VERBOSEZIPFILES)
......@@ -64,6 +70,7 @@ endif
ifdef JDK18HOME
@echo "JDK18HOME = $(JDK18HOME)"
endif
@echo "JDKHOME = $(JDKHOME)"
ifdef JAVAHELP_HOME
@echo "JAVAHELP_HOME = $(JAVAHELP_HOME)"
endif
......@@ -71,17 +78,20 @@ endif
ifneq ($(JTHARNESS_HOME), $(JAVATEST_HOME))
@echo "JTHARNESS_HOME = $(JTHARNESS_HOME)"
endif
ifdef JCOV_JAR
@echo "JTHARNESS_LICENSE = $(JTHARNESS_LICENSE)"
@echo "JTHARNESS_COPYRIGHT = $(JTHARNESS_COPYRIGHT)"
@echo "JCOV_JAR = $(JCOV_JAR)"
endif
ifdef ASMTOOLS_JAR
@echo "JCOV_LICENSE = $(JCOV_LICENSE)"
@echo "ASMTOOLS_JAR = $(ASMTOOLS_JAR)"
endif
@echo "ASMTOOLS_LICENSE = $(ASMTOOLS_LICENSE)"
@echo "ANTHOME = $(ANTHOME)"
@echo "ANT_JAR = $(ANT_JAR)"
@echo "JUNIT_JAR = $(JUNIT_JAR)"
@echo "JUNIT_LICENSE = $(JUNIT_LICENSE)"
@echo "TESTNG_HOME = $(TESTNG_HOME)"
@echo "TESTNG_JAR = $(TESTNG_JAR)"
@echo "TESTNG_LICENSE = $(TESTNG_LICENSE)"
@echo "JCOMMANDER_JAR = $(JCOMMANDER_JAR)"
#----------------------------------------------------------------------
......
......@@ -59,7 +59,7 @@ endif
ifeq ($(UNAME_S), Darwin)
OS_NAME = macosx
OS_ARCH := $(shell $(UNAME) -m)
OS_VERSION := $(shell $(UNAME) -r)
OS_VERSION := $(shell defaults read loginwindow SystemVersionStampAsString)
endif
ifeq ($(OS_NAME),)
OS_NAME = windows
......@@ -88,13 +88,13 @@ endif
OS_VERSION := $(shell $(ECHO) "$(OS_VERSION)" | $(CUT) -d'.' -f1,2)
# Name to use for x86_64 arch (historically amd64, but should change someday)
OS_ARCH_X64_NAME:=amd64
#OS_ARCH_X64_NAME:=x64
#OS_ARCH_X64_NAME:=amd64
OS_ARCH_X64_NAME:=x64
# Alternate arch names (in case this arch is known by a second name)
# PROBLEM_LISTS may use either name.
OS_ARCH2-amd64:=x64
#OS_ARCH2-x64:=amd64
#OS_ARCH2-amd64:=x64
OS_ARCH2-x64:=amd64
# Try and use the arch names consistently
OS_ARCH:=$(patsubst x64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
......
#
# Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -33,6 +33,16 @@ $(CLASSDIR)/%.properties: $(JAVADIR)/%.properties
if [ ! -d $(@D) ] ; then $(MKDIR) -p $(@D) ; fi
$(CP) $(@:$(CLASSDIR)/%=$(JAVADIR)/%) $@
$(CLASSDIR)/%.gif: $(JAVADIR)/%.gif
$(RM) -f $@
if [ ! -d $(@D) ] ; then $(MKDIR) -p $(@D) ; fi
$(CP) $(@:$(CLASSDIR)/%=$(JAVADIR)/%) $@
$(CLASSDIR)/%.png: $(JAVADIR)/%.png
$(RM) -f $@
if [ ! -d $(@D) ] ; then $(MKDIR) -p $(@D) ; fi
$(CP) $(@:$(CLASSDIR)/%=$(JAVADIR)/%) $@
#---------------------------------------------------------------------
$(CLASSDIR) $(BUILDDIR) $(BUILDDIR)/testClasses $(BUILDDIR)/testWork $(BUILDDIR)/testReport:
......@@ -56,7 +66,7 @@ $(IMAGES_DIR)/%.jar: pkgsToFiles.sh
echo "$(@F:%.jar=%)-Version: $(BUILD_VERSION)" ; \
echo "$(@F:%.jar=%)-Milestone: $(BUILD_MILESTONE)" ; \
echo "$(@F:%.jar=%)-Build: $(BUILD_NUMBER)" ; \
echo "$(@F:%.jar=%)-BuildJavaVersion: `$(J2SEJAVA) -fullversion 2>&1 | awk '{print $$NF}' | \
echo "$(@F:%.jar=%)-BuildJavaVersion: `$(JDKJAVA) -fullversion 2>&1 | awk '{print $$NF}' | \
sed -e 's|^"\(.*\)"$$|Java(TM) 2 SDK, Version \1|'`" ; \
echo "$(@F:%.jar=%)-BuildDate: `/bin/date +'%B %d, %Y'`" ; \
) \
......
#!/bin/bash
#
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
set -e
set -u
if [ "$#" -ne 1 ]; then
echo "Usage: $0 /path/to/jdk/1.8/image" >&2
exit 1
fi
if [ ! -d $1 ]; then
echo "Error: '$1' is not a directory" >&2
exit 1
fi
if [ ! -x $1/bin/java ]; then
echo "Error: Could not find an executable binary at '$1/bin/java'" >&2
exit 1
fi
JAVA_VERSION=$($1/bin/java -version 2>&1 | grep "^.* version \".*\"$" | sed 's/.*\"\(.*\)\".*/\1/')
if case ${JAVA_VERSION} in 1.8*) false ;; *) true; esac; then
echo "Error: Expected a path to JDK with version 1.8, got version ${JAVA_VERSION}" >&2
exit 1
fi
export JAVA_HOME=$1
export PATH="$JAVA_HOME:$PATH"
if [ -n `which sha1sum` ]; then
SHASUM=sha1sum;
elif [ -n `which shasum` ]; then
SHASUM="shasum -a 1"
else
echo "Error: can't find shasum or sha1sum" >&2
exit 1
fi
UNZIP=unzip
UNZIP_OPTS="${UNZIP_OPTS:--q} -u"
WGET=wget
WGET_OPTS=${WGET_OPTS:--q}
ROOT=$(hg root)
BUILD_DIR=${BUILD_DIR:-${ROOT}/build}
if [ "${SKIP_WGET:-}" = "" -a -d ${BUILD_DIR} ]; then
echo "Error: Build directory '${BUILD_DIR}' already exists" >&2
exit 1
fi
mkdir -p ${BUILD_DIR}
WGet() {
if [ "${SKIP_WGET:-}" != "" -a -r $2 ]; then
echo "Skipping download of $1..."
else
${WGET} ${WGET_OPTS} "$1" -O "$2"
fi
}
# DEPENDENCIES
##############
APACHE_ANT_URL=https://archive.apache.org/dist/ant/binaries
MAVEN_REPO_URL=https://repo1.maven.org/maven2
CODE_TOOLS_URL=http://hg.openjdk.java.net/code-tools
# The following are Mercurial tags for the corresponding OpenJDK Code Tools repo
ASMTOOLS_VERSION=${ASMTOOLS_VERSION:-7.0-b04} # early access for 7.0
JTHARNESS_VERSION=${JTHARNESS_VERSION:-jt6.0-b02} # early access for 6.0
JCOV_VERSION=${JCOV_VERSION:-jcov3.0-b05} # jcov3.0, ASM 6.2
# ANT
#####
ANT_DIR=${BUILD_DIR}/ant
mkdir -p ${ANT_DIR}
ANT_VERSION=${ANT_VERSION:-apache-ant-1.9.4}
ANT_ZIP=${ANT_DIR}/${ANT_VERSION}.zip
WGet ${APACHE_ANT_URL}/${ANT_VERSION}-bin.zip ${ANT_ZIP}
echo "ec57a35eb869a307abdfef8712f3688fff70887f ${ANT_ZIP}" | ${SHASUM} --check -
${UNZIP} ${UNZIP_OPTS} -d ${ANT_DIR} ${ANT_ZIP}
ANT_JAR=${ANT_DIR}/${ANT_VERSION}/lib/ant.jar
ANT=${ANT_DIR}/${ANT_VERSION}/bin/ant
# ASMTOOLS
##########
ASMTOOLS_BUILD_DIR=${BUILD_DIR}/asmtools
mkdir -p ${ASMTOOLS_BUILD_DIR}
# Build asmtools
ASMTOOLS_SRC_ZIP=${ASMTOOLS_BUILD_DIR}/source.zip
WGet ${CODE_TOOLS_URL}/asmtools/archive/${ASMTOOLS_VERSION}.zip ${ASMTOOLS_SRC_ZIP}
${UNZIP} ${UNZIP_OPTS} -d ${ASMTOOLS_BUILD_DIR} ${ASMTOOLS_SRC_ZIP}
if [ "${ASMTOOLS_VERSION}" = "tip" ]; then
ASMTOOLS_VERSION=`cd ${ASMTOOLS_BUILD_DIR} ; ls -d asmtools-* | sed -e 's/asmtools-//'`
fi
ASMTOOLS_SRC=${ASMTOOLS_BUILD_DIR}/asmtools-${ASMTOOLS_VERSION}
ASMTOOLS_DIST=${ASMTOOLS_BUILD_DIR}/build
${ANT} -DBUILD_DIR=${ASMTOOLS_DIST} -f ${ASMTOOLS_SRC}/build/build.xml
ASMTOOLS_JAR=${ASMTOOLS_DIST}/binaries/lib/asmtools.jar
ASMTOOLS_LICENSE=${ASMTOOLS_SRC}/LICENSE
# JAVATEST
##########
JTHARNESS_BUILD_DIR=${BUILD_DIR}/jtharness
mkdir -p ${JTHARNESS_BUILD_DIR}
# Build jtharness
JTHARNESS_SRC_ZIP=${JTHARNESS_BUILD_DIR}/source.zip
WGet ${CODE_TOOLS_URL}/jtharness/archive/${JTHARNESS_VERSION}.zip ${JTHARNESS_SRC_ZIP}
${UNZIP} ${UNZIP_OPTS} -d ${JTHARNESS_BUILD_DIR} ${JTHARNESS_SRC_ZIP}
if [ "${JTHARNESS_VERSION}" = "tip" ]; then
JTHARNESS_VERSION=`cd ${JTHARNESS_BUILD_DIR} ; ls -d jtharness-* | sed -e 's/jtharness-//'`
fi
JTHARNESS_SRC=${JTHARNESS_BUILD_DIR}/jtharness-${JTHARNESS_VERSION}
JTHARNESS_DIST=${JTHARNESS_BUILD_DIR}/build
${ANT} -DBUILD_DIR=${JTHARNESS_DIST} -f ${JTHARNESS_SRC}/build/build.xml
JAVATEST_JAR=${JTHARNESS_DIST}/binaries/lib/javatest.jar
JTHARNESS_LICENSE=${JTHARNESS_SRC}/legal/license.txt
JTHARNESS_COPYRIGHT=${JTHARNESS_SRC}/legal/copyright.txt
# JCOV
######
JCOV_BUILD_DIR=${BUILD_DIR}/jcov
mkdir -p ${JCOV_BUILD_DIR}
# Get jcov dependencies
JCOV_DEPS_DIR=${JCOV_BUILD_DIR}/deps
mkdir -p ${JCOV_DEPS_DIR}
ASM_JAR=${JCOV_DEPS_DIR}/asm-6.2.jar
ASM_JAR_CHECKSUM='1b6c4ff09ce03f3052429139c2a68e295cae6604'
WGet ${MAVEN_REPO_URL}/org/ow2/asm/asm/6.2/asm-6.2.jar ${ASM_JAR}
echo "${ASM_JAR_CHECKSUM} ${ASM_JAR}" | ${SHASUM} --check -
ASM_TREE_JAR=${JCOV_DEPS_DIR}/asm-tree-6.2.jar
ASM_TREE_JAR_CHECKSUM='61570e046111559f38d4e0e580c005f75988c0a6'
WGet ${MAVEN_REPO_URL}/org/ow2/asm/asm-tree/6.2/asm-tree-6.2.jar ${ASM_TREE_JAR}
echo "${ASM_TREE_JAR_CHECKSUM} ${ASM_TREE_JAR}" | ${SHASUM} --check -
ASM_UTIL_JAR=${JCOV_DEPS_DIR}/asm-utils-6.2.jar
ASM_UTIL_JAR_CHECKSUM='a9690730f92cc79eeadc20e400ebb41eccce10b1'
WGet ${MAVEN_REPO_URL}/org/ow2/asm/asm-util/6.2/asm-util-6.2.jar ${ASM_UTIL_JAR}
echo "${ASM_UTIL_JAR_CHECKSUM} ${ASM_UTIL_JAR}" | ${SHASUM} --check -
# Build jcov
JCOV_SRC_ZIP=${JCOV_BUILD_DIR}/source.zip
WGet ${CODE_TOOLS_URL}/jcov/archive/${JCOV_VERSION}.zip ${JCOV_SRC_ZIP}
${UNZIP} ${UNZIP_OPTS} -d ${JCOV_BUILD_DIR} ${JCOV_SRC_ZIP}
if [ "${JCOV_VERSION}" = "tip" ]; then
JCOV_VERSION=`cd ${JCOV_BUILD_DIR} ; ls -d jcov-* | sed -e 's/jcov-//'`
fi
JCOV_SRC=${JCOV_BUILD_DIR}/jcov-${JCOV_VERSION}
JCOV_DIST=${JCOV_BUILD_DIR}/build
( cd ${JCOV_SRC}/build
${ANT} -Dresult.dir=${JCOV_DIST} \
-Dasm.jar=${ASM_JAR} \
-Dasm.checksum=${ASM_JAR_CHECKSUM} \
-Dasm.tree.jar=${ASM_TREE_JAR} \
-Dasm.tree.checksum=${ASM_TREE_JAR_CHECKSUM} \
-Dasm.util.jar=${ASM_UTIL_JAR} \
-Dasm.util.checksum=${ASM_UTIL_JAR_CHECKSUM} \
-Djavatestjar=${JAVATEST_JAR} \
-Dverify.strict= \
-f ${JCOV_SRC}/build/build.xml
)
JCOV_JAR=${JCOV_DIST}/jcov_3.0/jcov.jar
JCOV_NETWORK_SAVER_JAR=${JCOV_DIST}/jcov_3.0/jcov_network_saver.jar
JCOV_LICENSE=${JCOV_SRC}/LICENSE
# JTREG
#######
# Get jtreg dependencies
JTREG_DEPS_DIR=${BUILD_DIR}/deps
mkdir -p ${JTREG_DEPS_DIR}
## JUnit
JUNIT_DEPS_DIR=${JTREG_DEPS_DIR}/junit
mkdir -p ${JUNIT_DEPS_DIR}
JUNIT_JAR=${JUNIT_DEPS_DIR}/junit-4.10.jar
WGet ${MAVEN_REPO_URL}/junit/junit/4.10/junit-4.10.jar ${JUNIT_JAR}
echo "e4f1766ce7404a08f45d859fb9c226fc9e41a861 ${JUNIT_JAR}" | ${SHASUM} --check -
${UNZIP} ${UNZIP_OPTS} ${JUNIT_JAR} LICENSE.txt -d ${JUNIT_DEPS_DIR}
JUNIT_LICENSE=${JUNIT_DEPS_DIR}/LICENSE.txt
## TestNG
TESTNG_DEPS_DIR=${JTREG_DEPS_DIR}/testng
mkdir -p ${TESTNG_DEPS_DIR}
TESTNG_JAR=${TESTNG_DEPS_DIR}/testng-6.9.5.jar
WGet ${MAVEN_REPO_URL}/org/testng/testng/6.9.5/testng-6.9.5.jar ${TESTNG_JAR}
echo "5d12ea207fc47c3f341a3f8ecc88a3eac396a777 ${TESTNG_JAR}" | ${SHASUM} --check -
TESTNG_LICENSE=${TESTNG_DEPS_DIR}/LICENSE.txt
WGet https://raw.githubusercontent.com/cbeust/testng/testng-6.9.5/LICENSE.txt ${TESTNG_LICENSE}
JCOMMANDER_JAR=${TESTNG_DEPS_DIR}/jcommander-1.72.jar
WGet ${MAVEN_REPO_URL}/com/beust/jcommander/1.72/jcommander-1.72.jar ${JCOMMANDER_JAR}
echo "6375e521c1e11d6563d4f25a07ce124ccf8cd171 ${JCOMMANDER_JAR}" | ${SHASUM} --check -
## Set version and build numbers to the latest tagged version by default
if [ -z ${BUILD_NUMBER:-} ]; then
BUILD_NUMBER=`hg tags | grep jtreg | head -1 | sed 's/jtreg\([0-9]\.[0-9]\)-\(b[0-9]*\).*/\2/'`
fi
if [ -z ${BUILD_VERSION:-} ]; then
BUILD_VERSION=`hg tags | grep jtreg | head -1 | sed 's/jtreg\([0-9]\.[0-9]\)-\(b[0-9]*\).*/\1/'`
fi
# Build jtreg
cd ${ROOT}/make
make JUNIT_JAR=${JUNIT_JAR} \
JUNIT_LICENSE=${JUNIT_LICENSE} \
TESTNG_JAR=${TESTNG_JAR} \
TESTNG_LICENSE=${TESTNG_LICENSE} \
JCOMMANDER_JAR=${JCOMMANDER_JAR} \
ANT=${ANT} \
ANT_JAR=${ANT_JAR} \
JCOV_JAR=${JCOV_JAR} \
JCOV_LICENSE=${JCOV_LICENSE} \
JCOV_NETWORK_SAVER_JAR=${JCOV_NETWORK_SAVER_JAR} \
JAVATEST_JAR=${JAVATEST_JAR} \
JTHARNESS_LICENSE=${JTHARNESS_LICENSE} \
JTHARNESS_COPYRIGHT=${JTHARNESS_COPYRIGHT} \
ASMTOOLS_JAR=${ASMTOOLS_JAR} \
ASMTOOLS_LICENSE=${ASMTOOLS_LICENSE} \
BUILD_VERSION=${BUILD_VERSION} \
BUILD_MILESTONE=${BUILD_MILESTONE:=dev} \
BUILD_NUMBER=${BUILD_NUMBER} \
JDKHOME=$JAVA_HOME \
${MAKE_ARGS:-}
#
# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -29,7 +29,7 @@
### The following files are required to run othervm tests
REGTEST-OTHERVM-CLASSES = AppletWrapper GetSystemProperty MainWrapper RStatus StringArray
REGTEST-OTHERVM-CLASSES = AppletWrapper GetSystemProperty MainWrapper AStatus StringArray
JAVAFILES.com.sun.javatest.regtest-othervm = \
$(REGTEST-OTHERVM-CLASSES:%=$(JAVADIR)/com/sun/javatest/regtest/agent/%.java)
......@@ -87,15 +87,11 @@ RESOURCES.com.sun.javatest.regtest = \
$(CLASSDIR)/com/sun/javatest/regtest/i18n.properties \
$(CLASSDIR)/com/sun/javatest/regtest/config/i18n.properties \
$(CLASSDIR)/com/sun/javatest/regtest/report/i18n.properties \
$(CLASSDIR)/com/sun/javatest/regtest/tool/i18n.properties
$(CLASSDIR)/com/sun/javatest/regtest/tool/i18n.properties \
$(CLASSDIR)/com/sun/javatest/regtest/tool/jtlogo.png
TARGETS.com.sun.javatest.regtest += $(RESOURCES.com.sun.javatest.regtest)
RESOURCES.com.sun.javatest.regtest.agent = \
$(CLASSDIR)/com/sun/javatest/regtest/agent/i18n.properties
TARGETS.com.sun.javatest.regtest += $(RESOURCES.com.sun.javatest.regtest.agent)
#----------------------------------------------------------------------
#
# Misc. doc files
......@@ -138,7 +134,7 @@ $(JTREG_LICENSE): $(TOPDIR)/LICENSE
$(BUILDDIR)/jtreg-usage.txt: \
$(BUILDDIR)/classes.com.sun.javatest.regtest.ok \
$(BUILDDIR)/classes/com/sun/javatest/regtest/tool/i18n.properties
$(J2SEJAVA) -cp "$(CLASSDIR)$(PS)$(JAVATEST_JAR)" \
$(JDKJAVA) -cp "$(CLASSDIR)$(PS)$(JAVATEST_JAR)" \
-Dprogram=jtreg com.sun.javatest.regtest.Main -help all > $@
TARGETS.ZIP.jtreg += $(JTREG_DOCS)
......@@ -159,7 +155,7 @@ endif
$(JTREG_IMAGEDIR)/doc/api/index.html: \
$(JAVAFILES.com.sun.javatest.regtest-tools) \
$(JAVATEST_SRCFILES)
$(J2SEHOME)/bin/javadoc -d $(@D) \
$(JDKHOME)/bin/javadoc -d $(@D) \
-encoding iso-8859-1 \
-sourcepath "$(JAVADIR)$(PS)$(JAVATEST_SRCDIR)" \
-classpath "$(ANT_JAR)$(PS)$(JAVATEST_JAR)$(PS)$(JUNIT_JAR)$(PS)$(TESTNG_JAR)" \
......@@ -169,7 +165,7 @@ $(JTREG_IMAGEDIR)/doc/api/index.html: \
$(JTREG_IMAGEDIR)/doc/devapi/index.html: \
$(JAVAFILES.com.sun.javatest.regtest-tools) \
$(JAVATEST_SRCFILES)
$(J2SEHOME)/bin/javadoc -d $(@D) \
$(JDKHOME)/bin/javadoc -d $(@D) \
-encoding iso-8859-1 \
-sourcepath "$(JAVADIR)$(PS)$(JAVATEST_SRCDIR)" \
-classpath "$(ANT_JAR)$(PS)$(JAVATEST_JAR)$(PS)$(JUNIT_JAR)$(PS)$(TESTNG_JAR)" \
......@@ -217,40 +213,48 @@ TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/jtreg.jar
# import JavaTest or JT Harness
TARGETS.com.sun.javatest.regtest += $(RESOURCES.com.sun.javatest.regtest)
ifdef JTHARNESS_HOME
TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/legal/jtharness/copyright.txt
TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/legal/jtharness/license.txt
endif
$(JTREG_IMAGEDIR)/legal/jtharness/copyright.txt \
$(JTREG_IMAGEDIR)/legal/jtharness/license.txt: \
$(JTREG_IMAGEDIR)/legal/jtharness/%: $(JTHARNESS_HOME)/legal/%
$(JTREG_IMAGEDIR)/lib/javatest.jar: $(call PosixPath,$(JAVATEST_JAR))
$(RM) -f $@
$(MKDIR) -p $(@D)
$(CP) $< $@
$(JTREG_IMAGEDIR)/lib/javatest.jar: $(call PosixPath,$(JAVATEST_JAR))
TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/javatest.jar
$(JTREG_IMAGEDIR)/legal/jtharness/license.txt: $(call PosixPath,$(JTHARNESS_LICENSE))
$(RM) -f $@
$(MKDIR) -p $(@D)
$(CP) $(JAVATEST_JAR) $@
$(CP) $< $@
TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/javatest.jar
ifdef JTHARNESS_LICENSE
TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/legal/jtharness/license.txt
endif
$(JTREG_IMAGEDIR)/legal/jtharness/copyright.txt: $(call PosixPath,$(JTHARNESS_COPYRIGHT))
$(RM) -f $@
$(MKDIR) -p $(@D)
$(CP) $< $@
ifdef JTHARNESS_COPYRIGHT
TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/legal/jtharness/copyright.txt
endif
#----------------------------------------------------------------------
#
# import JavaHelp (required for JavaTest/JT Harness 4.6), if available;
# remove any (probably out-of-date) signatures
ifdef JAVAHELP_JAR
$(IMAGES_DIR)/%/jh.jar: $(call PosixPath,$(JAVAHELP_JAR))
$(RM) -f $@
$(MKDIR) -p $(@D)
$(ECHO) JAVAHELP_HOME $(JAVAHELP_HOME)
$(ECHO) JAVAHELP_JAR $(JAVAHELP_JAR)
$(CP) $(JAVAHELP_JAR) $@
$(ZIP) -d $@ 'META-INF/*.SF' 'META-INF/*.RSA' 'META-INF/*.DSA'
-$(ZIP) -d $@ 'META-INF/*.SF' 'META-INF/*.RSA' 'META-INF/*.DSA'
TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/jh.jar
ifdef JAVAHELP_JAR
JTREG_IMAGE_JAVAHELP_JAR = $(JTREG_IMAGEDIR)/lib/jh.jar
TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/lib/jh.jar
endif
#----------------------------------------------------------------------
......@@ -260,21 +264,22 @@ endif
$(JTREG_IMAGEDIR)/lib/junit.jar: $(call PosixPath,$(JUNIT_JAR))
$(RM) -f $@
$(MKDIR) -p $(@D)
$(CP) $(JUNIT_JAR) $@
$(CP) $< $@
TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/junit.jar
#----------------------------------------------------------------------
#
# import TestNG
ifdef TESTNG_HOME
ifdef JUNIT_LICENSE
TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/legal/junit/LICENSE
endif
$(JTREG_IMAGEDIR)/legal/testng/LICENSE.txt: $(call PosixPath,$(TESTNG_HOME)/LICENSE.txt)
$(JTREG_IMAGEDIR)/legal/junit/LICENSE: $(call PosixPath,$(JUNIT_LICENSE))
$(RM) -f $@
$(MKDIR) -p $(@D)
$(CAT) $(TESTNG_HOME)/LICENSE.txt >> $@
$(CP) $< $@
TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/legal/testng/LICENSE.txt
#----------------------------------------------------------------------
#
# import TestNG
$(JTREG_IMAGEDIR)/lib/testng.jar: $(call PosixPath,$(TESTNG_JAR))
$(RM) $@
......@@ -288,60 +293,76 @@ $(JTREG_IMAGEDIR)/lib/testng.jar: $(call PosixPath,$(TESTNG_JAR))
TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/testng.jar
ifdef JCOMMANDER_JAR
$(JTREG_IMAGEDIR)/lib/jcommander.jar: $(call PosixPath,$(JCOMMANDER_JAR))
$(RM) $@
$(MKDIR) -p $(@D)
$(CP) $(JCOMMANDER_JAR) $@
ifdef JCOMMANDER_JAR
TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/jcommander.jar
endif
$(JTREG_IMAGEDIR)/legal/testng/LICENSE: $(call PosixPath,$(TESTNG_LICENSE))
$(MKDIR) -p $(@D)
$(CP) $< $@
ifdef TESTNG_LICENSE
TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/legal/testng/LICENSE
endif
#----------------------------------------------------------------------
#
# import JCov
ifdef JCOV_JAR
$(JTREG_IMAGEDIR)/lib/jcov.jar: $(call PosixPath,$(JCOV_JAR))
$(RM) $@
$(MKDIR) -p $(@D)
$(CP) $< $@
ifdef JCOV_JAR
TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/lib/jcov.jar
endif # JCOV_JAR
ifdef JCOV_NETWORK_SAVER_JAR
endif
$(JTREG_IMAGEDIR)/lib/jcov_network_saver.jar: $(call PosixPath,$(JCOV_NETWORK_SAVER_JAR))
$(RM) $@
$(MKDIR) -p $(@D)
$(CP) $< $@
ifdef JCOV_NETWORK_SAVER_JAR
TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/lib/jcov_network_saver.jar
endif
endif #JCOV_NETWORK_SAVER_JAR
$(JTREG_IMAGEDIR)/legal/jcov/LICENSE: $(call PosixPath,$(JCOV_LICENSE))
$(RM) -f $@
$(MKDIR) -p $(@D)
$(CP) $< $@
ifdef JCOV_LICENSE
TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/legal/jcov/LICENSE
endif
#----------------------------------------------------------------------
#
# import AsmTools
ifdef ASMTOOLS_JAR
$(JTREG_IMAGEDIR)/lib/asmtools.jar: $(call PosixPath,$(ASMTOOLS_JAR))
$(RM) $@
$(MKDIR) -p $(@D)
$(CP) $< $@
TARGETS.ZIP.jtreg += \
$(JTREG_IMAGEDIR)/lib/asmtools.jar \
ifdef ASMTOOLS_JAR
TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/lib/asmtools.jar
$(JTREG_IMAGEDIR)/lib/jtreg.jar: $(JTREG_IMAGEDIR)/lib/asmtools.jar
endif
endif #ASMTOOLS_JAR
$(JTREG_IMAGEDIR)/legal/asmtools/LICENSE: $(call PosixPath,$(ASMTOOLS_LICENSE))
$(RM) -f $@
$(MKDIR) -p $(@D)
$(CP) $< $@
ifdef ASMTOOLS_LICENSE
TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/legal/asmtools/LICENSE
endif
#----------------------------------------------------------------------
#
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" assert-keyword="true" jdk-15="true">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="IDEA JDK" project-jdk-type="IDEA JDK">
<output url="file://$PROJECT_DIR$/build" />
</component>
</project>
\ No newline at end of file
<!--
~ Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
~ Copyright (c) 2016, 2018 Oracle and/or its affiliates. All rights reserved.
~ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
~
~ This code is free software; you can redistribute it and/or modify it
......@@ -23,20 +23,20 @@
~ questions.
-->
<idea-plugin version="2">
<idea-plugin>
<id>jtreg</id>
<name>jtreg Test Support</name>
<version>1.5</version>
<version>1.6</version>
<description><![CDATA[
Allows execution of tests developed using the <a href="http://openjdk.java.net/jtreg/">jtreg</a> framework.
]]></description>
<change-notes><![CDATA[
Fixed NPE in testng import check
Fixed misc issues with plugin build against newer versions of IntelliJ IDE
]]>
</change-notes>
<idea-version since-build="145.0"/>
<idea-version since-build="162.0"/>
<depends>AntSupport</depends>
<depends>TestNG-J</depends>
......
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -29,11 +29,11 @@ import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.ModalityState;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.event.DocumentAdapter;
import com.intellij.openapi.editor.event.DocumentEvent;
import com.intellij.openapi.editor.event.DocumentListener;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.fileEditor.FileEditorManager;
import com.intellij.openapi.fileEditor.FileEditorManagerAdapter;
import com.intellij.openapi.fileEditor.FileEditorManagerListener;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleUtilCore;
import com.intellij.openapi.project.DumbService;
......@@ -53,7 +53,7 @@ import java.util.stream.Stream;
* model is updated, so that the test source is displayed without errors. Changes in the headers will be picked up
* and reflected in the root model.
*/
public class JTRegFileManagerListener extends FileEditorManagerAdapter {
public class JTRegFileManagerListener implements FileEditorManagerListener {
public static final Logger LOG = Logger.getInstance(JTRegFileManagerListener.class);
......@@ -66,7 +66,7 @@ public class JTRegFileManagerListener extends FileEditorManagerAdapter {
VirtualFile contentRoot;
List<VirtualFile> roots = new ArrayList<>();
Document document;
DocumentAdapter listener = new DocumentAdapter() {
DocumentListener listener = new DocumentListener() {
@Override
public void documentChanged(DocumentEvent e) {
alarm.cancelAllRequests();
......
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -29,6 +29,7 @@ import com.intellij.diagnostic.logging.LogConfigurationPanel;
import com.intellij.execution.*;
import com.intellij.execution.configurations.*;
import com.intellij.execution.runners.ExecutionEnvironment;
import com.intellij.execution.testframework.TestSearchScope;
import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties;
import com.intellij.execution.ui.DefaultJreSelector;
import com.intellij.openapi.module.Module;
......@@ -44,7 +45,9 @@ import com.intellij.openapi.util.InvalidDataException;
import com.intellij.openapi.util.WriteExternalException;
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiClass;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiMethod;
import com.intellij.refactoring.listeners.RefactoringElementListener;
import com.intellij.util.xmlb.XmlSerializer;
import org.jdom.Element;
......@@ -56,6 +59,7 @@ import com.oracle.plugin.jtreg.service.JTRegService;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
......@@ -273,4 +277,24 @@ public class JTRegConfiguration extends JavaTestConfigurationBase {
@Override
public void setVMParameters(String s) { }
public void bePatternConfiguration(List<PsiClass> list, PsiMethod psiMethod) {
//do nothing
}
public void beMethodConfiguration(Location<PsiMethod> location) {
//do nothing
}
public void beClassConfiguration(PsiClass psiClass) {
//do nothing
}
public boolean isConfiguredByElement(PsiElement psiElement) {
return false;
}
public TestSearchScope getTestSearchScope() {
return null;
}
}
......@@ -66,7 +66,7 @@
</grid>
</constraints>
<properties>
<text value="Path"/>
<text value="JTReg Home"/>
</properties>
</component>
<grid id="8bdf0" binding="myListPane" custom-create="true" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
......
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -157,7 +157,7 @@ public class JTRegServiceConfigurable implements SearchableConfigurable {
workDir = new TextFieldWithBrowseButton();
workDir.addBrowseFolderListener("Directory with Strategies", null, project, FileChooserDescriptorFactory.createSingleFolderDescriptor());
myModel = new CollectionListModel<>();
JBList myList = new JBList(myModel);
JBList<AntBuildTarget> myList = new JBList<>(myModel);
myList.getEmptyText().setText(ExecutionBundle.message("before.launch.panel.empty"));
myList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
myList.setCellRenderer(new MyListCellRenderer());
......
......@@ -170,8 +170,8 @@ public class HTMLReporter extends Reporter {
out.endTag(TD);
out.startTag(TD);
out.write(table.getColumnName(i));
writeIndexTableInfoValues(table.getColumnName(i));
out.endTag(TD);
writeIndexTableInfoValues(table.getColumnName(i));
// out.startTag(TD);
// out.write("??");
// out.endTag(TD);
......@@ -321,8 +321,7 @@ public class HTMLReporter extends Reporter {
private MultiMap<String, TestResult> table;
private int size;
private static final String DOCTYPE =
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd\">";
private static final String DOCTYPE = "<!DOCTYPE HTML>";
// HTML tags
private static final String THEAD = "thead";
......