pax_global_header 0000666 0000000 0000000 00000000064 14250654265 0014523 g ustar 00root root 0000000 0000000 52 comment=382fe545b996170eb54593d9ffea52664f67b901
jtreg-jtreg-6.1-2/ 0000775 0000000 0000000 00000000000 14250654265 0013754 5 ustar 00root root 0000000 0000000 jtreg-jtreg-6.1-2/.github/ 0000775 0000000 0000000 00000000000 14250654265 0015314 5 ustar 00root root 0000000 0000000 jtreg-jtreg-6.1-2/.github/workflows/ 0000775 0000000 0000000 00000000000 14250654265 0017351 5 ustar 00root root 0000000 0000000 jtreg-jtreg-6.1-2/.github/workflows/test.yml 0000664 0000000 0000000 00000001437 14250654265 0021060 0 ustar 00root root 0000000 0000000 name: Build and Test JTReg
on:
push:
branches-ignore:
- master
jobs:
linux-x64:
runs-on: ubuntu-20.04
steps:
- name: Checkout the source
uses: actions/checkout@v2
with:
path: jtreg
fetch-depth: 0
- name: build
working-directory: jtreg
shell: bash
run: bash make/build.sh --jdk ${JAVA_HOME_8_X64}
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: jtreg
path: jtreg/build/images/jtreg
- name: test
working-directory: jtreg
shell: bash
run:
MAKE_ARGS=test
HEADLESS=1
JDK8HOME=${JAVA_HOME_8_X64}
bash make/build.sh --jdk ${JAVA_HOME_8_X64} --skip-download
jtreg-jtreg-6.1-2/.gitignore 0000664 0000000 0000000 00000000042 14250654265 0015740 0 ustar 00root root 0000000 0000000 /build/
/webrev
.DS_Store
/.idea/
jtreg-jtreg-6.1-2/.hgignore 0000664 0000000 0000000 00000000113 14250654265 0015552 0 ustar 00root root 0000000 0000000 ^(build|dist)/
nbproject/private/
plugins/idea/.idea/
plugins/idea/build/
jtreg-jtreg-6.1-2/.hgtags 0000664 0000000 0000000 00000003457 14250654265 0015243 0 ustar 00root root 0000000 0000000 9f51ef22f00a3d5b681472cacf3ce15868073103 jtreg4.1-b01
2cf779985e18ba2f79aaec88f543be9efecf352f jtreg4.1-b02
bd7a3ed1210fa61f92f066c65d5e589e2aa26813 jtreg4.1-b03
cbc1f04a52ea2488e8dc7715fc59a5a122be9851 jtreg4.1-b04
46b8c02be3b356c7f953dbfa18246b357b5e7101 jtreg4.1-b05
d47a6e238c3e0f6d8ca1a6640c182be14c45eab2 jtreg-4.1-b06
d47a6e238c3e0f6d8ca1a6640c182be14c45eab2 jtreg4.1-b06
8ab579624a503e1df21841070ae5f869c301de8f jtreg4.1-b07
d47a6e238c3e0f6d8ca1a6640c182be14c45eab2 jtreg-4.1-b06
0000000000000000000000000000000000000000 jtreg-4.1-b06
e08a5e0b79ba57743222bbea19c0bdb142968769 jtreg4.1-b08
c54815dea64cf7b011f8473c18d54a86b9a9d5af jtreg4.1-b09
8c3179c3ebdab7df35b8e9907bd8ad8bc5a9f9f8 jtreg4.1-b10
04f40c388713f11c1cfb2094556d4b024b9ab939 jtreg4.1-b11
79705dae19e74b0693cda9ece8eaf0984159ab97 jtreg4.1-b12
5e994d1f9840ba39b82977a56e02c4f702a1dcbd jtreg4.1-b13
1159c9f96a4470dec79e6fa71b4f1a4895c4b20f jtreg4.2-b01
dbccea90c34dacf7e0824d5e3d3e9e1e930a103a jtreg4.2-b02
45590e2d6af12da44cc160764a9b552516be8440 jtreg4.2-b03
585f794e105997ab44109d70dbaa1c072b03afcc jtreg4.2-b04
4b0cd55e7741825de6ea79e9d4338d2972460678 jtreg4.2-b05
2d96b4cf02660b1580542379d77492f68d3ca73b jtreg4.2-b06
26d8a4a47674c4ca304b9e290dccca1dd1c7224f jtreg4.2-b07
cce0ac75e87864ed365a420fb836a4430421ab0f jtreg4.2-b08
684f12eef4a8c2f42afe2abe3d79eead72efcc5f jtreg4.2-b09
746c6d1328721541d3b16154c25a0179fbf53f7c jtreg4.2-b10
a13ec77e7adcc4c9ed434e664abc350abaacc045 jtreg4.2-b11
652902f7fb0ed0b4f307d61a799caf50a6e609be jtreg4.2-b12
7a38f21e077821a5015792e85b3793c90c81b866 jtreg4.2-b13
ec37d2900cd42987270f98423a60eb6297bdc37b jtreg4.2-b14
d5a9216fad5ca01002e18526be2c31cafb43e178 jtreg4.2-b15
deee95d5d8ff6406b77c0d5b9297736eb7c98c6d jtreg4.2-b16
03c4dff80b0f55865c6e5fe0aa8ea94d0ca1a2ac jtreg5.0-b01
95aa601b8100c6c56a14d35cfe493372214b1d94 jtreg5.1-b01
jtreg-jtreg-6.1-2/.jcheck/ 0000775 0000000 0000000 00000000000 14250654265 0015261 5 ustar 00root root 0000000 0000000 jtreg-jtreg-6.1-2/.jcheck/conf 0000664 0000000 0000000 00000001052 14250654265 0016127 0 ustar 00root root 0000000 0000000 [general]
project=code-tools
comments=lax
jbs=CODETOOLS
[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,whitespace
[repository]
tags=jtreg(?:4\.1-b[0-9]{2}|5\.[01]-b[0-9]{2}|6|-[6789](?:\.[0-9]+)?+[0-9]+)
branches=
[census]
version=0
domain=openjdk.org
[checks "whitespace"]
files=.*\.java|.*\.m|.*\.mm|.*\.gmk|.*\.m4|.*\.ac|Makefile
ignore-tabs=.*\.gmk|Makefile
[checks "merge"]
message=Merge
[checks "reviewers"]
ignore=duke
[checks "committer"]
role=committer
[checks "issues"]
pattern=^(79[0-9]{5}): (\S.*)$
jtreg-jtreg-6.1-2/CONTRIBUTING.md 0000664 0000000 0000000 00000000321 14250654265 0016201 0 ustar 00root root 0000000 0000000 # Contributing to JTReg
JTReg is part of the OpenJDK [CodeTools] Project.
Please see for how to contribute.
[CodeTools]: https://openjdk.java.net/projects/code-tools
jtreg-jtreg-6.1-2/CONTRIBUTORS 0000664 0000000 0000000 00000000467 14250654265 0015643 0 ustar 00root root 0000000 0000000 The following people have contributed to the development of jtreg.
Original Author:
Iris Clark
Tag Specification:
Mark Reinhold
Currently Maintained By:
Jonathan Gibbons
Other Contributors:
Brian Kurotsuchi
Dawn Phillips
Jessica Mauvais
Maurizio Cimadamore
Kumar Srinivasan
jtreg-jtreg-6.1-2/COPYRIGHT 0000664 0000000 0000000 00000001742 14250654265 0015253 0 ustar 00root root 0000000 0000000 Copyright (c) 1996, 2012, 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.
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.
jtreg-jtreg-6.1-2/LICENSE 0000664 0000000 0000000 00000045451 14250654265 0014772 0 ustar 00root root 0000000 0000000 The GNU General Public License (GPL)
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share
and change it. By contrast, the GNU General Public License is intended to
guarantee your freedom to share and change free software--to make sure the
software is free for all its users. This General Public License applies to
most of the Free Software Foundation's software and to any other program whose
authors commit to using it. (Some other Free Software Foundation software is
covered by the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not price. Our
General Public Licenses are designed to make sure that you have the freedom to
distribute copies of free software (and charge for this service if you wish),
that you receive source code or can get it if you want it, that you can change
the software or use pieces of it in new free programs; and that you know you
can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny
you these rights or to ask you to surrender the rights. These restrictions
translate to certain responsibilities for you if you distribute copies of the
software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for
a fee, you must give the recipients all the rights that you have. You must
make sure that they, too, receive or can get the source code. And you must
show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2)
offer you this license which gives you legal permission to copy, distribute
and/or modify the software.
Also, for each author's protection and ours, we want to make certain that
everyone understands that there is no warranty for this free software. If the
software is modified by someone else and passed on, we want its recipients to
know that what they have is not the original, so that any problems introduced
by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We
wish to avoid the danger that redistributors of a free program will
individually obtain patent licenses, in effect making the program proprietary.
To prevent this, we have made it clear that any patent must be licensed for
everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification
follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice
placed by the copyright holder saying it may be distributed under the terms of
this General Public License. The "Program", below, refers to any such program
or work, and a "work based on the Program" means either the Program or any
derivative work under copyright law: that is to say, a work containing the
Program or a portion of it, either verbatim or with modifications and/or
translated into another language. (Hereinafter, translation is included
without limitation in the term "modification".) Each licensee is addressed as
"you".
Activities other than copying, distribution and modification are not covered by
this License; they are outside its scope. The act of running the Program is
not restricted, and the output from the Program is covered only if its contents
constitute a work based on the Program (independent of having been made by
running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as
you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this License
and to the absence of any warranty; and give any other recipients of the
Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may
at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus
forming a work based on the Program, and copy and distribute such modifications
or work under the terms of Section 1 above, provided that you also meet all of
these conditions:
a) You must cause the modified files to carry prominent notices stating
that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or
in part contains or is derived from the Program or any part thereof, to be
licensed as a whole at no charge to all third parties under the terms of
this License.
c) If the modified program normally reads commands interactively when run,
you must cause it, when started running for such interactive use in the
most ordinary way, to print or display an announcement including an
appropriate copyright notice and a notice that there is no warranty (or
else, saying that you provide a warranty) and that users may redistribute
the program under these conditions, and telling the user how to view a copy
of this License. (Exception: if the Program itself is interactive but does
not normally print such an announcement, your work based on the Program is
not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable
sections of that work are not derived from the Program, and can be reasonably
considered independent and separate works in themselves, then this License, and
its terms, do not apply to those sections when you distribute them as separate
works. But when you distribute the same sections as part of a whole which is a
work based on the Program, the distribution of the whole must be on the terms
of this License, whose permissions for other licensees extend to the entire
whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your
rights to work written entirely by you; rather, the intent is to exercise the
right to control the distribution of derivative or collective works based on
the Program.
In addition, mere aggregation of another work not based on the Program with the
Program (or with a work based on the Program) on a volume of a storage or
distribution medium does not bring the other work under the scope of this
License.
3. You may copy and distribute the Program (or a work based on it, under
Section 2) in object code or executable form under the terms of Sections 1 and
2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source
code, which must be distributed under the terms of Sections 1 and 2 above
on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to
give any third party, for a charge no more than your cost of physically
performing source distribution, a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of Sections 1
and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to
distribute corresponding source code. (This alternative is allowed only
for noncommercial distribution and only if you received the program in
object code or executable form with such an offer, in accord with
Subsection b above.)
The source code for a work means the preferred form of the work for making
modifications to it. For an executable work, complete source code means all
the source code for all modules it contains, plus any associated interface
definition files, plus the scripts used to control compilation and installation
of the executable. However, as a special exception, the source code
distributed need not include anything that is normally distributed (in either
source or binary form) with the major components (compiler, kernel, and so on)
of the operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the source
code from the same place counts as distribution of the source code, even though
third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as
expressly provided under this License. Any attempt otherwise to copy, modify,
sublicense or distribute the Program is void, and will automatically terminate
your rights under this License. However, parties who have received copies, or
rights, from you under this License will not have their licenses terminated so
long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it.
However, nothing else grants you permission to modify or distribute the Program
or its derivative works. These actions are prohibited by law if you do not
accept this License. Therefore, by modifying or distributing the Program (or
any work based on the Program), you indicate your acceptance of this License to
do so, and all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program),
the recipient automatically receives a license from the original licensor to
copy, distribute or modify the Program subject to these terms and conditions.
You may not impose any further restrictions on the recipients' exercise of the
rights granted herein. You are not responsible for enforcing compliance by
third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues), conditions
are imposed on you (whether by court order, agreement or otherwise) that
contradict the conditions of this License, they do not excuse you from the
conditions of this License. If you cannot distribute so as to satisfy
simultaneously your obligations under this License and any other pertinent
obligations, then as a consequence you may not distribute the Program at all.
For example, if a patent license would not permit royalty-free redistribution
of the Program by all those who receive copies directly or indirectly through
you, then the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply and
the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or
other property right claims or to contest validity of any such claims; this
section has the sole purpose of protecting the integrity of the free software
distribution system, which is implemented by public license practices. Many
people have made generous contributions to the wide range of software
distributed through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing to
distribute software through any other system and a licensee cannot impose that
choice.
This section is intended to make thoroughly clear what is believed to be a
consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain
countries either by patents or by copyrighted interfaces, the original
copyright holder who places the Program under this License may add an explicit
geographical distribution limitation excluding those countries, so that
distribution is permitted only in or among countries not thus excluded. In
such case, this License incorporates the limitation as if written in the body
of this License.
9. The Free Software Foundation may publish revised and/or new versions of the
General Public License from time to time. Such new versions will be similar in
spirit to the present version, but may differ in detail to address new problems
or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any later
version", you have the option of following the terms and conditions either of
that version or of any later version published by the Free Software Foundation.
If the Program does not specify a version number of this License, you may
choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs
whose distribution conditions are different, write to the author to ask for
permission. For software which is copyrighted by the Free Software Foundation,
write to the Free Software Foundation; we sometimes make exceptions for this.
Our decision will be guided by the two goals of preserving the free status of
all derivatives of our free software and of promoting the sharing and reuse of
software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible
use to the public, the best way to achieve this is to make it free software
which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach
them to the start of each source file to most effectively convey the exclusion
of warranty; and each file should have at least the "copyright" line and a
pointer to where the full notice is found.
One line to give the program's name and a brief idea of what it does.
Copyright (C)
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
This program 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 for
more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this when it
starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free
software, and you are welcome to redistribute it under certain conditions;
type 'show c' for details.
The hypothetical commands 'show w' and 'show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may be
called something other than 'show w' and 'show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your school,
if any, to sign a "copyright disclaimer" for the program, if necessary. Here
is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
'Gnomovision' (which makes passes at compilers) written by James Hacker.
signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General Public
License instead of this License.
"CLASSPATH" EXCEPTION TO THE GPL
Certain source files distributed by Sun Microsystems, Inc. are subject to
the following clarification and special exception to the GPL, but only where
Sun has expressly included in the particular source file's header the words
"Sun designates this particular file as subject to the "Classpath" exception
as provided by Sun in the LICENSE file that accompanied this code."
Linking this library statically or dynamically with other modules is making
a combined work based on this library. Thus, the terms and conditions of
the GNU General Public License cover the whole combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent modules,
and to copy and distribute the resulting executable under terms of your
choice, provided that you also meet, for each linked independent module,
the terms and conditions of the license of that module. An independent
module is a module which is not derived from or based on this library. If
you modify this library, you may extend this exception to your version of
the library, but you are not obligated to do so. If you do not wish to do
so, delete this exception statement from your version.
jtreg-jtreg-6.1-2/README.md 0000664 0000000 0000000 00000017733 14250654265 0015246 0 ustar 00root root 0000000 0000000 # Building The Regression Test Harness for the OpenJDK platform: jtreg
(This information is also available at )
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.sh script
This is the recommended way to build jtreg, for those that want a simple,
basic way to build jtreg.
*Note:* The _build.sh_ script supersedes the earlier _build-all.sh_ script.
The script is intended to be run in a Unix-like shell, such as `bash` on Linux or
Mac OS X, or with Cygwin or WSL on Windows. At a minimum, you must either set
the `JAVA_HOME` environment variable or specify the location of the JDK to be
used to build jtreg with the `--jdk` command-line option. It must be JDK 8 or later.
% cd jtreg-root-directory
% sh make/build.sh --jdk JDK-directory
If your shell is not compatible with `bash`, you may need to invoke `bash` explicitly:
% bash make/build.sh --jdk 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_.
If you have access to the public Internet, no environment variables need to be
specified to get a standard build of jtreg. However, you can set environment
variables used to define the location of dependencies to be downloaded.
These are documented in _make/build.sh_ and normally specified in
_make/build-support/version-numbers_ and _make/build-support/*/version-numbers_.
## 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 just builds an image
for jtreg. You can build jtreg from a Unix-like command shell with the following
commands:
% cd
% 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_. You can also include the
appropriate license files in the jtreg image, by setting the appropriate make
variables.
* JDK 1.8 (or better):
Set `JDKHOME` to the JDK or equivalent used to build jtreg. It must be
equivalent to JDK 8 or later.
* JT Harness:
See .
Set `JTHARNESS_HOME` to the installed copy of the version of JT Harness to be
used. It should be version 6.0-b14 or better.
* Ant:
See . Set `ANTHOME` to an installed copy of Ant. It
should be version 1.10.x. or better.
* AsmTools:
See .
Set `ASMTOOLS_HOME` to the installed copy of the version of AsmTools to be
used. It should be version 7.0-b09 or better.
Note: Do not confuse this component with ASM bytecode engineering library
available at
* JUnit:
See . The recommended version is currently JUnit 4.13.2.
JUnit has a dependency on Hamcrest. The recommended version is currently 2.2.
* TestNG:
See . The recommended version is currently 7.3.0.
(Do not use 7.4.0 to run OpenJDK tests.)
TestNG has dependencies on JCommander and Google Guice.
The recommended version of JCommander is 1.78.
The recommended version of Google Guice is 4.2.3.
The following dependencies are optional.
* JCov:
See .
Set `JCOV_HOME` to the installed copy of the version of JCov to be used.
It should be version 3.0-b07 or better.
* JDK 1.5:
This is used when running some of the tests. Set `JDK5HOME` 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 `JDK6HOME` to run these
tests. It need not be set if you are just building jtreg.
* JDK 1.7:
This is used when running some of the tests. Set `JDK7HOME` to run these
tests. It need not be set if you are just building jtreg.
* JDK 1.8:
This is used when running some of the tests. Set `JDK8HOME` to run these
tests. It need not be set if you are just building jtreg.
* JDK 9:
This is used when running some of the tests. Set `JDK9HOME` to run these
tests. It need not be set if you are just building jtreg.
* JDK 14:
This is used when running some of the tests. Set `JDK14HOME` to run these
tests. It need not be set if you are just building jtreg.
* JDK 18:
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.
The recommended versions are also defined in `make/build-support/version-numbers`.
## Running jtreg Self-Tests
The tests can be invoked with individual make targets, or collectively via the
`test` target.
Some of the tests need to pop up windows while they execute. No interaction with
these windows is normally required. Since this can be a problem on a headless
server machine, and an annoyance on a personal workstation, the tests will
attempt to use VNC to create a dummy X-server for use by the tests while they
are running. Various implementations of VNC are available, such as from
. 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
VNC, set the VNC environment variable to one of false, off, no, or 0. Unless
explicitly disabled, the tests will check the following:
* You must have a password set in _$HOME/.vnc/passwd_. This is the standard
location used by the vncserver command.
* If you set the environment variable `VNC_HOME`, it will be prepended to your
execution path to find vncserver.
* vncserver must be on your execution path, after `VNC_HOME` has been added,
if set.
If the tests find any issue with using VNC, it will not be used. If VNC is used
to create a dummy X server, the server will be terminated when the test is
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.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
Unix-like command shell with the following commands:
% cd jtreg-root-directory
% ant -f make/build.xml
You can also use this build file when creating a NetBeans free form project with
an existing build file.
### Dependencies
Some of the tasks that are used are listed as _Optional Tasks_ in the Ant
manual. You may need to make sure that these tasks are available for use by Ant.
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
`-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.)
## Using the IntelliJ IDE
The jtreg repo also contains a plugin for the IntelliJ IDE.
This is a convenience plugin which adds jtreg capabilities to the IntelliJ IDE.
With this plugin, OpenJDK developers can write, run, and debug jtreg tests
without leaving their IDE environment. For more details, see the file
[plugins/idea/README.md](plugins/idea/README.md) in this repo.
jtreg-jtreg-6.1-2/make/ 0000775 0000000 0000000 00000000000 14250654265 0014671 5 ustar 00root root 0000000 0000000 jtreg-jtreg-6.1-2/make/Defs.gmk 0000664 0000000 0000000 00000035171 14250654265 0016261 0 ustar 00root root 0000000 0000000 #
# 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
# 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.
#
# include host-specific defs, if any
-include Defs-$(shell hostname).gmk
# TOPDIR = .. # now set in Makefile
ABSTOPDIR = $(shell cd $(TOPDIR); pwd)
# clobber settings from user's environment
JAVA_HOME=
CLASSPATH=
JAVA_COMPILER=
LD_LIBRARY_PATH=
#----------------------------------------------------------------------
#
# Support for Cygwin and MSYS2 (which may identify as MSYS, MINGW32 or MINGW64 (the default))
SYSTEM_UNAME := $(shell uname)
# Where is unwanted output to be delivered?
# On Windows, MKS uses the special file "NUL", cygwin uses the customary unix file.
ifeq ($(SYSTEM_UNAME), Windows_NT)
DEV_NULL = NUL
else
DEV_NULL = /dev/null
endif
ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
USING_CYGWIN = true
USING_CYGWIN_OR_USING_MSYS = true
endif
ifneq (,$(findstring MSYS,$(SYSTEM_UNAME))$(findstring MINGW,$(SYSTEM_UNAME)))
USING_MSYS = true
USING_CYGWIN_OR_USING_MSYS = true
endif
ifdef USING_CYGWIN_OR_USING_MSYS
define FullPath
$(shell cygpath -a -m $1 2> $(DEV_NULL))
endef
define PosixPath
$(shell cygpath -a -u $1 2> $(DEV_NULL))
endef
else
define FullPath
$(abspath $1)
endef
define PosixPath
$1
endef
endif
ifndef BUILDDIR
BUILDDIR = $(TOPDIR)/build
endif
override BUILDDIR := $(call FullPath, $(BUILDDIR))
#----------------------------------------------------------------------
#
# Parameters to control what to build and test with.
#----- 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 JDK5HOME
ifdef SLASHJAVA
JDK5HOME = $(SLASHJAVA)/re/jdk/1.5.0/archive/fcs/binaries/linux-i586
endif
endif
JDK5HOME := $(call FullPath,$(JDK5HOME))
ifndef JDK6HOME
ifdef SLASHJAVA
JDK6HOME = $(SLASHJAVA)/re/jdk/1.6.0/archive/fcs/binaries/linux-i586
endif
endif
JDK6HOME := $(call FullPath,$(JDK6HOME))
ifndef JDK7HOME
ifdef SLASHJAVA
JDK7HOME = $(SLASHJAVA)/re/jdk/1.7.0/archive/fcs/binaries/linux-i586
endif
endif
JDK7HOME := $(call FullPath,$(JDK7HOME))
ifndef JDK8HOME
ifdef SLASHJAVA
JDK8HOME = $(SLASHJAVA)/re/jdk/1.8.0/promoted/latest/binaries/linux-i586
endif
endif
JDK8HOME := $(call FullPath,$(JDK8HOME))
ifndef JDK9HOME
ifdef SLASHJAVA
JDK9HOME = $(SLASHJAVA)/re/jdk/9/promoted/latest/binaries/linux-i586
endif
endif
JDK9HOME := $(call FullPath,$(JDK9HOME))
# The JDK used to build jtreg and to run most tests.
# It should be set to JDK 8 or later.
# If not set, it defaults to $(JDK8HOME), or to $(J2SEHOME) for backwards
# compatibility
ifndef JDKHOME
ifdef JDK8HOME
JDKHOME = $(JDK8HOME)
else
ifdef J2SEHOME
JDKHOME = $(J2SEHOME)
endif
endif
endif
# derived values
JDKJAVA = $(JDKHOME)/bin/java
JDKJAVAC = $(JDKHOME)/bin/javac
JAR = $(JDKHOME)/bin/jar
# Only use -source -target, to support legacy platforms, when building with JDK 8
# Otherwise, use default values for $JDKHOME/bin/javac
SUPPORT_OLD_SOURCE_TARGET = $(shell $(JDKJAVAC) -version 2>&1 | grep '[8]' > /dev/null && echo true )
ifneq ($(SUPPORT_OLD_SOURCE_TARGET),)
OLD_JAVAC_SOURCE_TARGET = -source 1.2 -target 1.1
AGENT_JAVAC_SOURCE_TARGET = -source 5 -target 5
TOOL_JAVAC_SOURCE_TARGET = -source 8 -target 8
REGTEST_TOOL_PATCH_JAVA_BASE_OPTIONS =
else
EXTRA_LINT_OPTS = -rawtypes,-unchecked
REGTEST_TOOL_PATCH_JAVA_BASE_OPTIONS = --patch-module java.base=$(JAVADIR)
endif
ifdef JDK5HOME
JDK5_BOOTCLASSPATH = -bootclasspath $(JDK5HOME)/jre/lib/rt.jar
endif
ifdef JDK8HOME
JDK8_BOOTCLASSPATH = -bootclasspath $(JDK8HOME)/jre/lib/rt.jar
endif
# for files needed to run othervm tests on oldest supported platforms
REGTEST_OLD_JAVAC = $(JDKHOME)/bin/javac
REGTEST_OLD_JAVAC_OPTIONS = \
$(OLD_JAVAC_SOURCE_TARGET) $(JDK5_BOOTCLASSPATH) -Xlint:all,-options,-deprecation,$(EXTRA_LINT_OPTS) -Werror
# for files needed to run agentvm tests (on platforms back to JDK 1.5)
REGTEST_AGENT_JAVAC = $(JDKHOME)/bin/javac
REGTEST_AGENT_JAVAC_OPTIONS = \
$(AGENT_JAVAC_SOURCE_TARGET) $(JDK5_BOOTCLASSPATH) -Xlint:all,-options,-deprecation,$(EXTRA_LINT_OPTS) -Werror
# for files needed for jtreg tool
REGTEST_TOOL_JAVAC = $(JDKHOME)/bin/javac
REGTEST_TOOL_JAVAC_OPTIONS = \
$(TOOL_JAVAC_SOURCE_TARGET) $(JDK8_BOOTCLASSPATH) -Xlint:all,-options,-deprecation -Werror
#----- 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/6.0/promoted/ea/b11/binaries/
endif
endif
ifndef JAVATEST_HOME
ifdef JTHARNESS_HOME
JAVATEST_HOME = $(JTHARNESS_HOME)
else
ifdef SLASHJAVA
JAVATEST_HOME = $(SLASHJAVA)/re/javatest/6.0/promoted/latest/binaries/javatest/
endif
endif
endif
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))
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/3.0/promoted/fcs/latest/binaries/jcov_3.0/
endif
endif
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))
ifndef JCOV_LICENSE
ifdef JCOV_HOME
JCOV_LICENSE = $(wildcard $(JCOV_HOME)/LICENSE)
endif
endif
JCOV_LICENSE := $(call FullPath,$(JCOV_LICENSE))
JCOV = $(JDK6HOME)/bin/java -jar $(JCOV_JAR)
#----- 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_HOME = $(SLASHJAVA)/re/asmtools/7.0/promoted/opensource/ea/b08/binaries/asmtools-7.0/
endif
endif
ifndef ASMTOOLS_JAR
ASMTOOLS_JAR = $(ASMTOOLS_HOME)/lib/asmtools.jar
endif
ASMTOOLS_JAR := $(call FullPath,$(ASMTOOLS_JAR))
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 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
TESTNG_HOME = $(SLASHJAVA)/devtools/share/testng/testng-6.9.5
endif
endif
TESTNG_HOME := $(call FullPath,$(TESTNG_HOME))
ifndef TESTNG_JAR
ifdef TESTNG_HOME
TESTNG_JAR = $(TESTNG_HOME)/testng-6.9.5.jar
endif
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
ifdef TESTNG_HOME
JCOMMANDER_JAR = $(wildcard $(TESTNG_HOME)/jcommander-1.48.jar)
endif
endif
ifdef JCOMMANDER_JAR
JCOMMANDER_JAR := $(call FullPath,$(JCOMMANDER_JAR))
endif
# Newer versions of TestNG require Google Guice
ifdef GOOGLE_GUICE_JAR
GOOGLE_GUICE_JAR := $(call FullPath,$(GOOGLE_GUICE_JAR))
endif
# Newer versions of JUnit require Hamcrest
ifdef HAMCREST_JAR
HAMCREST_JAR := $(call FullPath,$(HAMCREST_JAR))
endif
#----- Ant: http://ant.apache.org/
#
# Ant is required, to support the provision of a 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.9.4
endif
endif
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
endif
#----- Unix commands
AWK = /usr/bin/awk
CAT = /bin/cat
CHMOD = /bin/chmod
CP = /bin/cp
DIFF = /usr/bin/diff
ECHO = /bin/echo
FIND = /usr/bin/find
GREP := $(shell if [ -r /bin/grep ]; then echo /bin/grep ; else echo /usr/bin/grep ; fi )
LN = /bin/ln
LS = /bin/ls
MKDIR = /bin/mkdir
MV = /bin/mv
PANDOC = $(shell if [ -r /usr/bin/pandoc ]; then \
echo /usr/bin/pandoc ; \
elif [ -r /usr/local/bin/pandoc ]; then \
echo /usr/local/bin/pandoc ; \
else \
echo /bin/echo "pandoc not available" ; \
fi )
PERL = /usr/bin/perl
PRINTF = /usr/bin/printf
RM = /bin/rm -rf
SED := $(shell if [ -r /bin/sed ]; then echo /bin/sed ; else echo /usr/bin/sed ; fi )
SH = /bin/sh
SORT = /usr/bin/sort
TEST = /usr/bin/test
TIDY = /usr/bin/tidy
TOUCH = /usr/bin/touch
UNZIP = /usr/bin/unzip
WC = /usr/bin/wc
ZIP = /usr/bin/zip
#----------------------------------------------------------------------
#
# Identification of parts of the system
SRCDIR = $(TOPDIR)/src
JAVADIR = $(SRCDIR)/share/classes
SRCDOCDIR = $(SRCDIR)/share/doc
SRCJTDOCDIR = $(SRCDIR)/share/doc/javatest
SRCJTREGDOCDIR = $(SRCDIR)/share/doc/javatest/regtest
SRCSHAREBINDIR = $(SRCDIR)/share/bin
TESTDIR = $(TOPDIR)/test
CLASSDIR = $(BUILDDIR)/classes
ABSCLASSDIR = $(cd $(CLASSDIR); pwd)
IMAGES_DIR = $(BUILDDIR)/images
JTREG_IMAGEDIR = $(IMAGES_DIR)/jtreg
JTREG_IMAGEDOCDIR = $(JTREG_IMAGEDIR)/doc
JTREG_IMAGEJARDIR = $(JTREG_IMAGEDIR)/lib
ABS_JTREG_IMAGEJARDIR = $(shell cd $(JTREG_IMAGEJARDIR); pwd)
# source bundle locations
IMAGESRC_SRCDIR = $(IMAGESRC_TOPDIR)/src/share/classes
#----------------------------------------------------------------------
#
# Version tags
#
# BUILD_* variables are normally set (overridden) by RE builds
BUILD_VERSION = 5.2
BUILD_MILESTONE = dev
BUILD_NUMBER = b00
# don't eval dates here directly, because that leads to unstable builds
#BUILD_YEAR:sh = /bin/date +"%Y"
BUILD_YEAR_CMD = /bin/date '+%Y'
#BUILD_DOCDATE:sh = /bin/date +"%B %d, %Y"
BUILD_DOCDATE_CMD = /bin/date +'%B %d, %Y'
#BUILD_ZIPDATE:sh = /bin/date '+%d %h %Y'
BUILD_ZIPDATE_CMD = /bin/date '+%d %h %Y'
BUILD_NONFCS_MILESTONE_sh = echo $(BUILD_MILESTONE) | sed -e 's/[fF][cC][sS]//'
BUILD_NONFCS_MILESTONE = $(BUILD_NONFCS_MILESTONE_sh:sh)
# munge the BUILD values suitable for use in the bundle name
ZIPSFX_VERSION_sh = echo '$(BUILD_VERSION)' | sed -e 's|\([^0-9][^0-9]*\)|_|g'
ZIPSFX_MILESTONE_sh = echo '$(BUILD_MILESTONE)'
ZIPSFX_BUILD_sh = echo '$(BUILD_NUMBER)'
ZIPSFX_NEWBUILD_sh = echo '$(BUILD_NUMBER)' | sed -e 's|[^[0-9]||g' | xargs printf "%d"
ZIPSFX_DATE_sh = echo "`$(BUILD_ZIPDATE_CMD)`" | /usr/bin/tr -s '[A-Z] ' '[a-z]_'
VERBOSE_ZIP_SUFFIX = $(shell $(ZIPSFX_VERSION_sh))-$(shell $(ZIPSFX_MILESTONE_sh))-bin-$(shell $(ZIPSFX_BUILD_sh))-$(shell $(ZIPSFX_DATE_sh))
ifdef BUILD_MILESTONE
NEW_VERBOSE_ZIP_SUFFIX = $(BUILD_VERSION)-$(BUILD_MILESTONE)+$(shell $(ZIPSFX_NEWBUILD_sh))_bin
else
NEW_VERBOSE_ZIP_SUFFIX = $(BUILD_VERSION)+$(shell $(ZIPSFX_NEWBUILD_sh))_bin
endif
jtreg-jtreg-6.1-2/make/Makefile 0000664 0000000 0000000 00000007035 14250654265 0016336 0 ustar 00root root 0000000 0000000 #
# 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
# 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.
#
TOPDIR = ..
include Defs.gmk
include Platform.gmk
default: build
all: build test
#----------------------------------------------------------------------
include jtdiff.gmk
include jtreg.gmk
include $(TOPDIR)/test/*.gmk
include $(TOPDIR)/test/*/*.gmk
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)
new-images: $(NEWVERBOSEZIPFILES)
clean:
$(RM) $(BUILDDIR)
.NO_PARALLEL: clean
sanity:
ifdef JDK1_1HOME
@echo "JDK1_1HOME = $(JDK1_1HOME)"
endif
ifdef JDK5HOME
@echo "JDK5HOME = $(JDK5HOME)"
endif
ifdef JDK6HOME
@echo "JDK6HOME = $(JDK6HOME)"
endif
ifdef JDK7HOME
@echo "JDK7HOME = $(JDK7HOME)"
endif
ifdef JDK8HOME
@echo "JDK8HOME = $(JDK8HOME)"
endif
ifdef JDK9HOME
@echo "JDK9HOME = $(JDK9HOME)"
endif
ifdef JDK14HOME
@echo "JDK14HOME = $(JDK14HOME)"
endif
ifdef JDK18HOME
@echo "JDK18HOME = $(JDK18HOME)"
endif
@echo "JDKHOME = $(JDKHOME)"
@echo "JAVATEST_HOME = $(JAVATEST_HOME)"
ifneq ($(JTHARNESS_HOME), $(JAVATEST_HOME))
@echo "JTHARNESS_HOME = $(JTHARNESS_HOME)"
endif
@echo "JTHARNESS_LICENSE = $(JTHARNESS_LICENSE)"
@echo "JTHARNESS_COPYRIGHT = $(JTHARNESS_COPYRIGHT)"
@echo "JCOV_JAR = $(JCOV_JAR)"
@echo "JCOV_LICENSE = $(JCOV_LICENSE)"
@echo "ASMTOOLS_JAR = $(ASMTOOLS_JAR)"
@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)"
@echo "GOOGLE_JUICE_JAR = $(GOOGLE_JUICE_JAR)"
@echo "HAMCREST_JAR = $(HAMCREST_JAR)"
@echo "BUILD_VERSION = $(BUILD_VERSION)"
@echo "BUILD_MILESTONE = $(BUILD_MILESTONE)"
@echo "BUILD_NUMBER = $(BUILD_NUMBER)"
#----------------------------------------------------------------------
.PHONY: default all build test images new-images clean sanity
jtreg-jtreg-6.1-2/make/Platform.gmk 0000664 0000000 0000000 00000013334 14250654265 0017161 0 ustar 00root root 0000000 0000000 #
# Copyright (c) 1995, 2013, 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.
#
# This file is an extract from jdk/test/Makefile to model the logic
# for determining the platform keys used for ProblemList.txt
CUT = cut
UNAME = uname
# Get OS name from uname
UNAME_S := $(shell $(UNAME) -s)
# Commands to run on paths to make mixed paths for java on windows
GETMIXEDPATH=$(ECHO)
# Location of developer shared files
SLASH_JAVA = /java
# path separator
PS = :
# Platform specific settings
ifeq ($(UNAME_S), SunOS)
OS_NAME = solaris
OS_ARCH := $(shell $(UNAME) -p)
OS_VERSION := $(shell $(UNAME) -r)
endif
ifeq ($(UNAME_S), Linux)
OS_NAME = linux
OS_ARCH := $(shell $(UNAME) -m)
# Check for unknown arch, try uname -p if uname -m says unknown
ifeq ($(OS_ARCH),unknown)
OS_ARCH := $(shell $(UNAME) -p)
endif
OS_VERSION := $(shell $(UNAME) -r)
endif
ifeq ($(UNAME_S), Darwin)
OS_NAME = macosx
OS_ARCH := $(shell $(UNAME) -m)
OS_VERSION := $(shell defaults read loginwindow SystemVersionStampAsString)
endif
ifeq ($(OS_NAME),)
OS_NAME = windows
# GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always
# return "x86". Use the first word of $(PROCESSOR_IDENTIFIER) instead.
ifeq ($(PROCESSOR_IDENTIFIER),)
PROC_ARCH:=$(shell $(UNAME) -m)
else
PROC_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER))
endif
OS_ARCH:=$(PROC_ARCH)
SLASH_JAVA = J:
EXESUFFIX = .exe
# These need to be different depending on MKS or CYGWIN
ifeq ($(findstring cygdrive,$(shell (cd C:/ && pwd))), )
GETMIXEDPATH = dosname -s
OS_VERSION := $(shell $(UNAME) -r)
else
GETMIXEDPATH = cygpath -m -s
OS_VERSION := $(shell $(UNAME) -s | $(CUT) -d'-' -f2)
endif
PS = ;
endif
# Only want major and minor numbers from os version
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
# 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
# Try and use the arch names consistently
OS_ARCH:=$(patsubst x64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(patsubst X64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(patsubst AMD64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(patsubst amd64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(patsubst x86_64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(patsubst 8664,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(patsubst EM64T,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(patsubst em64t,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(patsubst intel64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(patsubst Intel64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(patsubst INTEL64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(patsubst IA64,ia64,$(OS_ARCH))
OS_ARCH:=$(patsubst X86,i586,$(OS_ARCH))
OS_ARCH:=$(patsubst x86,i586,$(OS_ARCH))
OS_ARCH:=$(patsubst i386,i586,$(OS_ARCH))
OS_ARCH:=$(patsubst i486,i586,$(OS_ARCH))
OS_ARCH:=$(patsubst i686,i586,$(OS_ARCH))
OS_ARCH:=$(patsubst 386,i586,$(OS_ARCH))
OS_ARCH:=$(patsubst 486,i586,$(OS_ARCH))
OS_ARCH:=$(patsubst 586,i586,$(OS_ARCH))
OS_ARCH:=$(patsubst 686,i586,$(OS_ARCH))
# Default ARCH_DATA_MODEL settings
ARCH_DATA_MODEL-i586 = 32
ARCH_DATA_MODEL-$(OS_ARCH_X64_NAME) = 64
ARCH_DATA_MODEL-ia64 = 64
ARCH_DATA_MODEL-sparc = 32
ARCH_DATA_MODEL-sparcv9 = 64
# If ARCH_DATA_MODEL is not defined, try and pick a reasonable default
ifndef ARCH_DATA_MODEL
ARCH_DATA_MODEL:=$(ARCH_DATA_MODEL-$(OS_ARCH))
endif
ifndef ARCH_DATA_MODEL
ARCH_DATA_MODEL=32
endif
# Platform directory name
PLATFORM_OS = $(OS_NAME)-$(OS_ARCH)
# Check ARCH_DATA_MODEL, adjust OS_ARCH accordingly on solaris
ARCH_DATA_MODEL_ERROR= \
ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) cannot be used with $(PLATFORM_OS)
ifeq ($(ARCH_DATA_MODEL),64)
ifeq ($(PLATFORM_OS),solaris-i586)
OS_ARCH=$(OS_ARCH_X64_NAME)
endif
ifeq ($(PLATFORM_OS),solaris-sparc)
OS_ARCH=sparcv9
endif
ifeq ($(OS_ARCH),i586)
x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
endif
ifeq ($(OS_ARCH),sparc)
x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
endif
else
ifeq ($(ARCH_DATA_MODEL),32)
ifeq ($(OS_ARCH),$(OS_ARCH_X64_NAME))
x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
endif
ifeq ($(OS_ARCH),ia64)
x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
endif
ifeq ($(OS_ARCH),sparcv9)
x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
endif
else
x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
endif
endif
# Alternate OS_ARCH name (defaults to OS_ARCH)
OS_ARCH2:=$(OS_ARCH2-$(OS_ARCH))
ifeq ($(OS_ARCH2),)
OS_ARCH2:=$(OS_ARCH)
endif
jtreg-jtreg-6.1-2/make/Rules.gmk 0000664 0000000 0000000 00000007763 14250654265 0016500 0 ustar 00root root 0000000 0000000 #
# Copyright (c) 1996, 2019, 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.
#
#---------------------------------------------------------------------
#
# Copy resources (*.properties) into classes directory from source tree
$(CLASSDIR)/%.properties: $(JAVADIR)/%.properties
$(RM) -f $@
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:
$(MKDIR) -p $@
#----------------------------------------------------------------------
#
# Build a JAR file containing the contents of any classes/* files
# listed in the FILES.JAR.%
# default copyright; override as necessary
JAR_COPYRIGHT = -C $(TOPDIR) COPYRIGHT
$(IMAGES_DIR)/%.jar: pkgsToFiles.sh
$(RM) $@ $(@:$(IMAGES_DIR)/%.jar=$(BUILDDIR)/jarData/%)
$(MKDIR) -p $(@D)
$(MKDIR) -p $(@:$(IMAGES_DIR)/%.jar=$(BUILDDIR)/jarData/%)
( if [ -n "$(JAR_MAINCLASS)" ]; then echo "Main-class: $(JAR_MAINCLASS)" ; fi ; \
if [ -n "$(JAR_CLASSPATH)" ]; then echo "Class-Path: $(JAR_CLASSPATH)" ; fi ; \
echo "$(@F:%.jar=%)-Name: $(@F:%.jar=%)" ; \
if [ -n "$(BUILD_VERSION_STRING)" ]; then echo "$(@F:%.jar=%)-VersionString: $(BUILD_VERSION_STRING)" ; fi ; \
echo "$(@F:%.jar=%)-Version: $(BUILD_VERSION)" ; \
echo "$(@F:%.jar=%)-Milestone: $(BUILD_MILESTONE)" ; \
echo "$(@F:%.jar=%)-Build: $(BUILD_NUMBER)" ; \
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'`" ; \
) \
> $(@:$(IMAGES_DIR)/%.jar=$(BUILDDIR)/jarData/%/manifest.txt)
sh pkgsToFiles.sh $(CLASSDIR) $($(@F:%.jar=PKGS.JAR.%)) > $(@:$(IMAGES_DIR)/%.jar=$(BUILDDIR)/jarData/%/includes.txt)
$(JAR) -cmf $(@:$(IMAGES_DIR)/%.jar=$(BUILDDIR)/jarData/%/manifest.txt) $@ \
$(JAR_COPYRIGHT) \
@$(@:$(IMAGES_DIR)/%.jar=$(BUILDDIR)/jarData/%/includes.txt) \
$(patsubst $(CLASSDIR)/%,-C $(CLASSDIR) %,$(sort $(FILES.JAR.$(@F:%.jar=%)))) \
$(JAR_EXTRAS)
$(CHMOD) a-w $@
#----------------------------------------------------------------------
#
# Build zips with verbose names
%-$(VERBOSE_ZIP_SUFFIX).zip: %.zip
$(CP) $(@:%-$(VERBOSE_ZIP_SUFFIX).zip=%.zip) $@
%-$(NEW_VERBOSE_ZIP_SUFFIX).zip: %.zip
$(RM) $@
$(LN) $(@:%-$(NEW_VERBOSE_ZIP_SUFFIX).zip=%.zip) $@
#----------------------------------------------------------------------
#
# cancel implicit rules
%: %.o
%: %.obj
%: %.dll
%: %.c
%: %.cc
%: %.cpp
%: %.C
%: %.p
%: %.f
%: %.s
%: %.F
%: %.r
%: %.S
%: %.mod
%: %.sh
jtreg-jtreg-6.1-2/make/build-support/ 0000775 0000000 0000000 00000000000 14250654265 0017502 5 ustar 00root root 0000000 0000000 jtreg-jtreg-6.1-2/make/build-support/asmtools/ 0000775 0000000 0000000 00000000000 14250654265 0021343 5 ustar 00root root 0000000 0000000 jtreg-jtreg-6.1-2/make/build-support/asmtools/build.sh 0000664 0000000 0000000 00000005703 14250654265 0023003 0 ustar 00root root 0000000 0000000 #!/bin/bash
#
# Copyright (c) 2020, 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.
#
mydir="$(dirname ${BASH_SOURCE[0]})"
log_module="$(basename "${BASH_SOURCE[0]}")"
. "${mydir}/../build-common.sh"
. "${mydir}/version-numbers"
ASMTOOLS_SRC_TAG="${ASMTOOLS_SRC_TAG:-${DEFAULT_ASMTOOLS_SRC_TAG}}"
ASMTOOLS_SRC_ARCHIVE_CHECKSUM="${ASMTOOLS_SRC_ARCHIVE_CHECKSUM:-${DEFAULT_ASMTOOLS_SRC_ARCHIVE_CHECKSUM}}"
ANT_VERSION="${ANT_VERSION:-${DEFAULT_ANT_VERSION}}"
ANT_ARCHIVE_CHECKSUM="${ANT_ARCHIVE_CHECKSUM:-${DEFAULT_ANT_ARCHIVE_CHECKSUM}}"
setup_ant
setup_asmtools_src() {
check_arguments "${FUNCNAME}" 1 $#
local dir="$1"
local ASMTOOLS_LOCAL_SRC_ARCHIVE="${dir}/../source.zip"
if [ "${ASMTOOLS_SRC_TAG}" = "tip" -o "${ASMTOOLS_SRC_TAG}" = "master" ]; then
local BRANCH="master"
get_archive_no_checksum "${CODE_TOOLS_URL_BASE}/asmtools/archive/${BRANCH}.zip" "${ASMTOOLS_LOCAL_SRC_ARCHIVE}" "${dir}"
ASMTOOLS_SRC_DIR="${dir}/asmtools-${BRANCH}"
else
get_archive "${CODE_TOOLS_URL_BASE}/asmtools/archive/${ASMTOOLS_SRC_TAG}.zip" "${ASMTOOLS_LOCAL_SRC_ARCHIVE}" "${dir}" "${ASMTOOLS_SRC_ARCHIVE_CHECKSUM}"
ASMTOOLS_SRC_DIR="${dir}/asmtools-${ASMTOOLS_SRC_TAG}"
fi
}
build_asmtools() {
check_arguments "${FUNCNAME}" 0 $#
local ASMTOOLS_SRC_DIR_BASE="${BUILD_DIR}/src"
setup_asmtools_src "${ASMTOOLS_SRC_DIR_BASE}"
local ASMTOOLS_DIST="${BUILD_DIR}/build"
"${ANT}" -DBUILD_DIR="$(native_path "${ASMTOOLS_DIST}")" -f "$(native_path "${ASMTOOLS_SRC_DIR}/build/build.xml")"
ASMTOOLS_JAR="${ASMTOOLS_DIST}/binaries/lib/asmtools.jar"
ASMTOOLS_LICENSE="${ASMTOOLS_SRC_DIR}/LICENSE"
}
build_asmtools
if [ ! x"$BUILD_RESULTS_FILE" = x"" ]; then
mkdir -p "$(dirname "${BUILD_RESULTS_FILE}")"
cat > "${BUILD_RESULTS_FILE}" << EOF
ASMTOOLS_JAR="${ASMTOOLS_JAR}"
ASMTOOLS_LICENSE="${ASMTOOLS_LICENSE}"
EOF
fi
jtreg-jtreg-6.1-2/make/build-support/asmtools/version-numbers 0000664 0000000 0000000 00000002561 14250654265 0024430 0 ustar 00root root 0000000 0000000 #
# Copyright (c) 2020, 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.
#
DEFAULT_ASMTOOLS_SRC_TAG=7.0-b09
DEFAULT_ASMTOOLS_SRC_ARCHIVE_CHECKSUM=604f5e1aad1912968781dc72a1f86043e4e2dc20
DEFAULT_ANT_VERSION=1.10.8
DEFAULT_ANT_ARCHIVE_CHECKSUM=dbe187ce2963f9df8a67de8aaff3b0a437d06978
jtreg-jtreg-6.1-2/make/build-support/build-common.sh 0000664 0000000 0000000 00000020042 14250654265 0022421 0 ustar 00root root 0000000 0000000 #
# Copyright (c) 2020, 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.
#
log_message() {
local level="$1"
shift
echo "[${log_module}][${level}] $@"
}
error() {
log_message "ERROR" "$@"
}
info() {
log_message "INFO" "$@"
}
##
# Helper used to ensure the correct number of arguments is passed to bash functions
check_arguments() {
local name="$1"
local expected="$2"
local actual="$3"
if [ ! "${expected}" = "${actual}" ]; then
error "Incorrect number of arguments to function '${name}' (expecting ${expected} but got ${actual})"
exit 1
fi
}
##
# Print an absolute path
abspath() {
check_arguments "${FUNCNAME}" 1 $#
local path="$1"
if [[ ${path} = /* ]]; then
echo "${path}"
else
echo "$PWD/${path}"
fi
}
##
# Set up the checksum tool to use
#
setup_shasum() {
if [ -n "${SHASUM:-}" ]; then
return
fi
if [ -n "$(which sha1sum)" ]; then
SHASUM="sha1sum"
SHASUM_OPTIONS=""
elif [ -n "$(which shasum)" ]; then
SHASUM="shasum"
SHASUM_OPTIONS="-a 1"
else
error "Can't find shasum or sha1sum"
exit 1
fi
}
native_path() {
check_arguments "${FUNCNAME}" 1 $#
if [ $CYGWIN_OR_MSYS -eq 1 ]; then echo $(cygpath -w $1); else echo "$1"; fi
}
mixed_path() {
check_arguments "${FUNCNAME}" 1 $#
if [ $CYGWIN_OR_MSYS -eq 1 ]; then echo $(cygpath -m $1); else echo "$1"; fi
}
##
# Download a file using wget
#
# wget options can be provided through the WGET_OPTIONS environment
# variable
#
download_using_wget() {
check_arguments "${FUNCNAME}" 2 $#
local url="$1"
local destfile="$2"
set +e
"${WGET}" ${WGET_OPTIONS} "${url}" -O "${destfile}"
ret=$?
if [ ! ${ret} = 0 ]; then
error "wget exited with exit code ${ret}"
exit 1
fi
set -e
}
##
# Download a file using curl
#
# curl options can be provided through the CURL_OPTIONS environment
# variable
#
download_using_curl() {
check_arguments "${FUNCNAME}" 2 $#
local url="$1"
local destfile="$2"
set +e
"${CURL}" ${CURL_OPTIONS} "${url}" -o "${destfile}"
ret=$?
if [ ! ${ret} = 0 ]; then
error "curl exited with exit code ${ret}"
exit 1
fi
set -e
}
##
# Download a file
#
# Will attempt to skip the download if the SKIP_DOWNLOAD environment
# variable is set and the destination file already exists
#
download() {
check_arguments "${FUNCNAME}" 2 $#
local url="$1"
local destfile="$2"
if [ "${SKIP_DOWNLOAD:-}" != "" -a -r "${destfile}" ]; then
info "Skipping download of ${url}..."
return
fi
info "Downloading ${url} to ${destfile}"
mkdir -p "$(dirname "${destfile}")"
if [ -n "${WGET}" ]; then
download_using_wget "${url}" "${destfile}"
elif [ -n "${CURL}" ]; then
download_using_curl "${url}" "${destfile}"
else
error "Cannot find a suitable tool for downloading fils (tried 'wget' and 'curl')"
exit 1
fi
}
##
# Checksum a file
#
checksum() {
check_arguments "${FUNCNAME}" 2 $#
local file="$1"
local expected="$2"
if [ -n "${SKIP_CHECKSUM_CHECK:-}" ]; then
return
fi
if [ x"${expected}" = x"" ]; then
error "Expected checksum unexpectedly empty.."
exit 1
fi
local actual="$("${SHASUM}" ${SHASUM_OPTIONS} "${dest}" | awk '{ print $1; }')"
if [ ! x"${actual}" = x"${expected}" ]; then
error "Checksum mismatch for ${dest}:"
error "Expected: ${expected}"
error "Actual : ${actual}"
exit 1
fi
}
##
# Download and checksum a file
#
download_and_checksum() {
check_arguments "${FUNCNAME}" 3 $#
local url="$1"
local dest="$2"
local shasum="$3"
download "${url}" "${dest}"
checksum "${dest}" "${shasum}"
}
##
# Unpack an archive
#
unpack() {
check_arguments "${FUNCNAME}" 2 $#
local file="$1"
local unpackdir="$2"
info "Unpacking $file in $unpackdir"
(
mkdir -p "${unpackdir}"
case ${file} in
*.tar.gz)
"${TAR_CMD}" -xzf "$1" -C "${unpackdir}"
;;
*.zip)
"${UNZIP_CMD}" -q "$1" -d "${unpackdir}"
;;
*)
error "Unknown archive type for file '${file}'"
exit 1
esac
)
}
##
# Download and unpack an archive without performing a checksum check
#
get_archive_no_checksum() {
check_arguments "${FUNCNAME}" 3 $#
local url="$1"
local destfile="$2"
local unpackdir="$3"
rm -rf "${unpackdir}"/*
download "${url}" "${destfile}"
unpack "${destfile}" "${unpackdir}"
}
##
# Download, checksum, and unpack an archive
#
get_archive() {
check_arguments "${FUNCNAME}" 4 $#
local url="$1"
local destfile="$2"
local unpackdir="$3"
local shasum="$4"
rm -rf "${unpackdir}"/*
download_and_checksum "${url}" "${destfile}" "${shasum}"
unpack "${destfile}" "${unpackdir}"
}
##
# Set up the ANT (and possibly ANT_JAR) environment variable(s)
#
setup_ant() {
check_arguments "${FUNCNAME}" 0 $#
if [ -n "${ANT:-}" ]; then
return
fi
if [ -z "${ANT_ARCHIVE_URL:-}" ]; then
if [ -n "${ANT_ARCHIVE_URL_BASE:-}" ]; then
ANT_ARCHIVE_URL="${ANT_ARCHIVE_URL_BASE}/apache-ant-${ANT_VERSION}-bin.zip"
fi
fi
local ANT_DEPS_DIR="${DEPS_DIR}/ant"
if [ -n "${ANT_ARCHIVE_URL:-}" ]; then
local ANT_LOCAL_ARCHIVE_FILE="${DEPS_DIR}/$(basename "${ANT_ARCHIVE_URL}")"
get_archive "${ANT_ARCHIVE_URL}" "${ANT_LOCAL_ARCHIVE_FILE}" "${ANT_DEPS_DIR}" "${ANT_ARCHIVE_CHECKSUM}"
ANT="$(find "${ANT_DEPS_DIR}" -path '*/bin/ant')"
ANT_JAR="$(dirname "${ANT}")/../lib/ant.jar"
return
fi
error "Neither ANT_ARCHIVE_URL or ANT_ARCHIVE_URL_BASE is set"
exit 1
}
set -e
set -u
if [ -z "${mydir:-}" ]; then
error "mydir not set in caller (line/file): $(caller)"
exit 1
fi
if [ -z "${log_module:-}" ]; then
error "log_module not set in caller (line/file): $(caller)"
exit 1
fi
ROOT="$(abspath ${ROOT:-${mydir}/..})"
BUILD_DIR="$(abspath "${BUILD_DIR:-${ROOT}/build}")"
DEPS_DIR="${BUILD_DIR}/deps"
export TAR_CMD="${TAR_CMD:-tar}"
export TAR_OPTIONS="${TAR_OPTIONS:-}"
export UNZIP_CMD="${UNZIP_CMD:-unzip}"
export UNZIP_OPTIONS="${UNZIP_OPTIONS:--q} -u"
export WGET="${WGET:-$(which wget)}"
export WGET_OPTIONS="${WGET_OPTIONS:--q}"
export CURL="${CURL:-$(which curl)}"
export CURL_OPTIONS="${CURL_OPTIONS:--s -f -L}"
export MAVEN_REPO_URL_BASE="${MAVEN_REPO_URL_BASE:-https://repo1.maven.org/maven2}"
export CODE_TOOLS_URL_BASE="${CODE_TOOLS_URL_BASE:-https://git.openjdk.java.net}"
export ANT_ARCHIVE_URL_BASE="${ANT_ARCHIVE_URL_BASE:-https://archive.apache.org/dist/ant/binaries}"
setup_shasum
##
# Support for Cygwin and MSYS2 (which may identify as MSYS, MINGW32 or MINGW64 (the default))
#
case $(uname) in CYGWIN*|MSYS*|MINGW*) CYGWIN_OR_MSYS=1 ;; *) CYGWIN_OR_MSYS=0 ;; esac
info "CYGWIN_OR_MSYS=$CYGWIN_OR_MSYS"
jtreg-jtreg-6.1-2/make/build-support/jcov/ 0000775 0000000 0000000 00000000000 14250654265 0020443 5 ustar 00root root 0000000 0000000 jtreg-jtreg-6.1-2/make/build-support/jcov/build.sh 0000664 0000000 0000000 00000015374 14250654265 0022110 0 ustar 00root root 0000000 0000000 #!/bin/bash
#
# Copyright (c) 2020, 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.
#
mydir="$(dirname ${BASH_SOURCE[0]})"
log_module="$(basename "${BASH_SOURCE[0]}")"
. "${mydir}/../build-common.sh"
. "${mydir}/version-numbers"
JCOV_SRC_TAG="${JCOV_SRC_TAG:-${DEFAULT_JCOV_SRC_TAG}}"
JCOV_SRC_ARCHIVE_CHECKSUM="${JCOV_SRC_ARCHIVE_CHECKSUM:-${DEFAULT_JCOV_SRC_ARCHIVE_CHECKSUM}}"
ANT_VERSION="${ANT_VERSION:-${DEFAULT_ANT_VERSION}}"
ANT_ARCHIVE_CHECKSUM="${ANT_ARCHIVE_CHECKSUM:-${DEFAULT_ANT_ARCHIVE_CHECKSUM}}"
ASM_VERSION="${ASM_VERSION:-${DEFAULT_ASM_VERSION}}"
ASM_URL_BASE="${ASM_URL_BASE:-${MAVEN_REPO_URL_BASE}}"
ASM_JAR_CHECKSUM="${ASM_JAR_CHECKSUM:-${DEFAULT_ASM_JAR_CHECKSUM}}"
ASM_TREE_JAR_CHECKSUM="${ASM_TREE_JAR_CHECKSUM:-${DEFAULT_ASM_TREE_JAR_CHECKSUM}}"
ASM_UTIL_JAR_CHECKSUM="${ASM_UTIL_JAR_CHECKSUM:-${DEFAULT_ASM_UTIL_JAR_CHECKSUM}}"
JTHARNESS_SRC_TAG="${JTHARNESS_SRC_TAG:-${DEFAULT_JTHARNESS_SRC_TAG}}"
JTHARNESS_SRC_ARCHIVE_CHECKSUM="${JTHARNESS_SRC_ARCHIVE_CHECKSUM:-${DEFAULT_JTHARNESS_SRC_ARCHIVE_CHECKSUM}}"
setup_ant
info "ANT: ${ANT}"
setup_jcov_src() {
check_arguments "${FUNCNAME}" 1 $#
local dir="$1"
# Build jcov
local JCOV_LOCAL_SRC_ARCHIVE="${dir}/../source.zip"
if [ "${JCOV_SRC_TAG}" = "tip" -o "${JCOV_SRC_TAG}" = "master" ]; then
local BRANCH="master"
get_archive_no_checksum "${CODE_TOOLS_URL_BASE}/jcov/archive/${BRANCH}.zip" "${JCOV_LOCAL_SRC_ARCHIVE}" "${dir}"
JCOV_SRC_DIR="${dir}/jcov-${BRANCH}"
else
get_archive "${CODE_TOOLS_URL_BASE}/jcov/archive/${JCOV_SRC_TAG}.zip" "${JCOV_LOCAL_SRC_ARCHIVE}" "${dir}" "${JCOV_SRC_ARCHIVE_CHECKSUM}"
JCOV_SRC_DIR="${dir}/jcov-${JCOV_SRC_TAG}"
fi
}
setup_asm() {
check_arguments "${FUNCNAME}" 0 $#
local ASM_DEPS_DIR="${DEPS_DIR}/asm"
ASM_JAR="${ASM_DEPS_DIR}/asm-${ASM_VERSION}.jar"
download_and_checksum "${ASM_URL_BASE}/org/ow2/asm/asm/${ASM_VERSION}/asm-${ASM_VERSION}.jar" "${ASM_JAR}" "${ASM_JAR_CHECKSUM}"
ASM_TREE_JAR="${ASM_DEPS_DIR}/asm-tree-${ASM_VERSION}.jar"
download_and_checksum "${ASM_URL_BASE}/org/ow2/asm/asm-tree/${ASM_VERSION}/asm-tree-${ASM_VERSION}.jar" "${ASM_TREE_JAR}" "${ASM_TREE_JAR_CHECKSUM}"
ASM_UTIL_JAR="${ASM_DEPS_DIR}/asm-utils-${ASM_VERSION}.jar"
download_and_checksum "${ASM_URL_BASE}/org/ow2/asm/asm-util/${ASM_VERSION}/asm-util-${ASM_VERSION}.jar" "${ASM_UTIL_JAR}" "${ASM_UTIL_JAR_CHECKSUM}"
}
setup_jtharness_javatest_jar() {
check_arguments "${FUNCNAME}" 0 $#
if [ -n "${JTHARNESS_JAVATEST_JAR:-}" ]; then
return
fi
JTHARNESS_JAVATEST_JAR="$(find "${DEPS_DIR}" -name jtharness.jar)"
if [ -n "${JTHARNESS_JAVATEST_JAR}" ]; then
return
fi
if [ -z "${JTHARNESS_ARCHIVE_URL:-}" ]; then
if [ -n "${JTHARNESS_ARCHIVE_URL_BASE:-}" ]; then
JTHARNESS_ARCHIVE_URL="${JTHARNESS_ARCHIVE_URL_BASE}/${JTHARNESS_VERSION}/${JTHARNESS_BUILD_NUMBER}/${JTHARNESS_FILE}"
fi
fi
if [ -n "${JTHARNESS_ARCHIVE_URL:-}" ]; then
local JTHARNESS_DEPS_DIR="${DEPS_DIR}/jtharness"
local JTHARNESS_LOCAL_ARCHIVE_FILE="${DEPS_DIR}/$(basename "${JTHARNESS_ARCHIVE_URL}")"
get_archive "${JTHARNESS_ARCHIVE_URL}" "${JTHARNESS_LOCAL_ARCHIVE_FILE}" "${JTHARNESS_DEPS_DIR}" "${JTHARNESS_ARCHIVE_CHECKSUM}"
JTHARNESS_JAVATEST_JAR="${JTHARNESS_DEPS_DIR}/${JTHARNESS_ARCHIVE_DIR_NAME}/lib/javatest.jar"
JTHARNESS_LICENSE="$(dirname "${JTHARNESS_JAVATEST_JAR}")/../legal/license.txt"
JTHARNESS_COPYRIGHT="$(dirname "${JTHARNESS_JAVATEST_JAR}")/../legal/copyright.txt"
return
fi
info "Neither JTHARNESS_ARCHIVE_URL or JTHARNESS_ARCHIVE_URL_BASE is set, building from source"
export JTHARNESS_BUILD_RESULTS_FILE="${BUILD_DIR}/deps/jtharness.results"
(
export BUILD_DIR="${BUILD_DIR}/deps/jtharness"
export BUILD_RESULTS_FILE="${JTHARNESS_BUILD_RESULTS_FILE}"
export JTHARNESS_SRC_TAG="${JTHARNESS_SRC_TAG}"
export JTHARNESS_SRC_ARCHIVE_CHECKSUM="${JTHARNESS_SRC_ARCHIVE_CHECKSUM}"
export ANT="${ANT}"
bash "${mydir}/../jtharness/build.sh"
)
ret=$?
if [ ! $ret = 0 ]; then
exit ${ret}
fi
. "${JTHARNESS_BUILD_RESULTS_FILE}"
}
build_jcov() {
check_arguments "${FUNCNAME}" 0 $#
setup_asm
setup_jtharness_javatest_jar
local JCOV_SRC_DIR_BASE="${BUILD_DIR}/src"
setup_jcov_src "${JCOV_SRC_DIR_BASE}"
local JCOV_DIST="${BUILD_DIR}/build"
(
cd "${JCOV_SRC_DIR}/build"
"${ANT}" -Dresult.dir="$(native_path "${JCOV_DIST}")" \
-Dasm.jar="$(native_path "${ASM_JAR}")" \
-Dasm.checksum="${ASM_JAR_CHECKSUM}" \
-Dasm.tree.jar="$(native_path "${ASM_TREE_JAR}")" \
-Dasm.tree.checksum="${ASM_TREE_JAR_CHECKSUM}" \
-Dasm.util.jar="$(native_path "${ASM_UTIL_JAR}")" \
-Dasm.util.checksum="${ASM_UTIL_JAR_CHECKSUM}" \
-Djavatestjar="$(native_path "${JTHARNESS_JAVATEST_JAR}")" \
-Dverify.strict= \
-f "$(native_path "${JCOV_SRC_DIR}/build/build.xml")"
)
local JCOV_DIST_JCOV_DIR="$(ls -d "${JCOV_DIST}/jcov"*)"
JCOV_JAR="${JCOV_DIST_JCOV_DIR}/jcov.jar"
JCOV_NETWORK_SAVER_JAR="${JCOV_DIST_JCOV_DIR}/jcov_network_saver.jar"
JCOV_LICENSE="${JCOV_SRC_DIR}/LICENSE"
}
build_jcov
if [ ! x"$BUILD_RESULTS_FILE" = x"" ]; then
mkdir -p "$(dirname "${BUILD_RESULTS_FILE}")"
cat > "${BUILD_RESULTS_FILE}" << EOF
JCOV_JAR="${JCOV_JAR}"
JCOV_NETWORK_SAVER_JAR="${JCOV_NETWORK_SAVER_JAR}"
JCOV_LICENSE="${JCOV_LICENSE}"
EOF
fi
jtreg-jtreg-6.1-2/make/build-support/jcov/version-numbers 0000664 0000000 0000000 00000003313 14250654265 0023524 0 ustar 00root root 0000000 0000000 #
# Copyright (c) 2020, 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.
#
DEFAULT_JCOV_SRC_TAG=jcov3.0-b07
DEFAULT_JCOV_SRC_ARCHIVE_CHECKSUM=c5c26085750628d58de275b3f50a7409300c0497
DEFAULT_ANT_VERSION=1.10.8
DEFAULT_ANT_ARCHIVE_CHECKSUM=dbe187ce2963f9df8a67de8aaff3b0a437d06978
DEFAULT_ASM_VERSION=8.0
DEFAULT_ASM_JAR_CHECKSUM=d1a17d07c60e9e82c8b31b1d8f9ca98726418db4
DEFAULT_ASM_TREE_JAR_CHECKSUM=7b31ca94da9f57334a5aed79b40f2b88c5ee9f4f
DEFAULT_ASM_UTIL_JAR_CHECKSUM=b21996293fd49851ed9017cfde3191e49f77fbd0
DEFAULT_JTHARNESS_SRC_TAG=jt6.0-b13
DEFAULT_JTHARNESS_SRC_ARCHIVE_CHECKSUM=43936b2616476fcac8ee4bd0132e73c015119337
jtreg-jtreg-6.1-2/make/build-support/jtharness/ 0000775 0000000 0000000 00000000000 14250654265 0021503 5 ustar 00root root 0000000 0000000 jtreg-jtreg-6.1-2/make/build-support/jtharness/build.sh 0000664 0000000 0000000 00000006256 14250654265 0023147 0 ustar 00root root 0000000 0000000 #!/bin/bash
#
# Copyright (c) 2020, 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.
#
mydir="$(dirname ${BASH_SOURCE[0]})"
log_module="$(basename "${BASH_SOURCE[0]}")"
. "${mydir}/../build-common.sh"
. "${mydir}/version-numbers"
JTHARNESS_SRC_TAG="${JTHARNESS_SRC_TAG:-${DEFAULT_JTHARNESS_SRC_TAG}}"
JTHARNESS_SRC_ARCHIVE_CHECKSUM="${JTHARNESS_SRC_ARCHIVE_CHECKSUM:-${DEFAULT_JTHARNESS_SRC_ARCHIVE_CHECKSUM}}"
ANT_VERSION="${ANT_VERSION:-${DEFAULT_ANT_VERSION}}"
ANT_ARCHIVE_CHECKSUM="${ANT_ARCHIVE_CHECKSUM:-${DEFAULT_ANT_ARCHIVE_CHECKSUM}}"
setup_ant
info "ANT: ${ANT}"
setup_jtharness_source() {
check_arguments "${FUNCNAME}" 1 $#
local dir="$1"
# Build jtharness
local JTHARNESS_LOCAL_SRC_ARCHIVE="${dir}/../source.zip"
if [ "${JTHARNESS_SRC_TAG}" = "tip" -o "${JTHARNESS_SRC_TAG}" = "master" ]; then
local BRANCH="master"
get_archive_no_checksum "${CODE_TOOLS_URL_BASE}/jtharness/archive/${BRANCH}.zip" "${JTHARNESS_LOCAL_SRC_ARCHIVE}" "${dir}"
JTHARNESS_SRC_DIR="${dir}/jtharness-${BRANCH}"
else
get_archive "${CODE_TOOLS_URL_BASE}/jtharness/archive/${JTHARNESS_SRC_TAG}.zip" "${JTHARNESS_LOCAL_SRC_ARCHIVE}" "${dir}" "${JTHARNESS_SRC_ARCHIVE_CHECKSUM}"
JTHARNESS_SRC_DIR="${dir}/jtharness-${JTHARNESS_SRC_TAG}"
fi
}
build_jtharness() {
check_arguments "${FUNCNAME}" 0 $#
local JTHARNESS_SRC_DIR_BASE="${BUILD_DIR}/src"
setup_jtharness_source "${JTHARNESS_SRC_DIR_BASE}"
local JTHARNESS_DIST="${BUILD_DIR}/build"
"${ANT}" -DBUILD_DIR="$(native_path "${JTHARNESS_DIST}")" -f "$(native_path "${JTHARNESS_SRC_DIR}/build/build.xml")"
JTHARNESS_JAVATEST_JAR="${JTHARNESS_DIST}/binaries/lib/javatest.jar"
JTHARNESS_LICENSE="${JTHARNESS_SRC_DIR}/legal/license.txt"
JTHARNESS_COPYRIGHT="${JTHARNESS_SRC_DIR}/legal/copyright.txt"
}
build_jtharness
if [ ! x"$BUILD_RESULTS_FILE" = x"" ]; then
mkdir -p "$(dirname "${BUILD_RESULTS_FILE}")"
cat > "${BUILD_RESULTS_FILE}" << EOF
JTHARNESS_JAVATEST_JAR="${JTHARNESS_JAVATEST_JAR}"
JTHARNESS_LICENSE="${JTHARNESS_LICENSE}"
JTHARNESS_COPYRIGHT="${JTHARNESS_COPYRIGHT}"
EOF
fi
jtreg-jtreg-6.1-2/make/build-support/jtharness/version-numbers 0000664 0000000 0000000 00000002565 14250654265 0024574 0 ustar 00root root 0000000 0000000 #
# Copyright (c) 2020, 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.
#
DEFAULT_JTHARNESS_SRC_TAG=jt6.0-b14
DEFAULT_JTHARNESS_SRC_ARCHIVE_CHECKSUM=3a455d4cf2c184f7db2bc73d0c110a6bf668b2fc
DEFAULT_ANT_VERSION=1.10.8
DEFAULT_ANT_ARCHIVE_CHECKSUM=dbe187ce2963f9df8a67de8aaff3b0a437d06978
jtreg-jtreg-6.1-2/make/build-support/version-numbers 0000664 0000000 0000000 00000004506 14250654265 0022570 0 ustar 00root root 0000000 0000000 #
# Copyright (c) 2020, 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.
#
JTREG_VERSION=6.1
DEFAULT_ANT_VERSION=1.10.8
DEFAULT_ANT_ARCHIVE_CHECKSUM=dbe187ce2963f9df8a67de8aaff3b0a437d06978
DEFAULT_ANT_JAR_CHECKSUM=ae148abb0532b685c5eeb22fdec9d124e89be5de
DEFAULT_ASMTOOLS_SRC_TAG=7.0-b09
DEFAULT_ASMTOOLS_SRC_ARCHIVE_CHECKSUM=604f5e1aad1912968781dc72a1f86043e4e2dc20
DEFAULT_GOOGLE_GUICE_VERSION=4.2.3
DEFAULT_GOOGLE_GUICE_JAR_CHECKSUM=2ea992d6d7bdcac7a43111a95d182a4c42eb5ff7
DEFAULT_HAMCREST_VERSION=2.2
DEFAULT_HAMCREST_JAR_CHECKSUM=1820c0968dba3a11a1b30669bb1f01978a91dedc
DEFAULT_JCOMMANDER_VERSION=1.78
DEFAULT_JCOMMANDER_JAR_CHECKSUM=a3927de9bd6f351429bcf763712c9890629d8f51
DEFAULT_JCOV_SRC_TAG=jcov3.0-b07
DEFAULT_JCOV_SRC_ARCHIVE_CHECKSUM=c5c26085750628d58de275b3f50a7409300c0497
DEFAULT_JTHARNESS_SRC_TAG=jt6.0-b14
DEFAULT_JTHARNESS_SRC_ARCHIVE_CHECKSUM=3a455d4cf2c184f7db2bc73d0c110a6bf668b2fc
DEFAULT_JUNIT_VERSION=4.13.2
DEFAULT_JUNIT_JAR_CHECKSUM=8ac9e16d933b6fb43bc7f576336b8f4d7eb5ba12
DEFAULT_JUNIT_LICENSE_FILE=LICENSE-junit.txt
DEFAULT_TESTNG_VERSION=7.3.0
DEFAULT_TESTNG_JAR_CHECKSUM=a5069c3dfba58d23702f96c3d9f5081f5ce7136f
DEFAULT_TESTNG_LICENSE_VERSION=7.3.0
DEFAULT_TESTNG_LICENSE_CHECKSUM=c646d2cd1433560a4b43cb98e7273b59aac4563c
jtreg-jtreg-6.1-2/make/build.properties 0000664 0000000 0000000 00000005376 14250654265 0020121 0 ustar 00root root 0000000 0000000 #
# Copyright (c) 2007, 2016, 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 locations here, or in ${root}/build.properties, or set on the
# ant command line
jtreg.build.resources = /opt
# JTHarness or JavaTest (should be should be 6.0 or better)
javatest.home = ${jtreg.build.resources}/jtharness/6.0
javatest.jar = ${javatest.home}/lib/javatest.jar
# the following is only true for older versions of JavaTest.
# can't use to set it automatically for some reason
#javatest.includes.javahelp.ok = true
# JavaHelp (should be version 2.0 or better)
javahelp.home = ${jtreg.build.resources}/javahelp/2.0
jhall.jar = ${javahelp.home}/javahelp/lib/jhall.jar
jh.jar = ${javahelp.home}/javahelp/lib/jh.jar
# JUnit (should be 4.10 or better)
junit.jar = ${jtreg.build.resources}/junit/4.10/junit-4.10.jar
# TestNG (should be 6.9.5 or better)
testng.jar = ${jtreg.build.resources}/testng/6.9.5/testng-6.9.5.jar
# JCommander (should be recent, e.g. 1.48 or better)
# This is required by TestNG; if it is already included in testng.jar
# you do not have to specify it here. Otherwise uncomment and update the
# following line.
#jcommander.jar = ${jtreg.build.resources}/jcommander/1.48/jcommander-1.48.jar
# AsmTools (should be 6.0 or better)
asmtools.jar = ${jtreg.build.resources}/asmtools/6.0/lib/asmtools.jar
# jcov (should be 2.0 or better)
jcov.home = ${jtreg.build.resources}/jcov/2.0
# Ant (should be version 1.6.5 or better)
ant.home = ${jtreg.build.resources}/ant/1.7.1
ant.jar = ${ant.home}/lib/ant.jar
# checkstyle (should be version 5.4 or better)
checkstyle.home = ${jtreg.build.resources}/checkstyle/5.4
build.version = 5.0
build.milestone = dev
build.number = b00
jtreg-jtreg-6.1-2/make/build.sh 0000664 0000000 0000000 00000101335 14250654265 0016327 0 ustar 00root root 0000000 0000000 #!/bin/bash
#
# Copyright (c) 2020, 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.
#
# This script will download/build the dependencies for jtreg and then
# build jtreg. Downloaded files are verified against known/specified
# specified checksums.
# The default version to use when building jtreg can be found in the
# make/version-numbers file, where the default versions and
# corresponding known checksums for the dependencies are also
# specified. Almost all of the defaults can be overridden by setting
# the respective environment variables.
# For each of the dependency the following steps are applied and the
# first successful one is used:
#
# 1. Check if the dependency is available locally
# 2. Download a prebuilt version of the dependency
# 3. Build the dependency from source, downloading the source archive
# first
#
# In particular, when not found locally the dependencies will be
# handled as follows:
#
# * JUnit, TestNG, JCommander, and Ant jar are by default
# downloaded from Maven central.
# * JT Harness, JCov, and AsmTools are downloaded or built from
# source.
# * The JDK dependency is downloaded. No default URL is set.
#
# Some noteworthy control variables:
#
# MAVEN_REPO_URL_BASE (e.g. "https://repo1.maven.org/maven2")
# The base URL for the maven central repository.
#
# CODE_TOOLS_URL_BASE (e.g. "https://git.openjdk.java.net")
# The base URL for the code tools source repositories.
#
# ANT_ARCHIVE_URL_BASE (e.g. "https://archive.apache.org/dist/ant/binaries")
# The base URL for Ant dist binaries.
#
# JTREG_VERSION (e.g. "5.2")
# JTREG_VERSION_STRING (e.g. "jtreg-5.2+8"
# JTREG_BUILD_NUMBER (e.g. "8")
# JTREG_BUILD_MILESTONE (e.g. "dev")
# The version information to use for when building jtreg.
#
# MAKE_ARGS (e.g. "-j4 all")
# Additional arguments to pass to make when building jtreg.
#
# WGET
# The wget-like executable to use when downloading files.
#
# WGET_OPTS (e.g. "-v")
# Additional arguments to pass to WGET when downloading files.
#
# CURL (e.g. "/path/to/my/wget")
# The curl-like executable to use when downloading files.
# Note: If available, wget will be preferred.
#
# CURL_OPTS (e.g. "-v")
# Additional arguments to pass to CURL when downloading files.
#
# SKIP_DOWNLOAD
# Skip the downloads if the file is already present locally.
#
# SKIP_CHECKSUM_CHECK
# Skip the checksum verification for downloaded files.
# The control variables for dependencies are on the following general
# form (not all of them are relevant for all dependencies):
#
# _URL (e.g. JTHARNESS_ARCHIVE_URL)
# The full URL for the dependency.
#
# _URL_BASE (e.g. JTHARNESS_ARCHIVE_URL_BASE)
# The base URL for the dependency. Requires additional dependency
# specific variables to be specified.
#
# _CHECKSUM (e.g. JTHARNESS_ARCHIVE_CHECKSUM)
# The expected checksum of the download file.
#
# _SRC_TAG (e.g. JTHARNESS_SRC_TAG)
# The SCM tag to use when building from source. The special value
# "tip" can be used to get the most recent version.
#
# _SRC_ARCHIVE_CHECKSUM (e.g. JTHARNESS_SRC_ARCHIVE_CHECKSUM)
# The checksum of the source archive.
#
# The below outlines the details of how the dependencies are
# handled. For each dependency the steps are tried in order and the
# first successful one will be used.
#
# Ant
# Checksum variables:
# ANT_ARCHIVE_CHECKSUM: checksum of binary archive
#
# 1. ANT
# The path to the ant executable.
# 2a. ANT_ARCHIVE_URL
# The full URL for the archive.
# 2b. ANT_ARCHIVE_URL_BASE + ANT_VERSION
# The individual URL components used to construct the full URL.
#
# Ant jar
# Checksum variables:
# ANT_JAR_CHECKSUM: checksum of binary archive
#
# 1. ANT_JAR
# The path to ant.jar.
# 2a. ANT_JAR_URL
# The full URL for the jar.
# 2b. ANT_JAR_URL_BASE + ANT_JAR_VERSION
# The individual URL components used to construct the full URL.
#
# AsmTools
# Checksum variables:
# ASMTOOLS_ARCHIVE_CHECKSUM: checksum of binary archive
# ASMTOOLS_SRC_ARCHIVE_CHECKSUM: checksum of source archive
#
# 1. ASMTOOLS_JAR + ASMTOOLS_LICENSE
# The path to asmtools.jar and LICENSE respectively.
# 2a. ASMTOOLS_ARCHIVE_URL
# The full URL for the archive.
# 2b. ASMTOOLS_ARCHIVE_URL_BASE + ASMTOOLS_VERSION + ASMTOOLS_BUILD_NUMBER + ASMTOOLS_FILE
# The individual URL components used to construct the full URL.
# 3. ASMTOOLS_SRC_TAG
# The SCM repository tag to use when building from source.
#
# Google Guice (required by TestNG)
# Checksum variables:
# GOOGLE_GUICE_JAR_CHECKSUM: checksum of jar
#
# 1. GOOGLE_GUICE_JAR
# The path to guice.jar.
# 2a. GOOGLE_GUICE_JAR_URL
# The full URL for the jar.
# 2b. GOOGLE_GUICE_JAR_URL_BASE + GOOGLE_GUICE_VERSION
# The individual URL components used to construct the full URL.
#
# Hamcrest (required by JUnit)
# Checksum variables:
# HAMCREST_JAR_CHECKSUM: checksum of jar
#
# 1. HAMCREST_JAR
# The path to hamcrest.jar.
# 2a. HAMCREST_JAR_URL
# The full URL for the jar.
# 2b. HAMCREST_JAR_URL_BASE + HAMCREST_VERSION
# The individual URL components used to construct the full URL.
#
# JCommander (required by TestNG)
# Checksum variables:
# JCOMMANDER_JAR_CHECKSUM: checksum of jar
#
# 1. JCOMMANDER_JAR
# The path to jcommander.jar.
# 2a. JCOMMANDER_JAR_URL
# The full URL for the jar.
# 2b. JCOMMANDER_JAR_URL_BASE + JCOMMANDER_VERSION
# The individual URL components used to construct the full URL.
#
# JCov
# Checksum variables:
# JCOV_ARCHIVE_CHECKSUM: checksum of binary archive
# JCOV_SRC_ARCHIVE_CHECKSUM: checksum of source archive
#
# 1. JCOV_JAR + JCOV_NETWORK_SAVER_JAR + JCOV_LICENSE
# The path to jcov.jar, jcov_network_saver.jar, and LICENSE respectively.
# 2a. JCOV_ARCHIVE_URL
# The full URL for the archive.
# 2b. JCOV_ARCHIVE_URL_BASE + JCOV_VERSION + JCOV_BUILD_NUMBER + JCOV_FILE
# The individual URL components used to construct the full URL.
# 3. JCOV_SRC_TAG
# The SCM repository tag to use when building from source.
#
# JDK
# Checksum variables:
# JDK_ARCHIVE_CHECKSUM: checksum of binary archive
#
# 1. JAVA_HOME
# The path to the JDK.
# 2a. JDK_ARCHIVE_URL
# The full URL for the archive.
# 2b. JDK_ARCHIVE_URL_BASE + JDK_VERSION + JDK_BUILD_NUMBER + JDK_FILE
# The individual URL components used to construct the full URL.
#
# JT Harness
# Checksum variables:
# JTHARNESS_ARCHIVE_CHECKSUM: checksum of binary archive
# JTHARNESS_SRC_ARCHIVE_CHECKSUM: checksum of source archive
#
# 1. JTHARNESS_JAVATEST_JAR + JTHARNESS_LICENSE + JTHARNESS_COPYRIGHT
# The path to javatest.jar, license.txt, and copyright.txt respectively.
# 2a. JTHARNESS_ARCHIVE_URL
# The full URL for the archive.
# 2b. JTHARNESS_ARCHIVE_URL_BASE + JTHARNESS_VERSION + JTHARNESS_BUILD_NUMBER + JTHARNESS_FILE
# The individual URL components used to construct the full URL.
# 3. JTHARNESS_SRC_TAG
# The SCM repository tag to use when building from source.
#
# JUnit (requires HamCrest)
# Checksum variables:
# JUNIT_JAR_CHECKSUM: checksum of binary archive
#
# 1. JUNIT_JAR + JUNIT_LICENSE
# The path to asmtools.jar and LICENSE respectively.
# 2a. JUNIT_JAR_URL
# The full URL for the jar.
# 2b. JUNIT_JAR_URL_BASE + JUNIT_VERSION + JUNIT_FILE
# The individual URL components used to construct the full URL.
#
# TestNG (requires JCommander, Google Guice)
# Checksum variables:
# TESTNG_JAR_CHECKSUM: checksum of binary archive
# TESTNG_LICENSE_CHECKSUM: checksum of LICENSE file
#
# 1. TESTNG_JAR + TESTNG_LICENSE
# The path to testng.jar and LICENSE.txt respectively.
# 2a. TESTNG_JAR_URL
# The full URL for the jar.
# 2b. TESTNG_JAR_URL_BASE + TESTNG_VERSION + TESTNG_FILE
# The individual URL components used to construct the full URL.
#
mydir="$(dirname ${BASH_SOURCE[0]})"
log_module="$(basename "${BASH_SOURCE[0]}")"
. "${mydir}/build-support/build-common.sh"
usage() {
echo "Usage: $0 [ [--] ]"
echo "--help"
echo " Show this message"
echo "--jdk /path/to/jdk"
echo " Path to JDK; must be JDK 8 or higher"
echo "--quiet | -q"
echo " Reduce the logging output."
echo "--show-default-versions"
echo " Show default versions of external components"
echo "--show-config-details"
echo " Show configuration details"
echo "--skip-checksum-check"
echo " Skip the checksum check for downloaded files."
echo "--skip-download"
echo " Skip downloading files if file already available"
echo "--skip-make"
echo " Skip running 'make' (just download dependencies if needed)"
echo "--version-numbers file"
echo " Provide an alternate file containing dependency version information"
echo "--"
echo " Subsequent arguments are for 'make'"
}
ensure_arg() {
check_arguments "${FUNCNAME}" 2 $#
local option="$1"
local arg_count="$2"
if [ "$2" -lt "2" ]; then
echo "The $option option requires an argument"
exit
fi
}
process_args() {
while [ "$#" -gt 0 ]; do
case "$1" in
--help|-h ) HELP=1 ; shift ;;
--jdk ) ensure_arg "$1" $# ; JAVA_HOME="$2" ; shift ; shift ;;
--quiet|-q ) export QUIET=1 ; shift ;;
--show-config-details ) SHOW_CONFIG_DETAILS=1 ; shift ;;
--show-default-versions ) SHOW_DEFAULT_VERSIONS=1 ; shift ;;
--skip-checksum-check ) export SKIP_CHECKSUM_CHECK=1 ; shift ;;
--skip-download ) export SKIP_DOWNLOAD=1 ; shift ;;
--skip-make ) SKIP_MAKE=1 ; shift ;;
--version-numbers ) ensure_arg "$1" $# ; VERSION_NUMBERS="$2" ; shift ; shift ;;
-- ) shift ; MAKE_ARGS="$@" ; break ;;
-* ) error "unknown option: '$1'" ; exit 1 ;;
* ) MAKE_ARGS="$@" ; break ;;
esac
done
}
process_args "$@"
if [ -n "${HELP:-}" ]; then
usage
exit
fi
. "${VERSION_NUMBERS:-${mydir}/build-support/version-numbers}"
JTREG_VERSION="${JTREG_VERSION:-}"
ANT_VERSION="${ANT_VERSION:-${DEFAULT_ANT_VERSION}}"
ANT_ARCHIVE_CHECKSUM="${ANT_ARCHIVE_CHECKSUM:-${DEFAULT_ANT_ARCHIVE_CHECKSUM}}"
ANT_JAR_VERSION="${ANT_JAR_VERSION:-${ANT_VERSION}}"
ANT_JAR_URL_BASE="${ANT_JAR_URL_BASE:-${MAVEN_REPO_URL_BASE}}"
ANT_JAR_VERSION="${ANT_JAR_VERSION:-${DEFAULT_ANT_JAR_VERSION:-${ANT_VERSION}}}"
ANT_JAR_CHECKSUM="${ANT_JAR_CHECKSUM:-${DEFAULT_ANT_JAR_CHECKSUM}}"
# Not available in Maven
ASMTOOLS_SRC_TAG="${ASMTOOLS_SRC_TAG:-${DEFAULT_ASMTOOLS_SRC_TAG}}"
ASMTOOLS_SRC_ARCHIVE_CHECKSUM="${ASMTOOLS_SRC_ARCHIVE_CHECKSUM:-${DEFAULT_ASMTOOLS_SRC_ARCHIVE_CHECKSUM}}"
GOOGLE_GUICE_VERSION="${GOOGLE_GUICE_VERSION:-${DEFAULT_GOOGLE_GUICE_VERSION}}"
GOOGLE_GUICE_JAR_URL_BASE="${GOOGLE_GUICE_JAR_URL_BASE:-${MAVEN_REPO_URL_BASE}}"
GOOGLE_GUICE_JAR_CHECKSUM="${GOOGLE_GUICE_JAR_CHECKSUM:-${DEFAULT_GOOGLE_GUICE_JAR_CHECKSUM}}"
HAMCREST_VERSION="${HAMCREST_VERSION:-${DEFAULT_HAMCREST_VERSION}}"
HAMCREST_JAR_URL_BASE="${HAMCREST_JAR_URL_BASE:-${MAVEN_REPO_URL_BASE}}"
HAMCREST_JAR_CHECKSUM="${HAMCREST_JAR_CHECKSUM:-${DEFAULT_HAMCREST_JAR_CHECKSUM}}"
JCOMMANDER_VERSION="${JCOMMANDER_VERSION:-${DEFAULT_JCOMMANDER_VERSION}}"
JCOMMANDER_JAR_URL_BASE="${JCOMMANDER_JAR_URL_BASE:-${MAVEN_REPO_URL_BASE}}"
JCOMMANDER_JAR_CHECKSUM="${JCOMMANDER_JAR_CHECKSUM:-${DEFAULT_JCOMMANDER_JAR_CHECKSUM}}"
# Not available in Maven
JCOV_SRC_TAG="${JCOV_SRC_TAG:-${DEFAULT_JCOV_SRC_TAG}}"
JCOV_SRC_ARCHIVE_CHECKSUM="${JCOV_SRC_ARCHIVE_CHECKSUM:-${DEFAULT_JCOV_SRC_ARCHIVE_CHECKSUM}}"
# Not available in Maven
JTHARNESS_SRC_TAG="${JTHARNESS_SRC_TAG:-${DEFAULT_JTHARNESS_SRC_TAG}}"
JTHARNESS_SRC_ARCHIVE_CHECKSUM="${JTHARNESS_SRC_ARCHIVE_CHECKSUM:-${DEFAULT_JTHARNESS_SRC_ARCHIVE_CHECKSUM}}"
JUNIT_VERSION="${JUNIT_VERSION:-${DEFAULT_JUNIT_VERSION}}"
JUNIT_JAR_URL_BASE="${JUNIT_JAR_URL_BASE:-${MAVEN_REPO_URL_BASE}}"
JUNIT_JAR_CHECKSUM="${JUNIT_JAR_CHECKSUM:-${DEFAULT_JUNIT_JAR_CHECKSUM}}"
JUNIT_LICENSE_FILE="${JUNIT_LICENSE_FILE:-${DEFAULT_JUNIT_LICENSE_FILE}}"
TESTNG_VERSION="${TESTNG_VERSION:-${DEFAULT_TESTNG_VERSION}}"
TESTNG_JAR_URL_BASE="${TESTNG_JAR_URL_BASE:-${MAVEN_REPO_URL_BASE}}"
TESTNG_JAR_CHECKSUM="${TESTNG_JAR_CHECKSUM:-${DEFAULT_TESTNG_JAR_CHECKSUM}}"
TESTNG_LICENSE_VERSION="${TESTNG_LICENSE_VERSION:-${DEFAULT_TESTNG_LICENSE_VERSION:-${TESTNG_VERSION}}}"
TESTNG_LICENSE_CHECKSUM="${TESTNG_LICENSE_CHECKSUM:-${DEFAULT_TESTNG_LICENSE_CHECKSUM}}"
if [ "${SHOW_DEFAULT_VERSIONS:-}" != "" ]; then
find ${mydir} -name version-numbers | \
xargs cat | \
grep -v '^#' | \
grep -E 'DEFAULT.*(_VERSION|_SRC_TAG)' | \
sort -u
exit
fi
if [ "${SHOW_CONFIG_DETAILS:-}" != "" ]; then
( set -o posix ; set ) | \
grep -E '^(ANT|ASM|ASMTOOLS|GOOGLE_GUICE|HAMCREST|JCOMMANDER|JCOV|JTHARNESS|JUNIT|TESTNG)_[A-Z_]*=' | \
sort -u
exit
fi
setup_java_home() {
check_arguments "${FUNCNAME}" 0 $#
if [ -n "${JAVA_HOME:-}" ]; then
return
fi
if [ -z "${JDK_ARCHIVE_URL:-}" ]; then
if [ -n "${JDK_ARCHIVE_URL_BASE:-}" ]; then
if [ -z "${JDK_VERSION:-}" ]; then
error "JDK_VERSION not set"
exit 1
fi
if [ -z "${JDK_BUILD_NUMBER:-}" ]; then
error "JDK_BUILD_NUMBER not set"
exit 1
fi
if [ -z "${JDK_FILE:-}" ]; then
error "JDK_FILE not set"
exit 1
fi
JDK_ARCHIVE_URL="${JDK_ARCHIVE_URL_BASE}/${JDK_VERSION}/${JDK_BUILD_NUMBER}/${JDK_FILE}"
fi
fi
local JDK_DEPS_DIR="${DEPS_DIR}"
if [ -n "${JDK_ARCHIVE_URL:-}" ]; then
local JDK_LOCAL_ARCHIVE_FILE="${DEPS_DIR}/$(basename "${JDK_ARCHIVE_URL}")"
if [ -n "${JDK_ARCHIVE_CHECKSUM:-}" ]; then
get_archive "${JDK_ARCHIVE_URL}" "${JDK_LOCAL_ARCHIVE_FILE}" "${JDK_DEPS_DIR}" "${JDK_ARCHIVE_CHECKSUM}"
else
get_archive_no_checksum "${JDK_ARCHIVE_URL}" "${JDK_LOCAL_ARCHIVE_FILE}" "${JDK_DEPS_DIR}"
fi
local JDK_JAVAC="$(find "${JDK_DEPS_DIR}" -path '*/bin/javac')"
JAVA_HOME="$(dirname $(dirname "${JDK_JAVAC}"))"
return
fi
error "None of JAVA_HOME, JDK_ARCHIVE_URL or JDK_ARCHIVE_URL_BASE are set"
exit 1
}
sanity_check_java_home() {
if [ -z "${JAVA_HOME:-}" ]; then
error "No JAVA_HOME set"
exit 1
fi
if [ ! -d "${JAVA_HOME}" ]; then
error "'${JAVA_HOME}' is not a directory"
exit 1
fi
if [ ! -x "${JAVA_HOME}/bin/java" ]; then
error "Could not find an executable binary at '${JAVA_HOME}/bin/java'"
exit 1
fi
local version=$(${JAVA_HOME}/bin/java -version 2>&1)
local vnum=$(echo "${version}" | \
grep -e ^java -e ^openjdk |
head -n 1 | \
sed -e 's/^[^0-9]*\(1\.\)*\([1-9][0-9]*\).*/\2/' )
if [ "${vnum:-0}" -lt "8" ]; then
error "JDK 8 or newer is required to build jtreg"
exit 1
fi
}
setup_java_home
sanity_check_java_home
export JAVA_HOME
info "JAVA_HOME: ${JAVA_HOME}"
#----- Ant -----
setup_ant
info "ANT: ${ANT}"
#----- Ant jar -----
setup_ant_jar() {
check_arguments "${FUNCNAME}" 0 $#
if [ -n "${ANT_JAR:-}" ]; then
return
fi
if [ -z "${ANT_JAR_URL:-}" ]; then
if [ -n "${ANT_JAR_URL_BASE:-}" ]; then
if [ -z "${ANT_JAR_VERSION:-}" ]; then
error "ANT_JAR_VERSION not set"
exit 1
fi
ANT_JAR_URL="${ANT_JAR_URL_BASE}/org/apache/ant/ant/${ANT_JAR_VERSION}/ant-${ANT_JAR_VERSION}.jar"
fi
fi
local ANT_JAR_DEPS_DIR="${DEPS_DIR}/ant-jar"
if [ -n "${ANT_JAR_URL:-}" ]; then
ANT_JAR="${ANT_JAR_DEPS_DIR}/$(basename ${ANT_JAR_URL})"
download_and_checksum "${ANT_JAR_URL}" "${ANT_JAR}" "${ANT_JAR_CHECKSUM}"
return
fi
error "None of ANT_JAR, ANT_JAR_URL or ANT_JAR_URL_BASE are set"
exit 1
}
setup_ant_jar
info "ANT_JAR: ${ANT_JAR}"
#----- JT Harness -----
setup_jtharness_javatest_jar() {
check_arguments "${FUNCNAME}" 0 $#
if [ -n "${JTHARNESS_JAVATEST_JAR:-}" ]; then
return
fi
if [ -z "${JTHARNESS_ARCHIVE_URL:-}" ]; then
if [ -n "${JTHARNESS_ARCHIVE_URL_BASE:-}" ]; then
JTHARNESS_ARCHIVE_URL="${JTHARNESS_ARCHIVE_URL_BASE}/${JTHARNESS_VERSION}/${JTHARNESS_BUILD_NUMBER}/${JTHARNESS_FILE}"
fi
fi
local JTHARNESS_DEPS_DIR="${DEPS_DIR}/jtharness"
if [ -n "${JTHARNESS_ARCHIVE_URL:-}" ]; then
local JTHARNESS_LOCAL_ARCHIVE_FILE="${DEPS_DIR}/$(basename "${JTHARNESS_ARCHIVE_URL}")"
get_archive "${JTHARNESS_ARCHIVE_URL}" "${JTHARNESS_LOCAL_ARCHIVE_FILE}" "${JTHARNESS_DEPS_DIR}" "${JTHARNESS_ARCHIVE_CHECKSUM}"
JTHARNESS_JAVATEST_JAR="$(find "${JTHARNESS_DEPS_DIR}" -path '*/lib/javatest.jar')"
JTHARNESS_LICENSE="$(dirname "${JTHARNESS_JAVATEST_JAR}")/../legal/license.txt"
JTHARNESS_COPYRIGHT="$(dirname "${JTHARNESS_JAVATEST_JAR}")/../legal/copyright.txt"
return
fi
info "None of JTHARNESS_JAVATEST_JAR, JTHARNESS_ARCHIVE_URL or JTHARNESS_ARCHIVE_URL_BASE are set; building from source"
export JTHARNESS_BUILD_RESULTS_FILE="${DEPS_DIR}/jtharness.results"
(
export BUILD_DIR="${JTHARNESS_DEPS_DIR}"
export BUILD_RESULTS_FILE="${JTHARNESS_BUILD_RESULTS_FILE}"
export JTHARNESS_SRC_TAG="${JTHARNESS_SRC_TAG}"
export JTHARNESS_SRC_ARCHIVE_CHECKSUM="${JTHARNESS_SRC_ARCHIVE_CHECKSUM}"
export ANT="${ANT}"
bash "${mydir}/build-support/jtharness/build.sh"
)
ret=$?
if [ ! $ret = 0 ]; then
exit ${ret}
fi
. "${JTHARNESS_BUILD_RESULTS_FILE}"
}
setup_jtharness_javatest_jar
info "JTHARNESS_JAVATEST_JAR: ${JTHARNESS_JAVATEST_JAR}"
#----- JT Harness License and Copyright -----
setup_jtharness_license_and_copyright() {
check_arguments "${FUNCNAME}" 0 $#
if [ -n "${JTHARNESS_LICENSE:-}" -a -n "${JTHARNESS_COPYRIGHT:-}" ]; then
return
fi
if [ -z "${JTHARNESS_SRC:-}" ]; then
local JTHARNESS_SRC_DEPS_DIR="${DEPS_DIR}/jtharness-src"
local JTHARNESS_LOCAL_SRC_ARCHIVE="${JTHARNESS_SRC_DEPS_DIR}/source.zip"
get_archive "${CODE_TOOLS_URL_BASE}/jtharness/archive/${JTHARNESS_SRC_VERSION}.zip" "${JTHARNESS_LOCAL_SRC_ARCHIVE}" "${JTHARNESS_SRC_DEPS_DIR}" "${JTHARNESS_SRC_ARCHIVE_CHECKSUM}"
JTHARNESS_SRC="${JTHARNESS_SRC_DEPS_DIR}/jtharness-${JTHARNESS_SRC_VERSION}"
fi
JTHARNESS_LICENSE="${JTHARNESS_SRC}/legal/license.txt"
JTHARNESS_COPYRIGHT="${JTHARNESS_SRC}/legal/copyright.txt"
}
setup_jtharness_license_and_copyright
info "JTHARNESS_LICENSE: ${JTHARNESS_LICENSE}"
info "JTHARNESS_COPYRIGHT: ${JTHARNESS_COPYRIGHT}"
#----- JCov -----
setup_jcov() {
check_arguments "${FUNCNAME}" 0 $#
if [ -n "${JCOV_JAR:-}" -a -n "${JCOV_NETWORK_SAVER_JAR:-}" ]; then
return
fi
if [ -z "${JCOV_ARCHIVE_URL:-}" ]; then
if [ -n "${JCOV_ARCHIVE_URL_BASE:-}" ]; then
JCOV_ARCHIVE_URL="${JCOV_ARCHIVE_URL_BASE}/${JCOV_VERSION}/${JCOV_BUILD_NUMBER}/${JCOV_FILE}"
fi
fi
local JCOV_DEPS_DIR="${DEPS_DIR}/jcov"
if [ -n "${JTHARNESS_ARCHIVE_URL:-}" ]; then
local JCOV_LOCAL_ARCHIVE_FILE="${DEPS_DIR}/$(basename "${JCOV_ARCHIVE_URL}")"
get_archive "${JCOV_ARCHIVE_URL}" "${JCOV_LOCAL_ARCHIVE_FILE}" "${JCOV_DEPS_DIR}" "${JCOV_ARCHIVE_CHECKSUM}"
JCOV_JAR="${JCOV_DEPS_DIR}/jcov_${JCOV_VERSION}/lib/jcov.jar"
JCOV_NETWORK_SAVER_JAR="${JCOV_DEPS_DIR}/jcov_${JCOV_VERSION}/lib/jcov_network_saver.jar"
return
fi
info "None of JCOV_JAR, JCOV_ARCHIVE_URL or JCOV_ARCHIVE_URL_BASE are set; building from source"
export JCOV_BUILD_RESULTS_FILE="${DEPS_DIR}/jcov.results"
(
export BUILD_DIR="${JCOV_DEPS_DIR}"
export BUILD_RESULTS_FILE="${JCOV_BUILD_RESULTS_FILE}"
export JCOV_SRC_TAG="${JCOV_SRC_TAG}"
export JCOV_SRC_ARCHIVE_CHECKSUM="${JCOV_SRC_ARCHIVE_CHECKSUM}"
export ANT="${ANT}"
export JTHARNESS_JAVATEST_JAR="${JTHARNESS_JAVATEST_JAR}"
bash "${mydir}/build-support/jcov/build.sh"
)
ret=$?
if [ ! $ret = 0 ]; then
exit ${ret}
fi
. "${JCOV_BUILD_RESULTS_FILE}"
}
setup_jcov
info "JCOV_JAR: ${JCOV_JAR}"
info "JCOV_NETWORK_SAVER_JAR: ${JCOV_NETWORK_SAVER_JAR}"
#----- JCov License -----
# TODO: File issue to include LICENSE in the jcov binary bundle
setup_jcov_license() {
check_arguments "${FUNCNAME}" 0 $#
if [ -n "${JCOV_LICENSE:-}" ]; then
return
fi
if [ -z "${JCOV_SRC:-}" ]; then
local JCOV_SRC_DEPS_DIR="${DEPS_DIR}/jcov-src"
local JCOV_LOCAL_SRC_ARCHIVE_FILE="${JCOV_SRC_DEPS_DIR}/source.zip"
get_archive "${CODE_TOOLS_URL_BASE}/jcov/archive/${JCOV_SRC_TAG}.zip" "${JCOV_LOCAL_SRC_ARCHIVE_FILE}" "${JCOV_SRC_DEPS_DIR}" "${JCOV_SRC_ARCHIVE_CHECKSUM}"
JCOV_SRC="${JCOV_SRC_DEPS_DIR}/jcov-${JCOV_SRC_TAG}"
fi
JCOV_LICENSE="${JCOV_SRC}/LICENSE"
}
setup_jcov_license
info "JCOV_LICENSE: ${JCOV_LICENSE}"
#----- AsmTools -----
setup_asmtools() {
check_arguments "${FUNCNAME}" 0 $#
if [ -n "${ASMTOOLS_JAR:-}" -a -n "${ASMTOOLS_LICENSE:-}" ]; then
return
fi
if [ -z "${ASMTOOLS_ARCHIVE_URL:-}" ]; then
if [ -n "${ASMTOOLS_ARCHIVE_URL_BASE:-}" ]; then
if [ -z "${ASMTOOLS_VERSION:-}" ]; then
error "ASMTOOLS_VERSION not set"
exit 1
fi
if [ -z "${ASMTOOLS_BUILD_NUMBER:-}" ]; then
error "ASMTOOLS_BUILD_NUMBER not set"
exit 1
fi
if [ -z "${ASMTOOLS_FILE:-}" ]; then
error "ASMTOOLS_FILE not set"
exit 1
fi
ASMTOOLS_ARCHIVE_URL="${ASMTOOLS_ARCHIVE_URL_BASE}/${ASMTOOLS_VERSION}/${ASMTOOLS_BUILD_NUMBER}/${ASMTOOLS_FILE}"
fi
fi
local ASMTOOLS_DEPS_DIR="${DEPS_DIR}/asmtools"
if [ -n "${ASMTOOLS_ARCHIVE_URL:-}" ]; then
local ASMTOOLS_LOCAL_ARCHIVE_FILE="${DEPS_DIR}/$(basename "${ASMTOOLS_ARCHIVE_URL}")"
get_archive "${ASMTOOLS_ARCHIVE_URL}" "${ASMTOOLS_LOCAL_ARCHIVE_FILE}" "${ASMTOOLS_DEPS_DIR}" "${ASMTOOLS_ARCHIVE_CHECKSUM}"
ASMTOOLS_JAR="$(find "${ASMTOOLS_DEPS_DIR}" -name asmtools.jar)"
ASMTOOLS_LICENSE="$(dirname "${ASMTOOLS_JAR}")/../LICENSE"
return
fi
info "None of ASMTOOLS_JAR, ASMTOOLS_ARCHIVE_URL or ASMTOOLS_ARCHIVE_URL_BASE are set; building from source"
export ASMTOOLS_BUILD_RESULTS_FILE="${DEPS_DIR}/asmtools.results"
(
export BUILD_DIR="${ASMTOOLS_DEPS_DIR}"
export BUILD_RESULTS_FILE="${ASMTOOLS_BUILD_RESULTS_FILE}"
export ANT="${ANT}"
export ASMTOOLS_SRC_TAG="${ASMTOOLS_SRC_TAG}"
bash "${mydir}/build-support/asmtools/build.sh"
)
ret=$?
if [ ! $ret = 0 ]; then
exit ${ret}
fi
. "${ASMTOOLS_BUILD_RESULTS_FILE}"
}
setup_asmtools
info "ASMTOOLS_JAR: ${ASMTOOLS_JAR}"
info "ASMTOOLS_LICENSE: ${ASMTOOLS_LICENSE}"
#----- JUnit -----
setup_junit() {
check_arguments "${FUNCNAME}" 0 $#
if [ -n "${JUNIT_JAR:-}" ]; then
return
fi
if [ -z "${JUNIT_JAR_URL:-}" ]; then
if [ -n "${JUNIT_JAR_URL_BASE:-}" ]; then
JUNIT_JAR_URL="${JUNIT_JAR_URL_BASE}/junit/junit/${JUNIT_VERSION}/junit-${JUNIT_VERSION}.jar"
fi
fi
local JUNIT_DEPS_DIR="${DEPS_DIR}/junit"
if [ -n "${JUNIT_JAR_URL:-}" ]; then
JUNIT_JAR="${JUNIT_DEPS_DIR}/$(basename ${JUNIT_JAR_URL})"
download_and_checksum "${JUNIT_JAR_URL}" "${JUNIT_JAR}" "${JUNIT_JAR_CHECKSUM}"
return
fi
error "None of JUNIT_JAR, JUNIT_JAR_URL or JUNIT_JAR_URL_BASE is set"
exit 1
}
setup_junit
info "JUNIT_JAR ${JUNIT_JAR}"
#----- JUnit license -----
setup_junit_license() {
check_arguments "${FUNCNAME}" 0 $#
if [ -n "${JUNIT_LICENSE:-}" ]; then
return
fi
local JUNIT_LICENSE_DEPS_DIR="${DEPS_DIR}/junit-license"
"${UNZIP_CMD}" ${UNZIP_OPTIONS} "${JUNIT_JAR}" ${JUNIT_LICENSE_FILE} -d "${JUNIT_LICENSE_DEPS_DIR}"
JUNIT_LICENSE="${JUNIT_LICENSE_DEPS_DIR}/${JUNIT_LICENSE_FILE}"
}
setup_junit_license
info "JUNIT_LICENSE: ${JUNIT_LICENSE}"
#----- TestNG -----
setup_testng() {
check_arguments "${FUNCNAME}" 0 $#
if [ -n "${TESTNG_JAR:-}" ]; then
return
fi
if [ -z "${TESTNG_JAR_URL:-}" ]; then
if [ -n "${TESTNG_JAR_URL_BASE:-}" ]; then
TESTNG_JAR_URL="${TESTNG_JAR_URL_BASE}/org/testng/testng/${TESTNG_VERSION}/testng-${TESTNG_VERSION}.jar"
fi
fi
local TESTNG_DEPS_DIR="${DEPS_DIR}/testng"
if [ -n "${TESTNG_JAR_URL:-}" ]; then
TESTNG_JAR="${TESTNG_DEPS_DIR}/$(basename "${TESTNG_JAR_URL}")"
download_and_checksum "${TESTNG_JAR_URL}" "${TESTNG_JAR}" "${TESTNG_JAR_CHECKSUM}"
return
fi
error "None of TESTNG_JAR, TESTNG_JAR_URL or TESTNG_JAR_URL_BASE are set"
exit 1
}
setup_testng
info "TESTNG_JAR: ${TESTNG_JAR}"
#----- TestNG License -----
setup_testng_license() {
check_arguments "${FUNCNAME}" 0 $#
if [ -n "${TESTNG_LICENSE:-}" ]; then
return
fi
local TESTNG_LICENSE_DEPS_DIR="${DEPS_DIR}/testng-license"
TESTNG_LICENSE="${TESTNG_LICENSE_DEPS_DIR}/LICENSE.txt"
download_and_checksum "https://raw.githubusercontent.com/cbeust/testng/${TESTNG_LICENSE_VERSION}/LICENSE.txt" "${TESTNG_LICENSE}" "${TESTNG_LICENSE_CHECKSUM}"
}
setup_testng_license
info "TESTNG_LICENSE: ${TESTNG_LICENSE}"
#----- JCommander (required by TestNG) -----
setup_jcommander() {
check_arguments "${FUNCNAME}" 0 $#
if [ -n "${JCOMMANDER_JAR:-}" ]; then
return
fi
if [ -z "${JCOMMANDER_JAR_URL:-}" ]; then
if [ -n "${JCOMMANDER_JAR_URL_BASE:-}" ]; then
JCOMMANDER_JAR_URL="${JCOMMANDER_JAR_URL_BASE}/com/beust/jcommander/${JCOMMANDER_VERSION}/jcommander-${JCOMMANDER_VERSION}.jar"
fi
fi
local JCOMMANDER_DEPS_DIR="${DEPS_DIR}/jcommander"
if [ -n "${JCOMMANDER_JAR_URL:-}" ]; then
JCOMMANDER_JAR="${JCOMMANDER_DEPS_DIR}/$(basename "${JCOMMANDER_JAR_URL}")"
download_and_checksum "${JCOMMANDER_JAR_URL}" "${JCOMMANDER_JAR}" "${JCOMMANDER_JAR_CHECKSUM}"
return
fi
error "None of JCOMMANDER_JAR, JCOMMANDER_JAR_URL or JCOMMANDER_JAR_URL_BASE are set"
exit 1
}
setup_jcommander
info "JCOMMANDER_JAR: ${JCOMMANDER_JAR}"
#----- Google Guice (required by TestNG) -----
setup_google_guice() {
check_arguments "${FUNCNAME}" 0 $#
if [ -n "${GOOGLE_GUICE_JAR:-}" ]; then
return
fi
if [ -z "${GOOGLE_GUICE_JAR_URL:-}" ]; then
if [ -n "${GOOGLE_GUICE_JAR_URL_BASE:-}" ]; then
GOOGLE_GUICE_JAR_URL="${GOOGLE_GUICE_JAR_URL_BASE}/com/google/inject/guice/${GOOGLE_GUICE_VERSION}/guice-${GOOGLE_GUICE_VERSION}.jar"
fi
fi
local GOOGLE_GUICE_DEPS_DIR="${DEPS_DIR}/guice"
if [ -n "${GOOGLE_GUICE_JAR_URL:-}" ]; then
GOOGLE_GUICE_JAR="${GOOGLE_GUICE_DEPS_DIR}/$(basename "${GOOGLE_GUICE_JAR_URL}")"
download_and_checksum "${GOOGLE_GUICE_JAR_URL}" "${GOOGLE_GUICE_JAR}" "${GOOGLE_GUICE_JAR_CHECKSUM}"
return
fi
error "None of GOOGLE_GUICE_JAR, GOOGLE_GUICE_JAR_URL or GOOGLE_GUICE_JAR_URL_BASE are set"
exit 1
}
setup_google_guice
info "GOOGLE_GUICE_JAR: ${GOOGLE_GUICE_JAR}"
#----- HamCrest Core (required by JUnit) -----
setup_hamcrest() {
check_arguments "${FUNCNAME}" 0 $#
if [ -n "${HAMCREST_JAR:-}" ]; then
return
fi
if [ -z "${HAMCREST_JAR_URL:-}" ]; then
if [ -n "${HAMCREST_JAR_URL_BASE:-}" ]; then
HAMCREST_JAR_URL="${HAMCREST_JAR_URL_BASE}/org/hamcrest/hamcrest/${HAMCREST_VERSION}/hamcrest-${HAMCREST_VERSION}.jar"
fi
fi
local HAMCREST_DEPS_DIR="${DEPS_DIR}/hamcrest"
if [ -n "${HAMCREST_JAR_URL:-}" ]; then
HAMCREST_JAR="${HAMCREST_DEPS_DIR}/$(basename "${HAMCREST_JAR_URL}")"
download_and_checksum "${HAMCREST_JAR_URL}" "${HAMCREST_JAR}" "${HAMCREST_JAR_CHECKSUM}"
return
fi
error "None of HAMCREST_JAR, HAMCREST_JAR_URL or HAMCREST_JAR_URL_BASE are set"
exit 1
}
setup_hamcrest
info "HAMCREST_JAR: ${HAMCREST_JAR}"
##
# The build version typically comes from the version-numbers file;
# It is expected that the build number will typically come from an external CI system.
#
setup_build_info() {
check_arguments "${FUNCNAME}" 0 $#
JTREG_BUILD_MILESTONE="${JTREG_BUILD_MILESTONE:-dev}"
JTREG_BUILD_NUMBER="${JTREG_BUILD_NUMBER:-0}"
if [ -z "${JTREG_VERSION_STRING:-}" ]; then
MILESTONE=""
if [ -n "${JTREG_BUILD_MILESTONE}" ]; then
MILESTONE="-${JTREG_BUILD_MILESTONE}"
fi
JTREG_VERSION_STRING="${JTREG_VERSION}${MILESTONE}+${JTREG_BUILD_NUMBER}"
fi
}
setup_build_info
info "JTREG_VERSION: ${JTREG_VERSION}"
info "JTREG_BUILD_NUMBER: ${JTREG_BUILD_NUMBER}"
info "JTREG_BUILD_MILESTONE: ${JTREG_BUILD_MILESTONE}"
check_file() {
check_arguments "${FUNCNAME}" 1 $#
info "Checking $1"
if [ ! -f "$1" ]; then
error "Missing: $1"
exit 1
fi
}
check_dir() {
check_arguments "${FUNCNAME}" 1 $#
info "Checking $1"
if [ ! -d "$1" ]; then
error "Missing: $1"
exit 1
fi
}
check_file "${ANT}"
check_file "${ANT_JAR}"
check_file "${ASMTOOLS_JAR}"
check_file "${ASMTOOLS_LICENSE}"
check_file "${GOOGLE_GUICE_JAR}"
check_file "${HAMCREST_JAR}"
check_dir "${JAVA_HOME}"
check_file "${JCOMMANDER_JAR}"
check_file "${JCOV_JAR}"
check_file "${JCOV_LICENSE}"
check_file "${JCOV_NETWORK_SAVER_JAR}"
check_file "${JTHARNESS_COPYRIGHT}"
check_file "${JTHARNESS_JAVATEST_JAR}"
check_file "${JTHARNESS_LICENSE}"
check_file "${JUNIT_JAR}"
check_file "${JUNIT_LICENSE}"
check_file "${TESTNG_JAR}"
check_file "${TESTNG_LICENSE}"
if [ -n "${SKIP_MAKE:-}" ]; then
exit
fi
# Build jtreg
cd "${ROOT}/make"
make ANT="${ANT}" \
ANT_JAR="$(mixed_path "${ANT_JAR}")" \
ASMTOOLS_JAR="${ASMTOOLS_JAR}" \
ASMTOOLS_LICENSE="${ASMTOOLS_LICENSE}" \
BUILDDIR="${BUILD_DIR}" \
BUILD_MILESTONE="${JTREG_BUILD_MILESTONE}" \
BUILD_NUMBER="${JTREG_BUILD_NUMBER}" \
BUILD_VERSION="${JTREG_VERSION}" \
BUILD_VERSION_STRING="${JTREG_VERSION_STRING}" \
GOOGLE_GUICE_JAR="${GOOGLE_GUICE_JAR}" \
HAMCREST_JAR="${HAMCREST_JAR}" \
JAVATEST_JAR="$(mixed_path "${JTHARNESS_JAVATEST_JAR}")" \
JCOMMANDER_JAR="${JCOMMANDER_JAR}" \
JCOV_JAR="${JCOV_JAR}" \
JCOV_LICENSE="${JCOV_LICENSE}" \
JCOV_NETWORK_SAVER_JAR="${JCOV_NETWORK_SAVER_JAR}" \
JDKHOME="$(mixed_path ${JAVA_HOME})" \
JTHARNESS_COPYRIGHT="${JTHARNESS_COPYRIGHT}" \
JTHARNESS_LICENSE="${JTHARNESS_LICENSE}" \
JUNIT_JAR="$(mixed_path "${JUNIT_JAR}")" \
JUNIT_LICENSE="${JUNIT_LICENSE}" \
TESTNG_JAR="$(mixed_path "${TESTNG_JAR}")" \
TESTNG_LICENSE="${TESTNG_LICENSE}" \
${MAKE_ARGS:-}
jtreg-jtreg-6.1-2/make/build.xml 0000664 0000000 0000000 00000043425 14250654265 0016522 0 ustar 00root root 0000000 0000000
jtreg-jtreg-6.1-2/make/checkstyle/ 0000775 0000000 0000000 00000000000 14250654265 0017027 5 ustar 00root root 0000000 0000000 jtreg-jtreg-6.1-2/make/checkstyle/checkstyle-emacs.xsl 0000664 0000000 0000000 00000001667 14250654265 0023015 0 ustar 00root root 0000000 0000000
Coding Style Check Results
--------------------------
Total files checked:
Files with errors:
Total errors:
Errors per file: ::
jtreg-jtreg-6.1-2/make/checkstyle/checkstyle-jtreg.xml 0000664 0000000 0000000 00000003114 14250654265 0023017 0 ustar 00root root 0000000 0000000
jtreg-jtreg-6.1-2/make/i18n.pat 0000664 0000000 0000000 00000002460 14250654265 0016160 0 ustar 00root root 0000000 0000000 # Patterns for recognizing i18n strings in source code
# Each line is of the form
# regexp keys
# If the regexp matches within a line of source text, the keys give the
# names of the implied i18n keys. Use the standard \int syntax for referring
# to capture groups within the regexp. Note the regular expression should
# not contain space characters. If necessary, use \s to match space.
# For spec of regular expressions, see java.util.regex.Pattern
# See also com.sun.jct.utils.i18ncheck.Main
# i18n.getString("...",
(printMessage|getI18NString|writeI18N|i18n.getString|formatI18N|setI18NTitle)\("([^"]*)"(,|\)) \2
# new BadArgs(i18n, "...",
(Message.get|Fault|BadArgs|BadValue|println|printErrorMessage|printMessage|[eE]rror|showMessage|popupError|write|JavaTestError|\.log|super)\((msgs|i18n),\s"([^"]*)"(,|\)) \3
# uif.createMessageArea("...",
uif.createMessageArea\("([^"]*)"(,|\)) \1.txt
# uif.showXXYZDialog("...",
uif.show(YesNo|YesNoCancel|OKCancel|Information|CustomInfo)Dialog\("([^"]*)"(,|\)) \2.txt \2.title
# uif.showWaitDialog("...",
uif.createWaitDialog\("([^"]*)"(,|\)) \1.txt \1.title \1.desc \1.name
# showError("...",
showError\("([^"]*)"(,|\)) \1.err
# new FileType()
new\sFileType\(\) filetype.allFiles
# new FileType("...")
new\sFileType\("([^"]*)"\) filetype\1
# i18n: ...
i18n:\s*(\S+) \1
jtreg-jtreg-6.1-2/make/jtdiff.gmk 0000664 0000000 0000000 00000005226 14250654265 0016644 0 ustar 00root root 0000000 0000000 #
# Copyright (c) 1999, 2016, 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.
#
#----------------------------------------------------------------------
#
# compile com.sun.javatest.diff
JAVAFILES.com.sun.javatest.diff := \
$(shell $(FIND) $(JAVADIR)/com/sun/javatest/diff -name \*.java )
$(BUILDDIR)/classes.com.sun.javatest.diff.ok: \
$(JAVAFILES.com.sun.javatest.diff) \
$(BUILDDIR)/classes.com.sun.javatest.regtest.ok
CLASSPATH="$(CLASSDIR)$(PS)$(JAVATEST_JAR)$(PS)$(ANT_JAR)" \
$(REGTEST_TOOL_JAVAC) $(REGTEST_TOOL_JAVAC_OPTIONS) \
-d $(CLASSDIR) \
-encoding ISO8859-1 \
$(JAVAFILES.com.sun.javatest.diff)
echo "classes built at `date`" > $@
TARGETS.com.sun.javatest.diff += $(BUILDDIR)/classes.com.sun.javatest.diff.ok
#----------------------------------------------------------------------
#
# resources required for com.sun.javatest.diff
RESOURCES.com.sun.javatest.diff = \
$(CLASSDIR)/com/sun/javatest/diff/i18n.properties
TARGETS.com.sun.javatest.diff += $(RESOURCES.com.sun.javatest.diff)
#----------------------------------------------------------------------
#
# include jtdiff in jtreg.jar
PKGS.JAR.jtreg += com.sun.javatest.diff
TARGETS.JAR.jtreg += $(TARGETS.com.sun.javatest.diff)
#----------------------------------------------------------------------
#
# executable scripts
$(JTREG_IMAGEDIR)/bin/jtdiff: $(SRCSHAREBINDIR)/jtdiff.sh
$(MKDIR) -p $(@D)
$(RM) $@
$(CP) $< $@
$(CHMOD) a+x,a-w $@
TARGETS.ZIP.jtreg += \
$(JTREG_IMAGEDIR)/bin/jtdiff
#----------------------------------------------------------------------
TESTS += $(TESTS.jtdiff)
jtreg-jtreg-6.1-2/make/jtreg.gmk 0000664 0000000 0000000 00000033663 14250654265 0016517 0 ustar 00root root 0000000 0000000 #
# 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
# 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.
#
#----------------------------------------------------------------------
#
# compile com.sun.javatest.regtest
### The following files are required to run othervm tests
REGTEST-OTHERVM-CLASSES = AppletWrapper GetSystemProperty MainWrapper AStatus StringArray
JAVAFILES.com.sun.javatest.regtest-othervm = \
$(REGTEST-OTHERVM-CLASSES:%=$(JAVADIR)/com/sun/javatest/regtest/agent/%.java)
# TODO: set -bootclasspath to JDK 1.1 classes?
$(BUILDDIR)/classes.com.sun.javatest.regtest-othervm.ok: \
$(JAVAFILES.com.sun.javatest.regtest-othervm) \
$(call PosixPath,$(JAVATEST_JAR))
$(MKDIR) -p $(CLASSDIR)
CLASSPATH="$(CLASSDIR)$(PS)$(JAVATEST_JAR)" \
$(REGTEST_OLD_JAVAC) $(REGTEST_OLD_JAVAC_OPTIONS) \
-d $(CLASSDIR) \
-encoding ISO8859-1 \
$(JAVAFILES.com.sun.javatest.regtest-othervm)
echo "classes built at `date`" > $@
### The following files are required to run agentvm tests, as far back as JDK 1.5
JAVAFILES.com.sun.javatest.regtest-agentvm := \
$(filter-out $(JAVAFILES.com.sun.javatest.regtest-othervm), $(shell $(FIND) $(JAVADIR)/com/sun/javatest/regtest/agent -name \*.java ))
$(BUILDDIR)/classes.com.sun.javatest.regtest.agent.ok: \
$(JAVAFILES.com.sun.javatest.regtest-agentvm) \
$(BUILDDIR)/classes.com.sun.javatest.regtest-othervm.ok
CLASSPATH="$(CLASSDIR)$(PS)$(JAVATEST_JAR)$(PS)$(JUNIT_JAR)$(PS)$(TESTNG_JAR)" \
$(REGTEST_AGENT_JAVAC) $(REGTEST_AGENT_JAVAC_OPTIONS) \
-d $(CLASSDIR) \
-encoding ISO8859-1 \
$(JAVAFILES.com.sun.javatest.regtest-agentvm)
echo "classes built at `date`" > $@
### The following files are for the jtreg and jtdiff tools
JAVAFILES.com.sun.javatest.regtest-tools := \
$(shell $(FIND) $(JAVADIR)/com/sun/javatest/regtest -name agent -prune -o -name \*.java -print )
$(BUILDDIR)/classes.com.sun.javatest.regtest.ok: \
$(JAVAFILES.com.sun.javatest.regtest-tools) \
$(BUILDDIR)/classes.com.sun.javatest.regtest.agent.ok
CLASSPATH="$(CLASSDIR)$(PS)$(ANT_JAR)$(PS)$(JAVATEST_JAR)$(PS)$(JUNIT_JAR)$(PS)$(TESTNG_JAR)" \
$(REGTEST_TOOL_JAVAC) $(REGTEST_TOOL_JAVAC_OPTIONS) \
-d $(CLASSDIR) \
-encoding ISO8859-1 \
$(JAVAFILES.com.sun.javatest.regtest-tools)
echo "classes built at `date`" > $@
TARGETS.com.sun.javatest.regtest += $(BUILDDIR)/classes.com.sun.javatest.regtest.ok
JAVAFILES.java.lang := \
$(JAVADIR)/java/lang/JTRegModuleHelper.java
$(BUILDDIR)/classes.java.lang.ok: \
$(JAVAFILES.java.lang)
CLASSPATH= \
$(REGTEST_TOOL_JAVAC) $(REGTEST_TOOL_JAVAC_OPTIONS) $(REGTEST_TOOL_PATCH_JAVA_BASE_OPTIONS) \
-d $(CLASSDIR) \
-encoding ISO8859-1 \
$(JAVAFILES.java.lang)
echo "classes built at `date`" > $@
TARGETS.com.sun.javatest.regtest += $(BUILDDIR)/classes.java.lang.ok
#----------------------------------------------------------------------
#
# resources required for com.sun.javatest.regtest
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/jtlogo.png
TARGETS.com.sun.javatest.regtest += $(RESOURCES.com.sun.javatest.regtest)
#----------------------------------------------------------------------
#
# Misc. doc files
JTREG_COPYRIGHT = $(JTREG_IMAGEDIR)/COPYRIGHT
JTREG_LICENSE = $(JTREG_IMAGEDIR)/LICENSE
JTREG_README = $(JTREG_IMAGEDIR)/README
JTREG_FAQ = $(JTREG_IMAGEDIR)/doc/jtreg/faq.html
JTREG_TAGSPEC = $(JTREG_IMAGEDIR)/doc/jtreg/tag-spec.html
JTREG_USAGE = $(JTREG_IMAGEDIR)/doc/jtreg/usage.txt
JTREG_DOCS = \
$(JTREG_COPYRIGHT) \
$(JTREG_FAQ) \
$(JTREG_LICENSE) \
$(JTREG_README) \
$(JTREG_TAGSPEC) \
$(JTREG_USAGE)
$(JTREG_COPYRIGHT): $(TOPDIR)/COPYRIGHT
$(MKDIR) -p $(@D)
$(RM) $@
$(CP) $< $@
$(JTREG_FAQ): $(SRCJTREGDOCDIR)/faq.md \
$(SRCJTREGDOCDIR)/faq-local-style.html \
$(SRCJTREGDOCDIR)/faq-intro.html
$(MKDIR) -p $(@D)
$(ECHO) '//{;:a;N;/<\/header>/!ba;};/
/d' | tr ';' '\n' > $(BUILDDIR)/fixupheader
$(PANDOC) \
--standalone \
--include-in-header $(SRCJTREGDOCDIR)/faq-local-style.html \
--include-before $(SRCJTREGDOCDIR)/faq-intro.html \
--toc \
--to html5 \
--number-sections \
$(SRCJTREGDOCDIR)/faq.md | \
$(SED) \
-e 's/^code > span\.\([a-z][a-z] .*\)/code span.\1/' \
-e 's/-section-number">0./-section-number">/' \
-e 's/…/\…/g' \
-e 's/â„¢/\™/g' \
-f $(BUILDDIR)/fixupheader \
> $(JTREG_FAQ)
$(JTREG_README): $(SRCJTREGDOCDIR)/README
$(MKDIR) -p $(@D)
$(RM) $@
$(CP) $< $@
$(JTREG_TAGSPEC): $(JTREG_IMAGEDIR)/doc/jtreg/%: $(SRCJTREGDOCDIR)/%
$(RM) $@
$(MKDIR) -p $(@D)
$(CP) $^ $@
$(JTREG_USAGE): $(BUILDDIR)/jtreg-usage.txt
$(CP) $^ $@
$(JTREG_LICENSE): $(TOPDIR)/LICENSE
$(MKDIR) -p $(@D)
$(CP) $^ $@
$(BUILDDIR)/jtreg-usage.txt: \
$(BUILDDIR)/classes.com.sun.javatest.regtest.ok \
$(BUILDDIR)/classes/com/sun/javatest/regtest/tool/i18n.properties
$(JDKJAVA) -cp "$(CLASSDIR)$(PS)$(JAVATEST_JAR)" \
-Dprogram=jtreg com.sun.javatest.regtest.Main -help all > $@
TARGETS.ZIP.jtreg += $(JTREG_DOCS)
#----------------------------------------------------------------------
ifdef JAVATEST_SRCDIR
JAVATEST_SRCFILES= \
$(JAVATEST_SRCDIR)/com/sun/javatest/InterviewParameters.java \
$(JAVATEST_SRCDIR)/com/sun/javatest/Parameters.java \
$(JAVATEST_SRCDIR)/com/sun/javatest/Status.java \
$(JAVATEST_SRCDIR)/com/sun/javatest/TestDescription.java \
$(JAVATEST_SRCDIR)/com/sun/javatest/TestResult.java \
$(JAVATEST_SRCDIR)/com/sun/javatest/TestResultTable.java \
$(JAVATEST_SRCDIR)/com/sun/javatest/WorkDirectory.java
endif
$(JTREG_IMAGEDIR)/doc/api/index.html: \
$(JAVAFILES.com.sun.javatest.regtest-tools) \
$(JAVATEST_SRCFILES)
$(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)" \
com.sun.javatest.regtest \
$(JAVATEST_SRCFILES)
$(JTREG_IMAGEDIR)/doc/devapi/index.html: \
$(JAVAFILES.com.sun.javatest.regtest-tools) \
$(JAVATEST_SRCFILES)
$(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)" \
-subpackages com.sun.javatest.regtest \
-tag "implNote:a:Implementation Note:" \
$(JAVATEST_SRCFILES)
#----------------------------------------------------------------------
#
# create jtreg.jar
PKGS.JAR.jtreg += \
com.sun.javatest.regtest \
com.sun.javatest.regtest.agent \
com.sun.javatest.regtest.config \
com.sun.javatest.regtest.exec \
com.sun.javatest.regtest.report \
com.sun.javatest.regtest.tool \
com.sun.javatest.regtest.util \
java.lang
TARGETS.JAR.jtreg += $(TARGETS.com.sun.javatest.regtest)
$(JTREG_IMAGEDIR)/lib/jtreg.jar: JAR_MAINCLASS = com.sun.javatest.regtest.Main
$(JTREG_IMAGEDIR)/lib/jtreg.jar: JAR_CLASSPATH = javatest.jar asmtools.jar
$(JTREG_IMAGEJARDIR)/jtreg.jar: \
$(JTREG_IMAGEDIR)/lib/javatest.jar \
$(TARGETS.JAR.jtreg)
ifdef JAVAHELP_JAR
$(JTREG_IMAGEJARDIR)/jtreg.jar: \
$(JTREG_IMAGEJARDIR)/jh.jar
endif
TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/jtreg.jar
#----------------------------------------------------------------------
#
# import JavaTest or JT Harness
TARGETS.com.sun.javatest.regtest += $(RESOURCES.com.sun.javatest.regtest)
$(JTREG_IMAGEDIR)/lib/javatest.jar: $(call PosixPath,$(JAVATEST_JAR))
$(RM) -f $@
$(MKDIR) -p $(@D)
$(CP) $< $@
TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/javatest.jar
$(JTREG_IMAGEDIR)/legal/jtharness/license.txt: $(call PosixPath,$(JTHARNESS_LICENSE))
$(RM) -f $@
$(MKDIR) -p $(@D)
$(CP) $< $@
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 JUnit
$(JTREG_IMAGEDIR)/lib/junit.jar: $(call PosixPath,$(JUNIT_JAR))
$(RM) -f $@
$(MKDIR) -p $(@D)
$(CP) $< $@
TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/junit.jar
ifdef JUNIT_LICENSE
TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/legal/junit/LICENSE
endif
$(JTREG_IMAGEDIR)/legal/junit/LICENSE: $(call PosixPath,$(JUNIT_LICENSE))
$(RM) -f $@
$(MKDIR) -p $(@D)
$(CP) $< $@
#----------------------------------------------------------------------
#
# import TestNG
$(JTREG_IMAGEDIR)/lib/testng.jar: $(call PosixPath,$(TESTNG_JAR))
$(RM) $@
$(MKDIR) -p $(@D)
$(CP) $(TESTNG_JAR) $@
jquery=`$(JAR) tf $@ | $(GREP) 'jquery.*.js'` ; \
if [ -n "$$jquery" ]; then \
$(RM) $(BUILDDIR)/$$jquery ; $(MKDIR) -p `dirname $(BUILDDIR)/$$jquery` ; $(TOUCH) $(BUILDDIR)/$$jquery ; \
$(JAR) uf $@ -C $(BUILDDIR) $$jquery ; \
fi
- $(ZIP) -d $@ Version.java
TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/testng.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)/lib/guice.jar: $(call PosixPath,$(GOOGLE_GUICE_JAR))
$(RM) $@
$(MKDIR) -p $(@D)
$(CP) $(GOOGLE_GUICE_JAR) $@
ifdef GOOGLE_GUICE_JAR
TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/guice.jar
endif
$(JTREG_IMAGEDIR)/lib/hamcrest.jar: $(call PosixPath,$(HAMCREST_JAR))
$(RM) $@
$(MKDIR) -p $(@D)
$(CP) $(HAMCREST_JAR) $@
ifdef HAMCREST_JAR
TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/hamcrest.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
$(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
$(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
$(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
$(JTREG_IMAGEDIR)/lib/asmtools.jar: $(call PosixPath,$(ASMTOOLS_JAR))
$(RM) $@
$(MKDIR) -p $(@D)
$(CP) $< $@
ifdef ASMTOOLS_JAR
TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/lib/asmtools.jar
$(JTREG_IMAGEDIR)/lib/jtreg.jar: $(JTREG_IMAGEDIR)/lib/asmtools.jar
endif
$(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
#----------------------------------------------------------------------
#
# executable scripts
$(JTREG_IMAGEDIR)/bin/jtreg: $(SRCSHAREBINDIR)/jtreg.sh
$(MKDIR) -p $(@D)
$(RM) $@
$(CP) $< $@
$(CHMOD) a+x,a-w $@
TARGETS.ZIP.jtreg += \
$(JTREG_IMAGEDIR)/bin/jtreg
#----------------------------------------------------------------------
#
# release info
# based on code in OpenJDK make/SourceRevision.gmk
ID_COMMAND := $(PRINTF) "git:%s%s\n" \
"$$(git log -n1 --format=%H | cut -c1-12)" \
"$$(if test -n "$$(git status --porcelain)"; then printf '+'; fi)"
$(JTREG_IMAGEDIR)/release:
echo "JTREG_VERSION=$(BUILD_VERSION) $(BUILD_NUMBER)" > $@
echo "BUILD_DATE=`/bin/date +'%B %d, %Y'`" >> $@
if [ -r $(TOPDIR)/.git ]; then \
echo "SOURCE=$$($(ID_COMMAND))" >> $@ ; \
elif [ -r $(TOPDIR)/.src-rev ]; then \
echo "SOURCE=\"$$($(CAT) $(TOPDIR)/.src-rev | $(SED) -e 's/:/:git:/' -e 's/ *$$//')\"" >> $@ ; \
fi
TARGETS.ZIP.jtreg += \
$(JTREG_IMAGEDIR)/release
#----------------------------------------------------------------------
#
# create jtreg.zip bundles
JTREG_ZIP = $(IMAGES_DIR)/jtreg.zip
$(JTREG_ZIP): $(TARGETS.ZIP.jtreg)
$(RM) $@
cd $(IMAGES_DIR); $(ZIP) -rq $@ $(@F:%.zip=%)
JTREG_ZIPFILES = $(JTREG_ZIP)
#----------------------------------------------------------------------
BUILDFILES += $(JTREG_ZIPFILES)
VERBOSEZIPFILES += $(JTREG_ZIPFILES:%.zip=%-$(VERBOSE_ZIP_SUFFIX).zip)
NEWVERBOSEZIPFILES += $(JTREG_ZIPFILES:%.zip=%-$(NEW_VERBOSE_ZIP_SUFFIX).zip)
#JTREG_JAVA_OPTS = -Ddebug.com.sun.javatest.TestResultCache=98
#JTREG_OPTS = $(JTREG_JAVA_OPTS:%=-J%)
TESTS += $(TESTS.jtreg)
jtreg-jtreg-6.1-2/make/netbeans/ 0000775 0000000 0000000 00000000000 14250654265 0016470 5 ustar 00root root 0000000 0000000 jtreg-jtreg-6.1-2/make/netbeans/jtreg/ 0000775 0000000 0000000 00000000000 14250654265 0017603 5 ustar 00root root 0000000 0000000 jtreg-jtreg-6.1-2/make/netbeans/jtreg/nbproject/ 0000775 0000000 0000000 00000000000 14250654265 0021571 5 ustar 00root root 0000000 0000000 jtreg-jtreg-6.1-2/make/netbeans/jtreg/nbproject/project.xml 0000664 0000000 0000000 00000014011 14250654265 0023756 0 ustar 00root root 0000000 0000000
org.netbeans.modules.ant.freeformjtregjtreg../../..${root}/build.properties${root}/make/build.properties${root}/make/build.xml${root}UTF-8build${root}/make.UTF-8java${root}/src/share/classesUTF-8buildcleanxtest-jtregcleanbuild${root}/make${root}/src/share/classes${root}/README${root}/src/share/classes${javatest.jar}:${jh.jar}:${ant.jar}:${junit.jar}:${testng.jar}1.7appletappletviewerargcheckBugIdclassnameclasspathdefaultExecModeHTMLjavacjavatestjtregjunitJUnitCoreorgothervmsourcepathyesno
jtreg-jtreg-6.1-2/make/pkgsToFiles.sh 0000664 0000000 0000000 00000002615 14250654265 0017463 0 ustar 00root root 0000000 0000000 #! /bin/sh
#
# Copyright (c) 2001, 2013, 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.
#
classdir=$1; shift
cd $classdir
if [ "$#" -gt 0 ]; then
for i in $* ; do
dir=`echo $i | sed -e 's|\.|/|g'`
ls -F $dir | grep -v '/$' | sed -e 's|\*$||' -e "s|\(.*\)|-C $classdir $dir/\1|"
done
fi
jtreg-jtreg-6.1-2/plugins/ 0000775 0000000 0000000 00000000000 14250654265 0015435 5 ustar 00root root 0000000 0000000 jtreg-jtreg-6.1-2/plugins/idea/ 0000775 0000000 0000000 00000000000 14250654265 0016337 5 ustar 00root root 0000000 0000000 jtreg-jtreg-6.1-2/plugins/idea/.gitignore 0000664 0000000 0000000 00000000006 14250654265 0020323 0 ustar 00root root 0000000 0000000 .idea
jtreg-jtreg-6.1-2/plugins/idea/README.md 0000664 0000000 0000000 00000021727 14250654265 0017627 0 ustar 00root root 0000000 0000000 # jtreg plugin for IntelliJ IDE
##### *Maurizio Cimadamore and Chris Hegarty*
This is a convenience plugin which adds jtreg capabilities to the IntelliJ IDE. With this plugin, OpenJDK developers
can write, run, debug jtreg tests without the need of leaving their IDE environment.
## Plugin setup
This section covers the initial steps that are required in order to correctly setup the plugin project inside the IntelliJ IDE.
### Folder layout
The output of this folder is as follows:
```
idea
|-src
|-main
|-java (plugin sources)
|-resources (plugin resources - the plugin.xml file lives here)
|-build (where build files are stored)
|-distributions (where the plugin zip file is generated)
|-build.gradle (the gradle build file)
|-gradle.properties (contains properties required to build this project)
```
### Building the plugin
This plugin can be built with `gradle`. To build the plugin, simply run the following command from the `idea` folder:
`sh gradlew clean build`
> Note: when working behind a proxy, additional options might be required, such as: \
> `-Dhttps.proxyhost= -Dhttps.proxyPort=`
This will download gradle and the required IntelliJ dependencies, will build the plugin and will place the results in the `build/distributions` folder.
> Note: to build the plugin, the build script must point to a valid jtreg installation; see the property `jtregHome` in the `gradle.properties` file, and tweak accordingly.
> Note: the property `intellijVersion` can be used to specify which IDE version should the plugin depend on (defaults to `2021.1`).
Once the build is configured correctly, the plugin can even be tested in a sandbox environment, as follows:
`sh gradlew runIde`
### Installing the plugin
To install the plugin in your IDE, first you need to build a plugin module file (a `.zip` file), as described in the previous section.
Once the plugin zip has been obtained, it can be installed in the IDE; go in `Help -> Find Action...`, and type `Install plugin from disk`, and then select the corresponding action from the drop down list. A new file dialog will pop up: point the IDE to the zip file you have created in the step above. The IDE will require a restart - once restart is completed the installation process is completed, and the plugin is ready to be used to run and debug jtreg tests.
## Using the plugin
This section covers the the functionalities supported by the jtreg plugin.
### Configuring jtreg
The plugin allows user to configure how jtreg should be invoked by the plugin. Possible options include:
* which jtreg should be used to run the tests
* which JDK should be used to run the tests
* which jtreg options should be used to run tests
* where jtreg should put its output files
Configuring such parameters is possible through the dialog located under `File -> Settings`, under the `jtreg` panel. By default, such settings are saved on a per-project basis. If, however, you would like to specify IDE-wide default, you can do so by accessing a similar dialog under `File -> Other Settings -> Default Settings`.
Note: the settings specified here will be used as defaults for creating new jtreg run/debug configurations. As a result, if any error is made when configuring global jtreg settings, such errors will be propagated in all newly created jtreg test configurations.
### Running/debugging jtreg tests
In order to run a test, you need to create a run configuration. To create a configuration, simply open a jtreg test file, right-click on it and select `Run` (or `Debug`). This should create a configuration for the selected test, and run that configuration. The configuration will then become available for inspection under the `Run -> Edit Configurations` menu. If you wish to run all tests in a given folder, the process is the same: simply right click on the test folder (in the left panel) of choice and select `Run`.
A jtreg run configuration contains the following information:
* which test (or folder of tests) should be given as input to jtreg
* which JDK should be used to run the tests
* which jtreg options should be used to run tests
* where jtreg should put its output files
The last three options can be used to override global settings (e.g. in case a test needs more memory to run).
Once a configuration has been created, the new configuration will appear in the top right panel. If you notice a red mark beside the configuration name, it means that the configuration contains errors that will likely result in test failures. If that happens, please open the `Run -> Edit Configurations` dialog, and select the problematic configuration; this dialog should contain additional information as to why the configuration is problematic (e.g. missing JDK path).
To run an existing configuration, simply select it from the drop down list in the top right panel, and click on the `Run` (an icon similar to a *play* button) icon. If you wish to debug instead, simply press the icon beside `Run` (the one with the little bug in it).
Debugging works as for any other Java application. Simply set breakpoints (this can be done by left-clicking the area to the left of the code in the source editor, which will cause a red circle to appear). During a test debug, execution will stop at any given breakpoints, allowing you to see values of variables, set watch expressions, etc.
> Note: debugging only works with a _single_ test action such as `@run` or `@compile`. If multiple test actions are present, debugging will not work correctly. This is a known issue. To workaround, please manually remove the test actions that do not need to be debugged. Conversely, `@build` actions can be safely ignored, as they do not have any adverse effect on the debugging process.
### Inspecting jtreg test results
Once a test (or a group of tests) have finished running, you can inspect test results in the corresponding bottom panel. This panel is organized in two sub-panels: the one on the left allows you to chose the test whose results you'd like to inspect; the panel on the right contains the actual test output (e.g. the `jtr` file).
During test execution you will see green and red bars appearing, notifying test passes/failures. It is possible to filter out the tests that show up in the left panel so that e.g. only failed test are displayed (that is done by clicking on the little circle with the `OK` label in the bottom panel); ignored tests can be filtered in a similar fashion.
If you click on the very first entry of the left panel (the one named 'Test Results'), some general information will be presented in the right panel - such as how many tests were run, how many pass/fail there were, etc. You will also see the URL to the location where test results have been written (this can be opened using your browser of choice).
### Creating new tests
To create a new jtreg test, simply create a new file under a jtreg test root. Then add a javadoc comment like this:
```
/*
* @test
```
And press `CTRL + ` - the IDE will show you possible completion suggestions for creating a positive/negative jtreg test. Once the right completion path is selected, a full jtreg header will be populated by the IDE. The IDE will then highlight the sections in the header that require user intervention (e.g. add summary in the `@summary` tag, etc.). Once you have finished typing in the input for a given section, just press enter and the IDE will move to the next section which requires manual intervention. Repeat the process until all required fields have been entered. At the end of this process, a new jtreg test will have been created.
## Miscellaneous
### What needs to be rebuilt before a test run?
The jtreg plugin is very flexible when it comes to defining the actions that should be taken by IntelliJ to rebuild the project before running/debugging a test. If your project does not use Ant, the default action associated with a jtreg test configuration is to simply run `Make` - which is the standard way in which IntelliJ builds a project. However, if your project uses Ant (this is the case with the JDK and the langtools IntelliJ projects), the plugin can launch any desired ant target before running a given test.
To select which Ant target to run before a jtreg test, simply go in the `File -> Settings -> jtreg` menu, and add ant targets to the drop down list. You can add, remove targets as well as changing order of existing targets.
### Dealing with bugs
In the unfortunate case you run into a plugin bug, you will notice a red mark in the bottom right part of the IDE. If you click on that icon, you will have the ability to show the stack trace associated with the error (and you will also be offered the option of disabling the plugin). If you want to report a bug against the jtreg plugin, we recommend that you copy the stack trace along with the IDE log file (this can be found under `Help -> Show Log in Files`) and submit them along with a description of the experienced buggy behavior. Please forward such bug reports to `jtreg-dev@openjdk.java.net`, or `ide-support-dev@openjdk.java.net`
jtreg-jtreg-6.1-2/plugins/idea/build.gradle 0000664 0000000 0000000 00000001337 14250654265 0020622 0 ustar 00root root 0000000 0000000 plugins {
id 'java'
id 'org.jetbrains.intellij' version '1.0'
}
def jtregLib = jtregHome + File.separator + "lib" + File.separator + "jtreg.jar"
assert file(jtregLib).exists() : """Could not find jtreg in ${jtregHome}.
Please make sure that 'jtregHome' in 'gradle.properties' points to a valid jtreg root.
"""
version pluginVersion
compileJava {
sourceCompatibility = javaLevel
targetCompatibility = javaLevel
}
repositories {
mavenCentral()
}
dependencies {
implementation files(jtregLib)
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
plugins = ['java', 'AntSupport', 'TestNG-J']
}
patchPluginXml {
changeNotes = notes
sinceBuild = minBuild
untilBuild = ''
}
jtreg-jtreg-6.1-2/plugins/idea/gradle.properties 0000664 0000000 0000000 00000000212 14250654265 0021706 0 ustar 00root root 0000000 0000000 jtregHome = /path/to/jtreg
minBuild = 211
pluginVersion = 1.13
javaLevel = 11
notes =