jtreg-jtreg4.2-b01/.hg_archival.txt0000644000000000000000000000020012670642364017134 0ustar rootroot00000000000000repo: 9f51ef22f00a3d5b681472cacf3ce15868073103 node: 1159c9f96a4470dec79e6fa71b4f1a4895c4b20f branch: default tag: jtreg4.2-b01 jtreg-jtreg4.2-b01/.hgignore0000644000000000000000000000004112670642364015654 0ustar rootroot00000000000000^(build|dist)/ nbproject/private/jtreg-jtreg4.2-b01/.hgtags0000644000000000000000000000154312670642364015337 0ustar rootroot000000000000009f51ef22f00a3d5b681472cacf3ce15868073103 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 jtreg-jtreg4.2-b01/.jcheck/conf0000644000000000000000000000005112670642364016227 0ustar rootroot00000000000000project=code-tools comments=lax tags=lax jtreg-jtreg4.2-b01/CONTRIBUTORS0000644000000000000000000000046712670642364015745 0ustar rootroot00000000000000The 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-jtreg4.2-b01/COPYRIGHT0000644000000000000000000000174212670642364015355 0ustar rootroot00000000000000Copyright (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-jtreg4.2-b01/LICENSE0000644000000000000000000004545112670642364015074 0ustar rootroot00000000000000The 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-jtreg4.2-b01/README0000644000000000000000000001637712670642364014754 0ustar rootroot00000000000000Building The Regression Test Harness for the OpenJDK platform: jtreg There are two ways to build jtreg. The first way uses GNU Make to build jtreg and run all the tests. The second way uses Ant, and is primarily intended for developers using an IDE such as NetBeans. Not all of the tests are available using the Ant build. Building jtreg with GNU Make The Makefile is in make/Makefile, and creates deliverables in the build/ directory, similar to OpenJDK. By default, the build file builds jtreg and runs the tests. You can build jtreg from a Unix-like command shell with the following commands: % cd jtreg-root-directory % make -C make Dependencies jtreg has a number of build dependencies. These can be set with values on the make command line or with values in make/Defs.gmk. JDK 1.5 (or better) Set JDK15HOME to the JDK or equivalent used to build jtreg. It must be equivalent to JDK 1.5 or later. JavaHelp See https://javahelp.dev.java.net/. Set JAVAHELP_HOME to an installed copy of JavaHelp. It should be version 2.0_01 or better. JT Harness See https://jtharness.dev.java.net/. Set JTHARNESS_HOME to the installed copy of the version of JT Harness to be used. It should be version 4.1.3 or better. (Note, the license changed for version 4.1.3.) See the notes below on building JT Harness from source for use in jtreg. Note: there is a bug in JT Harness 4.1.3 which causes some of the jtreg self tests to fail. These are run automatically if you build jtreg with the default "all" target. The bug affects the ability to run tests in the root directory of a test suite. (This does not apply to OpenJDK test suites.) To work around this issue, you can either download and build JT Harness 4.1.3a from source, or you can use version 4.1.3 and just build jtreg, with the "build" target, and avoid running the jtreg self tests invoked by the "test" target in the Makefile. Xalan See http://xml.apache.org/xalan-j/. This is used while building jtreg to process XML files. The following dependencies are optional. HTMLCheck This uses nsgmlns, available from http://www.jclark.com/sp/, and DTDs, available from http://w3c.org/ to validate HTML documentation files. Set HTMLCHECK to an HTML validation program. It should take a single file as argument, and exit with a zero return code for a valid file, and non-zero for an invalid one. This is optional, and if available, it will be used while building jtreg. It may be left unset to ignore the checks. LinkLint See http://www.linklint.org/. This is used to validate the links in HTML documentation files. Set LINKLINT to your installed copy of LinkLint. This is optional, and if available, it will be used while building jtreg. It may be left unset to ignore the checks. The following dependencies are only required when running the tests for jtreg. (Note: this only applies to the tests for jtreg itself; these dependencies are not required when using jtreg to run the JDK regression tests. JDK 1.6 This is used when running some of the tests. Set JDK16HOME to run these tests. It must be equivalent to JDK 1.6 or later. It need not be set if you are just building jtreg. Ant See http://ant.apache.org/. Set ANTHOME to an installed copy of Ant. This is used when running some of the tests. It should be version 1.6.5. or better. It need not be set if you are just building jtreg. Running 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 http://www.realvnc.com/. Using VNC is optional; it is not required in order to run the tests. By default, VNC will be used if vncserver is found on your execution path, or if VNC_HOME points to an installed copy of VNC. To explicitly disable the use of 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 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 "test-", or collectivly via the "test-jtreg" target. Building JT Harness for jtreg JT Harness has build-time dependencies on a number of components, some of which may cause issues. There are workarounds available which allow you to build JT Harness while not affecting its use for jtreg. JUnit 4 If your system does not yet support JUnit 4, you can build JT Harness without needing to install JUnit 4 by executing the "jar" and "dist-doc" targets instead of the default "build" target. This will avoid building the jar file which references JUnit 4. The jar file (jt-junit.jar) is not required when running jtreg. The Java Communications API (also known as javax.comm) This API is not widely available under an OSI-approved license. There is a replacement known as "librxtx-java" which provides the same functionality in the "gnu.io" package. To use this package, you will have to edit the JT Harness source code so that references to "javax.comm." are replaced by references to "gnu.io.". These references are all in the "com.sun.javatest.agent" package. These changes are just required to compile JT Harness. The resulting classes are not required when running jtreg itself. Note: if you are building jtreg with GNU Make, and want to run all the self tests for jtreg, you should make sure you use a patched version of JT Harness, available on the JT Harness 4.1.3a development branch (or later). The patch fixes a bug which is exhibited when the jtreg self tests are run. It does not affect the use of jtreg to run the OpenJDK regression tests.jtreg-jtreg4.2-b01/make/Defs.gmk0000644000000000000000000002115612670642364016361 0ustar rootroot00000000000000# # Copyright (c) 1996, 2015, 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) BUILDDIR = $(TOPDIR)/build # clobber settings from user's environment JAVA_HOME= CLASSPATH= JAVA_COMPILER= LD_LIBRARY_PATH= #---------------------------------------------------------------------- # # Support for Cygwin 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 endif ifdef USING_CYGWIN 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 #---------------------------------------------------------------------- # # Parameters to control what to build with # explicit JDK versions, for use as needed #----- Java: see http://java.sun.com ifndef JDK15HOME ifdef SLASHJAVA JDK15HOME = $(SLASHJAVA)/re/jdk/1.5.0/archive/fcs/binaries/linux-i586 endif endif JDK15HOME := $(call FullPath,$(JDK15HOME)) ifndef JDK16HOME ifdef SLASHJAVA JDK16HOME = $(SLASHJAVA)/re/jdk/1.6.0/archive/fcs/binaries/linux-i586 endif endif JDK16HOME := $(call FullPath,$(JDK16HOME)) ifndef JDK17HOME ifdef SLASHJAVA JDK17HOME = $(SLASHJAVA)/re/jdk/1.7.0/archive/fcs/binaries/linux-i586 endif endif JDK17HOME := $(call FullPath,$(JDK17HOME)) ifndef JDK18HOME ifdef SLASHJAVA JDK18HOME = $(SLASHJAVA)/re/jdk/1.8.0/promoted/latest/binaries/linux-i586 endif endif JDK18HOME := $(call FullPath,$(JDK18HOME)) ifndef JDK19HOME ifdef SLASHJAVA JDK19HOME = $(SLASHJAVA)/re/jdk/1.9.0/promoted/latest/binaries/linux-i586 endif endif JDK19HOME := $(call FullPath,$(JDK19HOME)) # optional, for now # JIGSAWHOME # J2SE for most classes J2SEHOME = $(JDK15HOME) J2SEJAVA = $(J2SEHOME)/bin/java J2SEJAVAC = $(J2SEHOME)/bin/javac JAR = $(J2SEHOME)/bin/jar J2SEJAVAC_SOURCE = 5 J2SEJAVAC_TARGET = 5 #----- JavaHelp: see https://javahelp.dev.java.net/ ifndef JAVAHELP_HOME ifdef SLASHJAVA JAVAHELP_HOME = $(SLASHJAVA)/re/jh/2.0_01/promoted/fcs/latest/binaries/jh2.0/javahelp endif endif JAVAHELP_HOME := $(call FullPath,$(JAVAHELP_HOME)) JAVAHELP_JAR = $(JAVAHELP_HOME)/lib/jh.jar JHINDEXER = CLASSPATH=$(JAVAHELP_HOME)/lib/jhall.jar $(J2SEJAVA) com.sun.java.help.search.Indexer #----- JavaTest: see https://jtharness.dev.java.net/ ifndef JTHARNESS_HOME ifdef SLASHJAVA JTHARNESS_HOME = $(SLASHJAVA)/re/jtharness/4.4/archive/MR1/binaries endif endif JTHARNESS_HOME := $(call FullPath,$(JTHARNESS_HOME)) ifndef JAVATEST_HOME ifdef JTHARNESS_HOME JAVATEST_HOME = $(JTHARNESS_HOME) else ifdef SLASHJAVA JAVATEST_HOME = $(SLASHJAVA)/re/javatest/4.4/archive/fcs/binaries/javatest endif endif endif JAVATEST_HOME := $(call FullPath,$(JAVATEST_HOME)) ifdef JAVATEST_HOME JAVATEST_JAR = $(JAVATEST_HOME)/lib/javatest.jar endif #----- JCov 2.0 ifndef JCOV_HOME ifdef SLASHJAVA JCOV_HOME = $(SLASHJAVA)/re/jcov/2.0/promoted/latest/binaries/jcov_2.0/ endif endif JCOV_HOME := $(call FullPath,$(JCOV_HOME)) ifdef JCOV_HOME JCOV = $(JDK16HOME)/bin/java -jar $(JCOV_HOME)/lib/jcov.jar endif #----- AsmTools 6.0 ifndef ASMTOOLS_HOME ifdef SLASHJAVA ASMTOOLS_HOME = $(SLASHJAVA)/re/asmtools/6.0/nightly/binaries/latest/asmtools-6.0/ endif endif ASMTOOLS_HOME := $(call FullPath,$(ASMTOOLS_HOME)) #----- JUnit 4.5: see http://www.junit.org/ # http://sourceforge.net/projects/junit/files/junit/4.5/junit-4.5.jar/download ifndef JUNIT_JAR ifdef SLASHJAVA JUNIT_JAR = $(SLASHJAVA)/devtools/share/junit/junit-4.5/junit.jar endif endif JUNIT_JAR := $(call FullPath,$(JUNIT_JAR)) #----- TestNG 6.8.5: see http://www.testng.org/ # http://testng.org/doc/download.html ifndef TESTNG_HOME ifdef SLASHJAVA TESTNG_HOME = $(SLASHJAVA)/devtools/share/testng/testng-6.8.5 endif endif TESTNG_HOME := $(call FullPath,$(TESTNG_HOME)) ifndef TESTNG_JAR ifdef TESTNG_HOME TESTNG_JAR = $(TESTNG_HOME)/testng-6.8.5.jar endif endif TESTNG_JAR := $(call FullPath,$(TESTNG_JAR)) #----- Ant: see http://ant.apache.org/ ifndef ANTHOME ifdef SLASHJAVA ANTHOME = $(SLASHJAVA)/devtools/share/ant/1.7.0 endif endif ANTHOME := $(call FullPath,$(ANTHOME)) ifdef ANTHOME ANT = $(ANTHOME)/bin/ant endif #----- HTML check: # Optional: if set, checks HTML doc files for correctness. # Uses nsgmlns http://www.jclark.com/sp/ and w3c DTDs # Leave HTMLCHECK unset if not required ifndef HTMLCHECK ifdef SLASHJAVA # HTMLCHECK = $(SLASHJAVA)/jct-tools/pkgs/htmlcheck_1.2.1/bin/htmlcheck endif endif #----- Linklint: see http://www.linklint.org/ # Optional: if set, checks HTML doc files for broken links ifndef LINKLINT LINKLINT = $(shell which linklint 2>/dev/null) endif #----- Xalan: see http://xml.apache.org/xalan-j/ ifndef XALANHOME ifdef SLASHJAVA XALANHOME = $(SLASHJAVA)/jct-tools/pkgs/xalan-j_2_7_0 endif endif XALANHOME := $(call FullPath,$(XALANHOME)) #----- 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 MKDIR = /bin/mkdir PERL = /usr/bin/perl 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 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 = $(SRCDIR)/share/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 = 4.1 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_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)) jtreg-jtreg4.2-b01/make/Makefile0000644000000000000000000000453012670642364016435 0ustar rootroot00000000000000# # Copyright (c) 1999, 2015, 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 = .. BUILDDIR = $(TOPDIR)/build include Defs.gmk include Platform.gmk default: build all: build test #---------------------------------------------------------------------- include jtdiff.gmk include jtreg.gmk include tests/*.gmk include Rules.gmk build: $(BUILDFILES) test: $(INITIAL_TESTS) $(TESTS) $(FINAL_TESTS) images: $(VERBOSEZIPFILES) clean: $(RM) $(BUILDDIR) .NO_PARALLEL: clean sanity: @echo "JDK15HOME = $(JDK15HOME)" @echo "JDK16HOME = $(JDK16HOME)" @echo "JDK17HOME = $(JDK17HOME)" @echo "JAVAHELP_HOME = $(JAVAHELP_HOME)" @echo "JAVATEST_HOME = $(JAVATEST_HOME)" ifneq ($(JTHARNESS_HOME), $(JAVATEST_HOME)) @echo "JTHARNESS_HOME = $(JTHARNESS_HOME)" endif ifdef JCOV_HOME @echo "JCOV_HOME = $(JCOV_HOME)" endif ifdef ASMTOOLS_HOME @echo "ASMTOOLS_HOME = $(ASMTOOLS_HOME)" endif @echo "ANTHOME = $(ANTHOME)" @echo "XALANHOME = $(XALANHOME)" @echo "JUNIT_JAR = $(JUNIT_JAR)" @echo "TESTNG_HOME = $(TESTNG_HOME)" @echo "TESTNG_JAR = $(TESTNG_JAR)" @echo "LINKLINT = $(LINKLINT)" #---------------------------------------------------------------------- .PHONY: default all build test images clean sanity jtreg-jtreg4.2-b01/make/Platform.gmk0000644000000000000000000001326312670642364017264 0ustar rootroot00000000000000# # 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 $(UNAME) -r) 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-jtreg4.2-b01/make/Rules.gmk0000644000000000000000000001145712670642364016575 0ustar rootroot00000000000000# # Copyright (c) 1996, 2007, 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 (*.gif, *.html, *.properties, *.hs) into classes directory from source tree $(CLASSDIR)/%.gif: $(JAVADIR)/%.gif checkImageFormat.sh $(SH) checkImageFormat.sh GIF $(@:$(CLASSDIR)/%=$(JAVADIR)/%) $(RM) -f $@ if [ ! -d $(@D) ] ; then $(MKDIR) -p $(@D) ; fi $(CP) $(@:$(CLASSDIR)/%=$(JAVADIR)/%) $@ $(CLASSDIR)/%.jpeg: $(JAVADIR)/%.jpeg checkImageFormat.sh $(SH) checkImageFormat.sh JPEG $(@:$(CLASSDIR)/%=$(JAVADIR)/%) $(RM) -f $@ if [ ! -d $(@D) ] ; then $(MKDIR) -p $(@D) ; fi $(CP) $(@:$(CLASSDIR)/%=$(JAVADIR)/%) $@ $(CLASSDIR)/%.html: $(JAVADIR)/%.html $(RM) -f $@ if [ ! -d $(@D) ] ; then $(MKDIR) -p $(@D) ; fi $(CP) $(@:$(CLASSDIR)/%=$(JAVADIR)/%) $@ $(CLASSDIR)/%.properties: $(JAVADIR)/%.properties $(RM) -f $@ if [ ! -d $(@D) ] ; then $(MKDIR) -p $(@D) ; fi $(CP) $(@:$(CLASSDIR)/%=$(JAVADIR)/%) $@ $(CLASSDIR)/%.hs: $(JAVADIR)/%.hs $(RM) -f $@ if [ ! -d $(@D) ] ; then $(MKDIR) -p $(@D) ; fi $(CP) $(@:$(CLASSDIR)/%=$(JAVADIR)/%) $@ $(CLASSDIR)/%.xsd: $(JAVADIR)/%.xsd $(RM) -f $@ if [ ! -d $(@D) ] ; then $(MKDIR) -p $(@D) ; fi $(CP) $(@:$(CLASSDIR)/%=$(JAVADIR)/%) $@ #--------------------------------------------------------------------- # # doc files: # HTML files are htmlcheck-ed and then copied from the source area # area to the build area; other files are simply copied. $(JTREG_IMAGEDOCDIR)/%.html: $(SRCDOCDIR)/%.html $(HTMLCHECK) $(@:$(JTREG_IMAGEDOCDIR)/%=$(SRCDOCDIR)/%) $(MKDIR) -p $(@D) $(RM) $@ $(CP) $(@:$(JTREG_IMAGEDOCDIR)/%=$(SRCDOCDIR)/%) $@ chmod a-w $@ $(JTREG_IMAGEDOCDIR)/%: $(SRCDOCDIR)/% $(MKDIR) -p $(@D) $(RM) $@ $(CP) $(@:$(JTREG_IMAGEDOCDIR)/%=$(SRCDOCDIR)/%) $@ chmod a-w $@ #--------------------------------------------------------------------- $(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 [ ! -z "$(JAR_MAINCLASS)" ]; then echo "Main-class: $(JAR_MAINCLASS)" ; fi ; \ if [ ! -z "$(JAR_CLASSPATH)" ]; then echo "Class-Path: $(JAR_CLASSPATH)" ; fi ; \ echo "$(@F:%.jar=%)-Name: $(@F:%.jar=%)" ; \ echo "$(@F:%.jar=%)-Version: $(BUILD_VERSION)" ; \ echo "$(@F:%.jar=%)-Milestone: $(BUILD_MILESTONE)" ; \ echo "$(@F:%.jar=%)-Build: $(BUILD_NUMBER)" ; \ echo "$(@F:%.jar=%)-BuildJavaVersion: `$(J2SEJAVA) -fullversion 2>&1 | awk '{print $$NF}' | \ 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) $(JAR) -cmf $(@:$(IMAGES_DIR)/%.jar=$(BUILDDIR)/jarData/%/manifest.txt) $@ \ $(JAR_COPYRIGHT) \ `sh pkgsToFiles.sh $(CLASSDIR) $($(@F:%.jar=PKGS.JAR.%))` \ $(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) $@ #---------------------------------------------------------------------- # # cancel implicit rules %: %.o %: %.obj %: %.dll %: %.c %: %.cc %: %.cpp %: %.C %: %.p %: %.f %: %.s %: %.F %: %.r %: %.S %: %.mod %: %.sh jtreg-jtreg4.2-b01/make/build.properties0000644000000000000000000000460012670642364020210 0ustar rootroot00000000000000# # Copyright (c) 2007, 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. # # 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 4.3 or better) javatest.home = ${jtreg.build.resources}/jtharness/4.3 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.5 or better) junit.jar = ${jtreg.build.resources}/junit/4.5/junit-4.5.jar # TestNG (should be 6.7 or better) testng.jar = ${jtreg.build.resources}/testng/6.7/other-jars/testng-6.7-dist.jar # jcov (Oracle only; 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 = 4.0 build.milestone = dev build.number = b00 jtreg-jtreg4.2-b01/make/build.xml0000644000000000000000000005464712670642364016634 0ustar rootroot00000000000000 jtreg-jtreg4.2-b01/make/checkI18NProps.sh0000644000000000000000000000744212670642364020037 0ustar rootroot00000000000000#! /bin/sh # # Copyright (c) 2000, 2007, 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. # # # shell script to extract the set of i18n message keys from a package # and to compare them against the keys in the i18n.properties file. # The message keys are extracted by a combination of static and dynamic # analysis. srcDir=$1 dynProps=$2 base=`basename $0`.$$ requiredProps=$base.reqd.tmp definedProps=$base.defd.tmp diffs=$base.diff.tmp reqdNotDefd=$base.rqnd.tmp defdNotReqd=$base.dfnr.tmp # this is the command to extract the keys from the source files # customize as required #egrep '(Message.get|Fault|BadArgs|BadValue|println|error|showMessage|popupError)\(msgs, "|(printMessage|showCount)\("' ${srcDir}/*.java | sed -e 's/.*"\([^"]*\)".*/\1/' | sort -u > $requiredProps # .log for WorkDirectory.log(...) # temp allow showError 5/28/03 # temp allow WaitDialog lots of strings, standard ones would be better # createList() checking not possible because of some dynamically generated # resource keys, use dynamic analysis in I18NExecTest.java ( egrep '(Message.get|Fault|BadArgs|BadValue|println|printErrorMessage|printMessage|[eE]rror|showMessage|popupError|write|JavaTestError|\.log|super)\((msgs|i18n), "[^"]*"(,|\))|(printMessage|getI18NString|writeI18N|i18n.getString|formatI18N|setI18NTitle)\("[^"]*"(,|\))' ${srcDir}/*.java | sed -e 's/[^"]*"\([^"]*\)".*/\1/' ; egrep 'uif.createMessageArea\("' ${srcDir}/*.java | sed -e 's/.*"\([^"]*\)".*/\1.txt/' ; egrep 'uif.showError\("' ${srcDir}/*.java | sed -e 's/.*"\([^"]*\)".*/\1.err/' ; egrep 'showError\("' ${srcDir}/*.java | sed -e 's/.*"\([^"]*\)".*/\1.err/' ; egrep 'uif.show(YesNo|YesNoCancel|OKCancel|Information|CustomInfo)Dialog\("' ${srcDir}/*.java | sed -e 's/.*"\([^"]*\)".*/\1.txt\ \1.title/' ; egrep 'uif.createWaitDialog\("' ${srcDir}/*.java | sed -e 's/.*"\([^"]*\)".*/\1.txt\ \1.title\ \1.desc\ \1.name/' ; grep 'new FileType' ${srcDir}/*.java | sed -e 's/.*new FileType("\([^"]*\)");.*/filetype\1/' -e 's/.*new FileType();.*/filetype.allFiles/' if [ ! -z "$dynProps" ]; then grep '^i18n:' $dynProps | awk '{print $2}' ; fi ) | sort -u > $requiredProps # end sed -e '/^#/d' -e '/^[ ]/d' -e '/^[^=]*$/d' -e 's/^\([A-Za-z0-9/_.-]*\).*/\1/' ${srcDir}/i18n.properties | sort -u > $definedProps diff $requiredProps $definedProps > $diffs grep '^<' $diffs | awk '{print $2}' > $reqdNotDefd if [ -s $reqdNotDefd ]; then echo "messages required but not defined:" cat $reqdNotDefd echo exitCode=1 fi grep '^>' $diffs | awk '{print $2}' > $defdNotReqd if [ -s $defdNotReqd ]; then echo "messages defined but not required:" cat $defdNotReqd echo exitCode=1 fi rm -f $requiredProps $definedProps $diffs $reqdNotDefd $defdNotReqd exit ${exitCode:-0} jtreg-jtreg4.2-b01/make/checkstyle/checkstyle-emacs.xsl0000644000000000000000000000166712670642364023117 0ustar rootroot00000000000000 Coding Style Check Results -------------------------- Total files checked: Files with errors: Total errors: Errors per file: :: jtreg-jtreg4.2-b01/make/checkstyle/checkstyle-jtreg.xml0000644000000000000000000000311412670642364023121 0ustar rootroot00000000000000 jtreg-jtreg4.2-b01/make/display.sh0000644000000000000000000000563012670642364017000 0ustar rootroot00000000000000#!/bin/sh # # Copyright (c) 2003, 2008, 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. # # display.sh [-kill] # # A wrapper around optional use of vncserver. # # If available and enabled, a vnc server will be started and its display # name returned. Otherwise $DISPLAY or a default will be returned. # If the -kill option is given the vnc server on $DISPLAY will be killed. # # Set environment variable VNC to false|off|no|0 to disable VNC; # this is useful if you need to debug GUI targets #echo debug: VNC=$VNC 1>&2 #echo debug: DISPLAY=$DISPLAY 1>&2 # setup VNC if enabled case "${VNC:-1}" in false|off|no|0 ) VNC=0 ;; * ) if [ -f $HOME/.vnc/passwd ]; then # put VNC_HOME on front of path, if set # otherwise, try and find vncserver if not on PATH if [ -n "$VNC_HOME" ]; then PATH=$VNC_HOME:$PATH export PATH elif [ -z "`which vncserver`" ]; then if [ -f /usr/dist/exe/vncserver ]; then PATH=/usr/dist/exe:$PATH export PATH fi fi # final check if [ -n "`which vncserver`" ]; then VNC=1 else VNC=0 fi else # user does not have VNC password set VNC=0 fi ;; esac # use VNC if enabled and available if [ $VNC = 1 ]; then if [ "$1" = "-kill" ]; then vncserver -kill $DISPLAY else # echo debug: starting VNC 1>&2 VNC_SERVERLOG=${BUILDDIR:-../build}/vncserver.log vncserver 2>&1 | tee $VNC_SERVERLOG 1>&2 grep 'New .* desktop is' $VNC_SERVERLOG | \ sed -e 's/^.*desktop is \(.*\)/\1/' fi else if [ "$1" != "-kill" ]; then echo ${DISPLAY:-`uname -n`:0.0} fi fi jtreg-jtreg4.2-b01/make/i18n.pat0000644000000000000000000000246012670642364016262 0ustar rootroot00000000000000# 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-jtreg4.2-b01/make/jtdiff.gmk0000644000000000000000000000530012670642364016737 0ustar rootroot00000000000000# # Copyright (c) 1999, 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. # #---------------------------------------------------------------------- # # 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)$(JAVAHELP_JAR)$(PS)$(ANTHOME)/lib/ant.jar" \ $(J2SEJAVAC) -source $(J2SEJAVAC_SOURCE) -target $(J2SEJAVAC_TARGET) -encoding ISO8859-1 -d $(CLASSDIR) \ $(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-jtreg4.2-b01/make/jtreg.gmk0000644000000000000000000003232212670642364016610 0ustar rootroot00000000000000# # Copyright (c) 1999, 2015, 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 REGTEST-JDK11-CLASSES = AppletWrapper GetSystemProperty MainWrapper RStatus StringArray JAVAFILES.com.sun.javatest.regtest-jdk11 = \ $(REGTEST-JDK11-CLASSES:%=$(JAVADIR)/com/sun/javatest/regtest/agent/%.java) # TODO: set -bootclasspath to JDK 1.1 classes? $(BUILDDIR)/classes.com.sun.javatest.regtest-jdk11.ok: \ $(JAVAFILES.com.sun.javatest.regtest-jdk11) \ $(call PosixPath,$(JAVATEST_JAR)) $(MKDIR) -p $(CLASSDIR) CLASSPATH="$(JAVADIR)$(PS)$(CLASSDIR)$(PS)$(JAVATEST_JAR)$(PS)$(JUNIT_JAR)" \ $(J2SEJAVAC) -source 1.2 -target 1.1 -d $(CLASSDIR) \ $(JAVAFILES.com.sun.javatest.regtest-jdk11) echo "classes built at `date`" > $@ JAVAFILES.com.sun.javatest.regtest-j2se := \ $(filter-out $(JAVAFILES.com.sun.javatest.regtest-jdk11), $(shell $(FIND) $(JAVADIR)/com/sun/javatest/regtest -name \*.java )) \ $(JAVADIR)/java/lang/reflect/JTRegModuleHelper.java $(BUILDDIR)/classes.com.sun.javatest.regtest.ok: \ $(JAVAFILES.com.sun.javatest.regtest-j2se) \ $(BUILDDIR)/classes.com.sun.javatest.regtest-jdk11.ok CLASSPATH="$(CLASSDIR)$(PS)$(ANTHOME)/lib/ant.jar$(PS)$(JAVATEST_JAR)$(PS)$(JUNIT_JAR)$(PS)$(TESTNG_JAR)$(PS)$(JAVAHELP_JAR)" \ $(J2SEJAVAC) -source $(J2SEJAVAC_SOURCE) -target $(J2SEJAVAC_TARGET) -encoding ISO8859-1 -d $(CLASSDIR) \ $(JAVAFILES.com.sun.javatest.regtest-j2se) echo "classes built at `date`" > $@ TARGETS.com.sun.javatest.regtest += $(BUILDDIR)/classes.com.sun.javatest.regtest.ok #---------------------------------------------------------------------- # # resources required for com.sun.javatest.regtest RESOURCES.com.sun.javatest.regtest = \ $(CLASSDIR)/com/sun/javatest/regtest/i18n.properties TARGETS.com.sun.javatest.regtest += $(RESOURCES.com.sun.javatest.regtest) RESOURCES.com.sun.javatest.regtest.agent = \ $(CLASSDIR)/com/sun/javatest/regtest/agent/i18n.properties TARGETS.com.sun.javatest.regtest += $(RESOURCES.com.sun.javatest.regtest.agent) #---------------------------------------------------------------------- # # Misc. doc files 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_DOCUMENT_CSS = $(JTREG_IMAGEDIR)/doc/document.css JTREG_DOCS = \ $(JTREG_COPYRIGHT) \ $(JTREG_FAQ) \ $(JTREG_LICENSE) \ $(JTREG_README) \ $(JTREG_TAGSPEC) \ $(JTREG_USAGE) \ $(JTREG_DOCUMENT_CSS) $(JTREG_COPYRIGHT): $(TOPDIR)/COPYRIGHT $(MKDIR) -p $(@D) $(RM) $@ $(CP) $< $@ $(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) $^ $@ $(JTREG_DOCUMENT_CSS): $(SRCDOCDIR)/document.css $(RM) $@ $(MKDIR) -p $(@D) $(CP) $< $@ TARGETS.doc_jtreg += $(JTREG_DOCS) #---------------------------------------------------------------------- # # JavaHelp data files REGTEST_HELP_AUX_FILES = \ jtreg.hs \ default/help.css \ default/index.html \ default/ant.html \ images/openbook.gif \ images/chapter.gif \ images/Back16.gif \ images/Up16.gif \ images/Forward16.gif TARGETS.JAR.jtreg += \ $(REGTEST_HELP_AUX_FILES:%=$(REGTEST_CLASSDIR)/help/%) REGTEST_CLASSDIR = $(CLASSDIR)/com/sun/javatest/regtest REGTEST_SRCDIR = $(SRCJTDOCDIR)/regtest $(REGTEST_CLASSDIR)/help/default/tag-spec.html: $(REGTEST_SRCDIR)/tag-spec.html $(MKDIR) -p $(@D) $(SED) -e 's/font-size:smaller//' $^ > $@ $(REGTEST_CLASSDIR)/help/default/usage.html: $(BUILDDIR)/jtreg-usage.txt $(MKDIR) -p $(@D) $(RM) $@ ( echo '' ; \ echo ''; \ echo 'jtreg: Command Line Usage'; \ echo ''; \ echo ''; \ echo '
'; \
	  sed -e 's/&/\&/g' -e 's//\>/g' -e 's/$$0/jtreg/g' $^ ; \
	  echo '
'; \ echo ''; \ ) >$@ $(BUILDDIR)/jtreg-usage.txt: \ $(BUILDDIR)/classes.com.sun.javatest.regtest.ok \ $(BUILDDIR)/classes/com/sun/javatest/regtest/i18n.properties $(J2SEJAVA) -cp "$(CLASSDIR)$(PS)$(JAVATEST_JAR)$(PS)$(JAVAHELP_JAR)" \ -Dprogram=jtreg com.sun.javatest.regtest.Main -help all > $@ XALAN_PATH = $(XALANHOME)/xalan.jar$(PS)$(XALANHOME)/serializer.jar$(PS)$(XALANHOME)/xml-apis.jar$(PS)$(XALANHOME)/xercesImpl.jar XALAN = CLASSPATH="$(XALAN_PATH)" $(J2SEJAVA) org.apache.xalan.xslt.Process $(BUILDDIR)/regtest_help_dynfiles.ok: \ $(REGTEST_SRCDIR)/faq.xml \ $(REGTEST_CLASSDIR)/help/default/tag-spec.html \ $(REGTEST_CLASSDIR)/help/default/usage.html $(RM) $(REGTEST_CLASSDIR)/help/default/faq*.html $(XALAN) -in $(REGTEST_SRCDIR)/faq.xml \ -xsl $(REGTEST_SRCDIR)/faqtohelp-html.xsl \ -out $(REGTEST_CLASSDIR)/help/default/faq.html \ -param basedir . \ -param context help $(XALAN) -in $(REGTEST_SRCDIR)/faq.xml \ -xsl $(REGTEST_SRCDIR)/faqtotoc.xsl \ -out $(REGTEST_CLASSDIR)/help/default/toc.xml $(XALAN) -in $(REGTEST_SRCDIR)/faq.xml \ -xsl $(REGTEST_SRCDIR)/faqtomap.xsl \ -out $(REGTEST_CLASSDIR)/help/default/map.xml cd $(REGTEST_CLASSDIR)/help; \ $(JHINDEXER) -verbose -db default/JavaHelpSearch \ `find default -name \*.html -print ` echo "regtest help files created at `date`" > $@ $(REGTEST_CLASSDIR)/%: $(REGTEST_SRCDIR)/% $(MKDIR) -p $(@D) $(RM) $@ $(CP) $(@:$(REGTEST_CLASSDIR)/%=$(REGTEST_SRCDIR)/%) $@ TARGETS.JAR.jtreg += \ $(BUILDDIR)/regtest_help_dynfiles.ok #---------------------------------------------------------------------- # # jtreg FAQ jtreg-faqs: \ jtreg-faq-sun/jtreg-faq.html \ jtreg-faq-openjdk/jtreg-faq.html jtreg-faq-%/jtreg-faq.html: \ $(REGTEST_SRCDIR)/faq.xml \ $(REGTEST_SRCDIR)/faqtohtml.xsl $(MKDIR) -p $(@D) $(XALAN) -in $(REGTEST_SRCDIR)/faq.xml \ -xsl $(REGTEST_SRCDIR)/faqtohtml.xsl \ -out $@ \ -param context $(@:jtreg-faq-%/jtreg-faq.html=%) $(JTREG_FAQ): \ $(REGTEST_SRCDIR)/faq.xml \ $(REGTEST_SRCDIR)/faqtohtml.xsl $(MKDIR) -p $(@D) $(XALAN) -in $(REGTEST_SRCDIR)/faq.xml \ -xsl $(REGTEST_SRCDIR)/faqtohtml.xsl \ -out $@ \ -param context openjdk #---------------------------------------------------------------------- # # add docs into standard macros TARGETS.ZIP.jtreg += $(TARGETS.doc_jtreg) TARGETS.JAR.jtreg += \ $(REGTEST_HELP_AUX_FILES:%=$(REGTEST_CLASSDIR)/help/%) \ $(BUILDDIR)/regtest_help_dynfiles.ok FILES.JAR.jtreg += \ $(CLASSDIR)/com/sun/javatest/regtest/help #---------------------------------------------------------------------- # # create jtreg.jar PKGS.JAR.jtreg += \ com.sun.javatest.regtest \ com.sun.javatest.regtest.agent \ java.lang.reflect 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 jh.jar asmtools.jar $(JTREG_IMAGEJARDIR)/jtreg.jar: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEJARDIR)/jh.jar \ $(TARGETS.JAR.jtreg) TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/jtreg.jar #---------------------------------------------------------------------- # # import JavaTest or JT Harness TARGETS.com.sun.javatest.regtest += $(RESOURCES.com.sun.javatest.regtest) ifdef JTHARNESS_HOME TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/legal/jtharness/copyright.txt TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/legal/jtharness/license.txt else TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/legal/javatest/copyright.html TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/doc/javatest/javatestGUI.pdf endif $(JTREG_IMAGEDIR)/legal/jtharness/copyright.txt \ $(JTREG_IMAGEDIR)/legal/jtharness/license.txt: \ $(JTREG_IMAGEDIR)/legal/jtharness/%: $(JTHARNESS_HOME)/legal/% $(RM) -f $@ $(MKDIR) -p $(@D) $(CP) $< $@ $(JTREG_IMAGEDIR)/legal/javatest/copyright.html: \ $(call PosixPath,$(JAVATEST_HOME)/COPYRIGHT-javatest.html) $(RM) -f $@ $(MKDIR) -p $(@D) $(CP) $< $@ $(JTREG_IMAGEDIR)/doc/javatest/javatestGUI.pdf: \ $(JTREG_IMAGEDIR)/%: $(call PosixPath,$(JAVATEST_HOME))/% $(RM) -f $@ $(MKDIR) -p $(@D) $(CP) $< $@ $(JTREG_IMAGEDIR)/lib/javatest.jar: $(call PosixPath,$(JAVATEST_JAR)) $(RM) -f $@ $(MKDIR) -p $(@D) $(CP) $(JAVATEST_JAR) $@ TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/javatest.jar #---------------------------------------------------------------------- # # import JavaHelp $(IMAGES_DIR)/%/jh.jar: $(call PosixPath,$(JAVAHELP_JAR)) $(RM) -f $@ $(MKDIR) -p $(@D) $(CP) $(JAVAHELP_JAR) $@ TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/jh.jar #---------------------------------------------------------------------- # # import JUnit $(JTREG_IMAGEDIR)/lib/junit.jar: $(call PosixPath,$(JUNIT_JAR)) $(RM) -f $@ $(MKDIR) -p $(@D) $(CP) $(JUNIT_JAR) $@ TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/junit.jar #---------------------------------------------------------------------- # # import TestNG ifdef TESTNG_HOME $(JTREG_IMAGEDIR)/legal/testng/LICENSE.txt: $(call PosixPath,$(TESTNG_HOME)/LICENSE.txt) $(MKDIR) -p $(@D) $(CAT) $(TESTNG_HOME)/LICENSE.txt >> $@ TARGETS.ZIP.jtreg += $(JTREG_IMAGEDIR)/legal/testng/LICENSE.txt $(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 ; $(TOUCH) $(BUILDDIR)/$$jquery ; \ $(JAR) uf $@ -C $(BUILDDIR) $$jquery ; \ fi TARGETS.ZIP.jtreg += $(JTREG_IMAGEJARDIR)/testng.jar endif #---------------------------------------------------------------------- # # import JCov ifdef JCOV_HOME $(JTREG_IMAGEDIR)/lib/jcov.jar: $(call PosixPath,$(JCOV_HOME)/lib/jcov.jar) $(RM) $@ $(MKDIR) -p $(@D) $(CP) $< $@ JCOV_NETWORK_SAVER = jcov_network_saver.jar $(JTREG_IMAGEDIR)/lib/$(JCOV_NETWORK_SAVER): $(call PosixPath,$(JCOV_HOME)/lib/$(JCOV_NETWORK_SAVER)) $(RM) $@ $(MKDIR) -p $(@D) $(CP) $< $@ TARGETS.ZIP.jtreg += \ $(JTREG_IMAGEDIR)/lib/jcov.jar \ $(JTREG_IMAGEDIR)/lib/$(JCOV_NETWORK_SAVER) endif #JCOV_HOME #---------------------------------------------------------------------- # # import AsmTools ifdef ASMTOOLS_HOME $(JTREG_IMAGEDIR)/lib/asmtools.jar: $(call PosixPath,$(ASMTOOLS_HOME)/lib/asmtools.jar) $(RM) $@ $(MKDIR) -p $(@D) $(CP) $< $@ TARGETS.ZIP.jtreg += \ $(JTREG_IMAGEDIR)/lib/asmtools.jar \ endif #ASMTOOLS_HOME #---------------------------------------------------------------------- # # 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 $(JTREG_IMAGEDIR)/release: echo "JTREG_VERSION=$(BUILD_VERSION) $(BUILD_NUMBER)" > $@ echo "BUILD_DATE=`/bin/date +'%B %d, %Y'`" >> $@ if [ -r $(TOPDIR)/.hg ]; then echo "SOURCE=jtreg:`hg tip | head -1 | cut -d: -f 3`" >> $@ ; fi TARGETS.ZIP.jtreg += \ $(JTREG_IMAGEDIR)/release #---------------------------------------------------------------------- # # create jtreg.zip bundles JTREG_ZIP = $(IMAGES_DIR)/jtreg.zip OPEN_JTREG_ZIP = $(IMAGES_DIR)/open-jtreg.zip $(JTREG_ZIP): $(TARGETS.ZIP.jtreg) $(RM) $@ dir=`pwd`; cd $(IMAGES_DIR); $(ZIP) -rq $$dir/$@ $(@F:%.zip=%) $(OPEN_JTREG_ZIP): $(JTREG_ZIP) $(RM) $@ $@-tmp.zip $(CP) $(JTREG_ZIP) $@-tmp.zip $(ZIP) -d $@-tmp.zip `(cd $(IMAGES_DIR); find jtreg -type f | egrep -i 'junit|jcov' )` $(CP) $@-tmp.zip $@ $(RM) $@-tmp.zip JTREG_ZIPFILES = $(JTREG_ZIP) JTREG_ZIPFILES += $(OPEN_JTREG_ZIP) #---------------------------------------------------------------------- BUILDFILES += $(JTREG_ZIPFILES) VERBOSEZIPFILES += $(JTREG_ZIPFILES:%.zip=%-$(VERBOSE_ZIP_SUFFIX).zip) #JTREG_JAVA_OPTS = -Ddebug.com.sun.javatest.TestResultCache=98 #JTREG_OPTS = $(JTREG_JAVA_OPTS:%=-J%) TESTS += $(TESTS.jtreg) jtreg-jtreg4.2-b01/make/netbeans/jtreg/nbproject/project.xml0000644000000000000000000001401112670642364024060 0ustar rootroot00000000000000 org.netbeans.modules.ant.freeform jtreg jtreg ../../.. ${root}/build.properties ${root}/make/build.properties ${root}/make/build.xml ${root} UTF-8 build ${root}/make . UTF-8 java ${root}/src/share/classes UTF-8 build clean xtest-jtreg clean build ${root}/make ${root}/src/share/classes ${root}/README ${root}/src/share/classes ${javatest.jar}:${jh.jar}:${ant.jar}:${junit.jar}:${testng.jar} 1.5 applet appletviewer arg checkBugId classname classpath defaultExecMode HTML javac javatest jtreg junit JUnitCore org othervm sourcepath yesno jtreg-jtreg4.2-b01/make/pkgsToFiles.sh0000644000000000000000000000261512670642364017565 0ustar rootroot00000000000000#! /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-jtreg4.2-b01/make/tests/AutoVMTests.gmk0000644000000000000000000000617312670642364021042 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- AUTOVM_FILES := $(shell find $(TESTDIR)/javatest/regtest/data/autovm -type f ) $(BUILDDIR)/autovm/tests.ok: $(AUTOVM_FILES) \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/lib/jh.jar for ts in none agentvm othervm; do \ $(MKDIR) -p $(BUILDDIR)/autovm/tests/default.$$ts ; \ rsync --recursive --delete $(TESTDIR)/javatest/regtest/data/autovm/ $(BUILDDIR)/autovm/tests/default.$$ts/ ; \ if [ $$ts != none ]; then \ echo "defaultExecMode=$$ts" >> $(BUILDDIR)/autovm/tests/default.$$ts/TEST.ROOT ; \ fi \ done ; \ for mode in none agentvm othervm ; do for ts in none agentvm othervm ; do \ $(J2SEJAVA) -Djavatest.regtest.showMode=true -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -jdk:$(J2SEHOME) \ -w $(BUILDDIR)/autovm/jtreg/mode.$$mode/ts.$$ts/work \ -r $(BUILDDIR)/autovm/jtreg/mode.$$mode/ts.$$ts/report \ `if [ $$mode != none ]; then echo "-$$mode" ; fi` \ $(BUILDDIR)/autovm/tests/default.$$ts ; \ done ; done ; \ find $(BUILDDIR)/autovm/jtreg/mode.*/ts.*/work -name \*.jtr | \ grep -v Shell | while read file ; do \ echo $$file `grep '^Mode:' $$file | sort -u` ; \ found=`grep '^Mode:' $$file` ; \ case $$file in \ */work/*/othervm/* ) expect_compile=OTHERVM ;; \ */mode.agentvm/* | */mode.none/ts.agentvm/* ) expect_compile=AGENTVM ;; \ */mode.none/ts.none/* | */mode.none/ts.othervm/* | */mode.othervm/* ) expect_compile=OTHERVM ;; \ * ) echo "Can't match $$file" ; exit 1 ;; \ esac ; \ case $$file in \ */work/*[Oo]ther* ) expect_run=OTHERVM ;; \ * ) expect_run=$$expect_compile ;; \ esac ; \ expect=`echo "Mode: $$expect_compile" ; echo "Mode: $$expect_run"` ; \ if [ "$$found" != "$$expect" ]; then \ echo "$$file: expected: $$expect, found: $$found" ; exit 1; \ fi \ done echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/autovm/tests.ok jtreg-jtreg4.2-b01/make/tests/BadLibsTest.gmk0000644000000000000000000000546412670642364021006 0ustar rootroot00000000000000# # Copyright (c) 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. # #------------------------------------------------------------------------------- # $(BUILDDIR)/BadLibsTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ > $(@:%.ok=%/jt.log) 2>&1 \ $(TESTDIR)/javatest/regtest/data/badlibs \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: error: 6' $(@:%.ok=%/jt.log) > /dev/null if $(GREP) 'failed to clean up files after test' $(@:%.ok=%/report/text/summary.txt) ; then \ echo 'Error: unexpected error message found'; exit 1; \ fi echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/BadLibsTest.ok #------------------------------------------------------------------------------- # $(BUILDDIR)/BadLibsTest.retain.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ > $(@:%.ok=%/jt.log) 2>&1 \ -retain:all \ $(TESTDIR)/javatest/regtest/data/badlibs \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: error: 6' $(@:%.ok=%/jt.log) > /dev/null if $(GREP) 'failed to clean up files after test' $(@:%.ok=%/report/text/summary.txt) ; then \ echo 'Error: unexpected error message found'; exit 1; \ fi echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/BadLibsTest.retain.ok jtreg-jtreg4.2-b01/make/tests/BadTests.gmk0000644000000000000000000000606112670642364020351 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- # Run bad tests in othervm mode -- this gives the "most preferred" set of results # Failures: # 1. Intentional # 2. Inappropriate use of exit # $(BUILDDIR)/BadTests.othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -othervm \ $(TESTDIR)/javatest/regtest/data/badtests \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: passed: 18; failed: 2' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ # Run bad tests in agentvm mode # Failures: # 1. Intentional # Errors # 1. Inappropriate use of exit (becomes EOF exception) # 2. Can't reset security manager # # Windows: On Windows, expect the following: # -agentvm 17,1,2 (as below) # -agentvm -retain:none 16,1,3 (because a test will fail in cleanup) # $(BUILDDIR)/BadTests.agentvm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) JTREG_SHOWAGENT=true \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -agentvm \ $(TESTDIR)/javatest/regtest/data/badtests \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: passed: 17; failed: 1; error: 2' $(@:%.ok=%/jt.log) > /dev/null agents=`$(GREP) '^Agent\[[0-9][0-9]*\]: Started' $(@:%.ok=%/jt.log) | wc -l` ; \ if [ $${agents} -ne 3 ]; then echo "Unexpected number of agents used: $${agents}" ; exit 1 ; fi echo "test passed at `date`" > $@ ifneq ($(OS_NAME), windows) TESTS.jtreg += \ $(BUILDDIR)/BadTests.othervm.ok \ $(BUILDDIR)/BadTests.agentvm.ok endif jtreg-jtreg4.2-b01/make/tests/Basic.gmk0000644000000000000000000000767312670642364017673 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- # explicit rules for specific tests BASIC.files := $(shell find $(TESTDIR)/javatest/regtest/data/basic -type f) $(BUILDDIR)/Basic.check.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jh.jar \ $(JTREG_IMAGEDIR)/lib/junit.jar \ $(JTREG_IMAGEDIR)/lib/testng.jar \ $(BUILDDIR)/i18n.com.sun.javatest.regtest.ok \ $(BASIC.files) $(RM) $(@:%.ok=%/work) $(@:%.ok=%/report) $(MKDIR) -p $(@:%.ok=%/work/scratch) $(@:%.ok=%/report) $(J2SEJAVA) \ -Djavatest.regtest.allowTrailingBuild=true \ -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -w $(@:%.ok=%/work) \ -r $(@:%.ok=%/report) \ -c -v1 \ $(TESTDIR)/javatest/regtest/data/basic \ > $(@:%.ok=%/log) 2>&1|| \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: passed: 155; error: 83' $(@:%.ok=%/log) > /dev/null echo $@ passed at `date` > $@ INITIAL_TESTS += \ $(BUILDDIR)/Basic.check.ok #---------------------------------------------------------------------- ENVVARS="DISPLAY=$${DISPLAY:-`uname -n`:0.0}" ifeq ($(OS_NAME), windows) BASIC_TESTS := $(shell cygpath -m $(abspath $(TESTDIR)/javatest/regtest/data/basic) ) else BASIC_TESTS := $(abspath $(TESTDIR)/javatest/regtest/data/basic) endif $(BUILDDIR)/Basic.othervm.ok \ $(BUILDDIR)/Basic.agentvm.ok: \ $(BUILDDIR)/testClasses \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jh.jar \ $(JTREG_IMAGEDIR)/lib/junit.jar \ $(JTREG_IMAGEDIR)/lib/testng.jar \ $(TESTDIR)/javatest/regtest/Basic.java \ $(BUILDDIR)/i18n.com.sun.javatest.regtest.ok \ $(BASIC.files) \ display.sh $(RM) $(@:%.ok=%/work) $(@:%.ok=%/report) $(MKDIR) -p $(@:%.ok=%/work/scratch) $(@:%.ok=%/report) CLASSPATH="$(CLASSDIR)$(PS)$(JAVADIR)$(PS)$(JAVATEST_JAR)" \ $(J2SEJAVAC) -encoding ISO8859-1 -d $(BUILDDIR)/testClasses $(TESTDIR)/javatest/regtest/Basic.java DISPLAY=`sh display.sh` export DISPLAY ; \ trap "sh `pwd`/display.sh -kill" 0 ; \ cd $(@:%.ok=%/work/scratch) ; \ $(J2SEJAVA) \ -cp "../../../testClasses$(PS)$(ABS_JTREG_IMAGEJARDIR)/jtreg.jar" \ -Ddebug.com.sun.javatest.TestResultTable=true \ -Ddebug.com.sun.javatest.TRT.TreeIterator=true \ -Ddebug.com.sun.javatest.TestRunner=true \ -Djavatest.regtest.allowTrailingBuild=true \ -Djavatest.regtest.showCmd=true \ -Djavatest.regtest.debugOptions=true \ Basic \ $(BASIC_TESTS) \ ../../report \ ../../work \ $(J2SEHOME) \ $(ENVVARS) \ $(@:$(BUILDDIR)/Basic.%.ok=-%) \ > ../../log 2>&1 \ || (cat ../../log ; exit 1) echo $@ passed at `date` > $@ INITIAL_TESTS += \ $(BUILDDIR)/Basic.othervm.ok \ $(BUILDDIR)/Basic.agentvm.ok jtreg-jtreg4.2-b01/make/tests/BootClassPathTest.gmk0000644000000000000000000000323612670642364022207 0ustar rootroot00000000000000# # Copyright (c) 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. # #---------------------------------------------------------------------- $(BUILDDIR)/BootClassPathTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/lib/testng.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(MKDIR) -p $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(TESTDIR)/javatest/regtest/data/bootclasspath \ > $(@:%.ok=%/jt.log) 2>&1 echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/BootClassPathTest.ok jtreg-jtreg4.2-b01/make/tests/BugIdTests.gmk0000644000000000000000000000743212670642364020660 0ustar rootroot00000000000000# # Copyright (c) 2012, 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. # $(BUILDDIR)/BugIdTests.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(TESTDIR)/javatest/regtest/data/bugidtests \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" errs=`$(CAT) $(@:%.ok=%)/report/text/summary.txt | \ $(GREP) -v "ValidTest.java.*Passed." | \ $(GREP) -v "InvalidTest.java.*Error. Parse Exception: Invalid or unrecognized bugid:" | \ $(GREP) -v "MixTest.java *Error. Parse Exception: Invalid or unrecognized bugid: bug" | \ $(GREP) -v "MixTest.java#id1 *Passed. Execution successful"` ; \ if [ -n "$$errs" ]; then \ echo "unexpected results" ; $(CAT) $(@:%.ok=%)/report/text/summary.txt ; exit 1 ; \ fi echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/BugIdTests.ok $(BUILDDIR)/BugIdTests.1001111.ok \ $(BUILDDIR)/BugIdTests.1002222.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -bug:$(@:$(BUILDDIR)/BugIdTests.%.ok=%) \ $(TESTDIR)/javatest/regtest/data/bugidtests \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" errs=`$(CAT) $(@:%.ok=%)/report/text/summary.txt | \ $(GREP) -v "MixTest.java *Error. Parse Exception: Invalid or unrecognized bugid: bug"` ; \ if [ -n "$$errs" ]; then \ echo "unexpected results" ; $(CAT) $(@:%.ok=%)/report/text/summary.txt ; exit 1 ; \ fi echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/BugIdTests.1001111.ok \ $(BUILDDIR)/BugIdTests.1002222.ok $(BUILDDIR)/BugIdTests.1003333.ok \ $(BUILDDIR)/BugIdTests.1004444.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -bug:$(@:$(BUILDDIR)/BugIdTests.%.ok=%) \ $(TESTDIR)/javatest/regtest/data/bugidtests \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" errs=`$(CAT) $(@:%.ok=%)/report/text/summary.txt | \ $(GREP) -v "MixTest.java#id1 *Passed. Execution successful"` ; \ if [ -n "$$errs" ]; then \ echo "unexpected results" ; $(CAT) $(@:%.ok=%)/report/text/summary.txt ; exit 1 ; \ fi echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/BugIdTests.1003333.ok \ $(BUILDDIR)/BugIdTests.1004444.ok jtreg-jtreg4.2-b01/make/tests/BuildPatternTest.gmk0000644000000000000000000000321512670642364022073 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # $(BUILDDIR)/BuildPatternTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(TESTDIR)/javatest/regtest/BuildPatternTest.java $(MKDIR) -p $(@:%.ok=%/classes) $(J2SEJAVAC) -d $(@:%.ok=%/classes) \ -cp $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(TESTDIR)/javatest/regtest/BuildPatternTest.java $(J2SEJAVA) \ -cp $(@:%.ok=%/classes):$(JTREG_IMAGEDIR)/lib/jtreg.jar \ com.sun.javatest.regtest.BuildPatternTest echo $@ passed at `date` > $@ TESTS.jtreg += \ $(BUILDDIR)/BuildPatternTest.ok jtreg-jtreg4.2-b01/make/tests/BuildTagTest.gmk0000644000000000000000000000337712670642364021202 0ustar rootroot00000000000000# # Copyright (c) 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. # #---------------------------------------------------------------------- $(BUILDDIR)/BuildTagTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(MKDIR) -p $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(TESTDIR)/javatest/regtest/data/buildTag \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: passed: 4; error: 3' $(@:%.ok=%/jt.log) > /dev/null echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/BuildTagTest.ok jtreg-jtreg4.2-b01/make/tests/CPAppendTests.gmk0000644000000000000000000000605712670642364021322 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/CPAppend/classes/p/Lib.class: \ $(TESTDIR)/javatest/regtest/cpappend/lib/p/Lib.java $(MKDIR) -p $(BUILDDIR)/CPAppend/classes $(J2SEJAVAC) -d $(BUILDDIR)/CPAppend/classes $(TESTDIR)/javatest/regtest/cpappend/lib/p/Lib.java # Control test for -cpa -- verify test fails if option not provided # $(BUILDDIR)/CPAppend/neg.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg \ $(BUILDDIR)/CPAppend/classes/p/Lib.class $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -othervm \ $(TESTDIR)/javatest/regtest/cpappend/test \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: failed: 1' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ # Run test in -othervm mode # $(BUILDDIR)/CPAppend/othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg \ $(BUILDDIR)/CPAppend/classes/p/Lib.class $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -othervm \ -cpa:$(BUILDDIR)/CPAppend/classes \ $(TESTDIR)/javatest/regtest/cpappend/test echo "test passed at `date`" > $@ # Run test in -agentvm mode # $(BUILDDIR)/CPAppend/agentvm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg \ $(BUILDDIR)/CPAppend/classes/p/Lib.class $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -agentvm \ -cpa:$(BUILDDIR)/CPAppend/classes \ $(TESTDIR)/javatest/regtest/cpappend/test echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/CPAppend/neg.ok \ $(BUILDDIR)/CPAppend/othervm.ok \ $(BUILDDIR)/CPAppend/agentvm.ok jtreg-jtreg4.2-b01/make/tests/CleanupTest.gmk0000644000000000000000000001343212670642364021067 0ustar rootroot00000000000000# # Copyright (c) 2011, 2015, 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. # # These tests run a set of 5 tests that each create an undeletable file # that will cause problems for jtreg cleaning up after a test. ##### # In agentvm and othervm mode, jtreg should successfully run each test # by moving to a new scratch directory when it can't clear the previous one. $(BUILDDIR)/CleanupTests.agentvm.ok \ $(BUILDDIR)/CleanupTests.othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg if [ -d $(@:%.ok=%) ]; then $(CHMOD) -R +w $(@:%.ok=%) && $(RM) $(@:%.ok=%) ; fi $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(@:$(BUILDDIR)/CleanupTests.%.ok=-%) \ $(TESTDIR)/javatest/regtest/data/cleanup \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: passed: 5' $(@:%.ok=%/jt.log) > /dev/null dirs=`cd $(@:%.ok=%)/work ; $(FIND) . -type d -print | $(GREP) scratch | $(GREP) -v readonly | $(SORT)` ; \ echo $$dirs ; \ if [ `echo $$dirs | $(WC) -w` != 5 ]; then echo "wrong number of scratch directories found" ; exit 1 ; fi $(CHMOD) -R +w $(@:%.ok=%) echo "test passed at `date`" > $@ ##### # In agentvm and othervm mode using concurrency, jtreg should successfully # run each test by moving to a new scratch directory when it can't clear # the previous one. $(BUILDDIR)/CleanupTests.agentvm.conc.ok \ $(BUILDDIR)/CleanupTests.othervm.conc.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg if [ -d $(@:%.ok=%) ]; then $(CHMOD) -R +w $(@:%.ok=%) && $(RM) $(@:%.ok=%) ; fi $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(@:$(BUILDDIR)/CleanupTests.%.conc.ok=-%) \ -conc:2 \ $(TESTDIR)/javatest/regtest/data/cleanup \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: passed: 5' $(@:%.ok=%/jt.log) > /dev/null dirs=`cd $(@:%.ok=%)/work ; $(FIND) . -type d -print | $(GREP) scratch/ | $(GREP) -v readonly | $(SORT)` ; \ echo $$dirs ; \ if [ `echo $$dirs | $(WC) -w` != 5 ]; then echo "wrong number of scratch directories found" ; exit 1 ; fi $(CHMOD) -R +w $(@:%.ok=%) echo "test passed at `date`" > $@ ##### # In agent mode with -retain, the tests all return error # because the selected files cannot be retained $(BUILDDIR)/CleanupTests.agentvm.retain.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg if [ -d $(@:%.ok=%) ]; then $(CHMOD) -R +w $(@:%.ok=%) && $(RM) $(@:%.ok=%) ; fi $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(@:$(BUILDDIR)/CleanupTests.%.retain.ok=-%) \ -retain:readonly.txt \ $(TESTDIR)/javatest/regtest/data/cleanup \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: error: 5' $(@:%.ok=%/jt.log) > /dev/null dirs=`cd $(@:%.ok=%)/work ; $(FIND) . -type d -print | $(GREP) scratch | $(GREP) -v readonly | $(SORT)` ; \ echo $$dirs ; \ if [ `echo $$dirs | $(WC) -w` != 5 ]; then echo "wrong number of scratch directories found" ; exit 1 ; fi $(CHMOD) -R +w $(@:%.ok=%) echo "test passed at `date`" > $@ ##### # In othervm mode with -retain, the tests pass because the # problem tests are written directly to the correct location # and do not need to be moved. $(BUILDDIR)/CleanupTests.othervm.retain.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg if [ -d $(@:%.ok=%) ]; then $(CHMOD) -R +w $(@:%.ok=%) && $(RM) $(@:%.ok=%) ; fi $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(@:$(BUILDDIR)/CleanupTests.%.retain.ok=-%) \ -retain:readonly.txt \ $(TESTDIR)/javatest/regtest/data/cleanup \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: passed: 5' $(@:%.ok=%/jt.log) > /dev/null dirs=`cd $(@:%.ok=%)/work ; $(FIND) . -type d -print | $(GREP) scratch | $(GREP) -v readonly | $(SORT)` ; \ echo $$dirs ; \ if [ `echo $$dirs | $(WC) -w` != 1 ]; then echo "wrong number of scratch directories found" ; exit 1 ; fi $(CHMOD) -R +w $(@:%.ok=%) echo "test passed at `date`" > $@ ifneq ($(OS_NAME), windows) TESTS.jtreg += \ $(BUILDDIR)/CleanupTests.agentvm.ok \ $(BUILDDIR)/CleanupTests.agentvm.conc.ok \ $(BUILDDIR)/CleanupTests.agentvm.retain.ok \ $(BUILDDIR)/CleanupTests.othervm.ok \ $(BUILDDIR)/CleanupTests.othervm.conc.ok \ $(BUILDDIR)/CleanupTests.othervm.retain.ok endif jtreg-jtreg4.2-b01/make/tests/CompileArgFileTest.gmk0000644000000000000000000000352112670642364022320 0ustar rootroot00000000000000# # Copyright (c) 2014, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/CompileArgFileTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(MKDIR) -p $(@:%.ok=%)/classes $(J2SEJAVAC) -d $(@:%.ok=%)/classes $(TESTDIR)/javatest/regtest/GenCompileTests.java $(J2SEJAVA) -cp $(@:%.ok=%)/classes GenCompileTests $(@:%.ok=%)/tests 32 $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(@:%.ok=%)/tests \ > $(@:%.ok=%/jt.log) 2>&1 $(GREP) -s '^Test results: passed: [0-9]*$$' $(@:%.ok=%/jt.log) > /dev/null echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/CompileArgFileTest.ok jtreg-jtreg4.2-b01/make/tests/CompileTests.gmk0000644000000000000000000001331112670642364021247 0ustar rootroot00000000000000# # Copyright (c) 1997, 2014, 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. # #---------------------------------------------------------------------- # Test @compile with -compilejdk; use not-a-jdk for -testjdk $(BUILDDIR)/CompileTest.1.agentvm.ok \ $(BUILDDIR)/CompileTest.1.othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg \ $(BUILDDIR)/not-a-jdk/bin/java $(RM) $(@:%.ok=%) JTREG_SHOWAGENT=true JTREG_SHOWCMD=true \ JT_JAVA=$(JDK16HOME) \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -compilejdk:$(JDK15HOME) \ -jdk:`pwd`/$(BUILDDIR)/not-a-jdk \ $(@:$(BUILDDIR)/CompileTest.1.%.ok=-%) \ $(TESTDIR)/javatest/regtest/data/compilejdk/CompileTest.java grep $(JDK15HOME) $(@:%.ok=%)/work/CompileTest.jtr if grep $(JDK16HOME) $(@:%.ok=%)/work/CompileTest.jtr ; then exit 1; fi echo "test passed at `date`" > $@ # Precompile test classes, then test @run main with -testjdk, use not-a-jdk for -compilejdk $(BUILDDIR)/CompileTest.2.agentvm.ok \ $(BUILDDIR)/CompileTest.2.othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg \ $(BUILDDIR)/not-a-jdk/bin/java $(RM) $(@:%.ok=%) JTREG_SHOWAGENT=true JTREG_SHOWCMD=true \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK15HOME) \ $(@:$(BUILDDIR)/CompileTest.2.%.ok=-%) \ $(TESTDIR)/javatest/regtest/data/compilejdk/ExecuteTest.java JTREG_SHOWAGENT=true JTREG_SHOWCMD=true \ JT_JAVA=$(JDK16HOME) \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -compilejdk:`pwd`/$(BUILDDIR)/not-a-jdk \ -jdk:$(JDK15HOME) \ $(@:$(BUILDDIR)/CompileTest.2.%.ok=-%) \ $(TESTDIR)/javatest/regtest/data/compilejdk/ExecuteTest.java grep $(JDK15HOME) $(@:%.ok=%)/work/ExecuteTest.jtr if grep $(JDK16HOME) $(@:%.ok=%)/work/ExecuteTest.jtr ; then exit 1; fi echo "test passed at `date`" > $@ # Test compilation on JDK, execution on just-java (JRE lookalike) $(BUILDDIR)/CompileTest.3.agentvm.ok \ $(BUILDDIR)/CompileTest.3.othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg \ $(BUILDDIR)/just-java/bin/java $(RM) $(@:%.ok=%) JTREG_SHOWAGENT=true JTREG_SHOWCMD=true \ JT_JAVA=$(JDK16HOME) \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -compilejdk:$(JDK15HOME) \ -jdk:`pwd`/$(BUILDDIR)/just-java \ $(@:$(BUILDDIR)/CompileTest.3.%.ok=-%) \ $(TESTDIR)/javatest/regtest/data/compilejdk/ExecuteTest.java echo "test passed at `date`" > $@ # Test compilation on one version of JDK, execution on another; # Verify tools.jar is on classpath for both $(BUILDDIR)/CompileTest.4.agentvm.ok \ $(BUILDDIR)/CompileTest.4.othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) JTREG_SHOWAGENT=true JTREG_SHOWCMD=true \ JT_JAVA=$(JDK16HOME) \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -compilejdk:$(JDK15HOME) \ -jdk:$(JDK16HOME) \ $(@:$(BUILDDIR)/CompileTest.4.%.ok=-%) \ $(TESTDIR)/javatest/regtest/data/compilejdk/ToolsJarTest.java echo "test passed at `date`" > $@ # Verify shell test gets COMPILEJAVA set as well as TESTJAVA $(BUILDDIR)/CompileTest.5.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) JT_JAVA=$(JDK16HOME) \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -compilejdk:$(JDK15HOME) \ -jdk:$(JDK16HOME) \ $(TESTDIR)/javatest/regtest/data/compilejdk/ShellTest.sh fgrep 'COMPILEJAVA=$(JDK15HOME)' $(@:%.ok=%)/work/ShellTest.jtr fgrep 'TESTJAVA=$(JDK16HOME)' $(@:%.ok=%)/work/ShellTest.jtr echo "test passed at `date`" > $@ # Invalid JDK, to trap unexpected use; suitable for -version, not much else $(BUILDDIR)/not-a-jdk/bin/java: mkdir -p $(@D) ( echo '#!/bin/bash' ; \ echo 'if [ $${!#} = "java.specification.version" ]; then' ; \ echo ' echo java.specification.version=1.2 ;' ; \ echo 'else' ; \ echo ' echo "Not a JDK: $$0 $$*" ;' ; \ echo 'fi' ; \ ) > $@ chmod +x $@ # Just Java, no javac $(BUILDDIR)/just-java/bin/java: mkdir -p $(@D) echo '$(JDK16HOME)/bin/java $$*' > $@ chmod +x $@ ifneq ($(OS_NAME), windows) TESTS.jtreg += \ $(BUILDDIR)/CompileTest.1.agentvm.ok \ $(BUILDDIR)/CompileTest.1.othervm.ok \ $(BUILDDIR)/CompileTest.2.agentvm.ok \ $(BUILDDIR)/CompileTest.2.othervm.ok \ $(BUILDDIR)/CompileTest.3.agentvm.ok \ $(BUILDDIR)/CompileTest.3.othervm.ok \ $(BUILDDIR)/CompileTest.4.agentvm.ok \ $(BUILDDIR)/CompileTest.4.othervm.ok \ $(BUILDDIR)/CompileTest.5.ok endif jtreg-jtreg4.2-b01/make/tests/ControlTest.gmk0000644000000000000000000000332612670642364021121 0ustar rootroot00000000000000# # Copyright (c) 2012, 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. # $(BUILDDIR)/ControlTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -xml:verify \ $(TESTDIR)/javatest/regtest/data/ctrl \ > $(@:%.ok=%/jt.log) 2>&1 ; rc=$$? ; \ if grep SAXParseException $(@:%.ok=%/jt.log) ; then \ echo "invalid XML generated" && exit 1; \ fi echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/ControlTest.ok jtreg-jtreg4.2-b01/make/tests/DebugTest.gmk0000644000000000000000000000577212670642364020536 0ustar rootroot00000000000000# # Copyright (c) 2012, 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. # # Although we run the same tests in the same manner (apart from the # mode option) for agentvm and othervm mode, currently, the detection # of whether or not an action is run with/without debug options is # different in the two modes. Ideally, the rerun sections should be # updated to be more equivalent. $(BUILDDIR)/DebugTest.othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -J-Djavatest.regtest.allowTrailingBuild=true \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -debug:-Ddebug=true \ $(TESTDIR)/javatest/regtest/data/debug \ > $(@:%.ok=%/jt.log) 2>&1 ; rc=$$? files=`( cd $(@:%.ok=%)/work ; $(GREP) --files-with-matches debug=true *.jtr )` ;\ if [ "$$files" != ExplicitCompile.jtr ]; then \ echo "unexpected use of -debug options"; exit 1; \ fi echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/DebugTest.othervm.ok $(BUILDDIR)/DebugTest.agentvm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -J-Djavatest.regtest.allowTrailingBuild=true \ -J-Djavatest.regtest.showAgent=true \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -agentvm \ -debug:-Ddebug=true \ $(TESTDIR)/javatest/regtest/data/debug \ > $(@:%.ok=%/jt.log) 2>&1 ; rc=$$? agents=`$(GREP) '^Agent...: Started' $(@:%.ok=%)/jt.log | wc -l` ; \ debugAgents=`$(GREP) '^Agent...: Started.*-Ddebug=true' $(@:%.ok=%)/jt.log | wc -l` ; \ if [ "$$agents" != 2 -o "$$debugAgents" != 1 ]; then \ $(GREP) '^Agent...: Started' $(@:%.ok=%)/jt.log ; \ echo "unexpected use of -debug options"; exit 1; \ fi echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/DebugTest.agentvm.ok jtreg-jtreg4.2-b01/make/tests/DupTest.gmk0000644000000000000000000000321612670642364020227 0ustar rootroot00000000000000# # Copyright (c) 2012, 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. # $(BUILDDIR)/DupTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(TESTDIR)/javatest/regtest/data/dupTests \ > $(@:%.ok=%/jt.log) 2>&1 ; rc=$$? ; \ if [ "$$rc" != 5 ]; then echo "unexpected exit code: " $$rc ; exit 1 ; fi echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/DupTest.ok jtreg-jtreg4.2-b01/make/tests/EmptyTest.gmk0000644000000000000000000001573212670642364020603 0ustar rootroot00000000000000# # Copyright (c) 2015, 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. # # No Args: # not allowed, exit code 1, Error: No tests selected # $(BUILDDIR)/EmptyTest_NoArgs.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ > $(@:%.ok=%/jt.log) 2>&1 ; \ rc=$$? ; if [ $$rc != 1 ]; then echo "unexpected exit code: $$rc"; exit 1; fi $(GREP) -s 'Error: No tests selected' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/EmptyTest_NoArgs.ok #------------------------------------------------------------------------------- # Empty Group: # allowed, exit code 0; Test results: No tests selected # $(BUILDDIR)/EmptyTest_EmptyGroup.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ > $(@:%.ok=%/jt.log) 2>&1 \ -dir:$(TESTDIR)/javatest/regtest/data/empty/ts1 \ :empty $(GREP) -s 'Test results: no tests selected' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/EmptyTest_EmptyGroup.ok #------------------------------------------------------------------------------- # Empty Folder: # not allowed, exit code 1; Test results: No tests selected # $(BUILDDIR)/EmptyTest_EmptyFolder.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ > $(@:%.ok=%/jt.log) 2>&1 \ -dir:$(TESTDIR)/javatest/regtest/data/empty/ts1 \ empty ; \ rc=$$? ; if [ $$rc != 1 ]; then echo "unexpected exit code: $$rc"; exit 1; fi $(GREP) -s 'Test results: no tests selected' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/EmptyTest_EmptyFolder.ok #------------------------------------------------------------------------------- # Empty File: # not allowed, exit code 5; Error: Not a test or directory containing tests: empty/Empty.java # $(BUILDDIR)/EmptyTest_EmptyFile.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ > $(@:%.ok=%/jt.log) 2>&1 \ -dir:$(TESTDIR)/javatest/regtest/data/empty/ts1 \ empty/Empty.java ; \ rc=$$? ; if [ $$rc != 5 ]; then echo "unexpected exit code: $$rc"; exit 1; fi $(GREP) -s 'Error: Not a test or directory containing tests: empty/Empty.java' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/EmptyTest_EmptyFile.ok #------------------------------------------------------------------------------- # Empty Group and a Test: # allowed, exit code 0; Test results: passed: 1 # $(BUILDDIR)/EmptyTest_EmptyGroup_Test.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ > $(@:%.ok=%/jt.log) 2>&1 \ -dir:$(TESTDIR)/javatest/regtest/data/empty/ts1 \ :empty Test.java $(GREP) -s 'Test results: passed: 1' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/EmptyTest_EmptyGroup_Test.ok #------------------------------------------------------------------------------- # Empty Group and an empty folder: # not allowed, exit code 1; Test results: No tests selected # $(BUILDDIR)/EmptyTest_EmptyGroup_EmptyFolder.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ > $(@:%.ok=%/jt.log) 2>&1 \ -dir:$(TESTDIR)/javatest/regtest/data/empty/ts1 \ :empty empty ; \ rc=$$? ; if [ $$rc != 1 ]; then echo "unexpected exit code: $$rc"; exit 1; fi $(GREP) -s 'Test results: no tests selected' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/EmptyTest_EmptyGroup_EmptyFolder.ok #------------------------------------------------------------------------------- # Multiple Empty Group in same test suite: # allowed, exit code 0; Test results: No tests selected # $(BUILDDIR)/EmptyTest_MultiEmptyGroup_1.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ > $(@:%.ok=%/jt.log) 2>&1 \ -dir:$(TESTDIR)/javatest/regtest/data/empty/ts1 \ :empty :empty2 ; \ $(GREP) -s 'Test results: no tests selected' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/EmptyTest_MultiEmptyGroup_1.ok #------------------------------------------------------------------------------- # Multiple Empty Group in separate test suites: # allowed, exit code 0; Test results: No tests selected # $(BUILDDIR)/EmptyTest_MultiEmptyGroup_2.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ > $(@:%.ok=%/jt.log) 2>&1 \ $(TESTDIR)/javatest/regtest/data/empty/ts1:empty \ $(TESTDIR)/javatest/regtest/data/empty/ts2:empty $(GREP) -s 'Test results: no tests selected' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/EmptyTest_MultiEmptyGroup_2.ok jtreg-jtreg4.2-b01/make/tests/EnvTest.gmk0000644000000000000000000000712412670642364020231 0ustar rootroot00000000000000# # Copyright (c) 2012, 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. # ENV.files := $(shell find $(TESTDIR)/javatest/regtest/data/env -type f) $(BUILDDIR)/EnvTest.simple.ok: $(ENV.files) \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/lib/jh.jar \ $(JTREG_IMAGEDIR)/bin/jtreg \ display.sh $(RM) $(@:%.ok=%) $(MKDIR) $(@:%.ok=%) ( echo "testRoot=`cd $(TESTDIR)/javatest/regtest/data/env ; pwd`" ; \ echo "classRoot=`cd $(@:%.ok=%); pwd`/work/classes" ; \ echo "test.vm.opts=" ; \ echo "test.tool.vm.opts=" ; \ echo "test.compiler.opts=" ; \ echo "test.java.opts="; \ echo "test.jdk=$(JDK16HOME)"; \ echo "compile.jdk=$(JDK16HOME)" ) > $(@:%.ok=%/ref.properties) DISPLAY=`sh display.sh` export DISPLAY ; \ trap "sh `pwd`/display.sh -kill" 0 ; \ JT_JAVA=$(JDK16HOME) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ -e:refprops=`cd $(@:%.ok=%); pwd`/ref.properties \ -va \ $(TESTDIR)/javatest/regtest/data/env \ > $(@:%.ok=%/jt.log) 2>&1 || \ ( cat $(@:%.ok=%/jt.log) ; exit 1 ) echo "test passed at `date`" > $@ $(BUILDDIR)/EnvTest.full.ok: $(ENV.files) \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/lib/jh.jar \ $(JTREG_IMAGEDIR)/bin/jtreg \ display.sh $(RM) $(@:%.ok=%) $(MKDIR) $(@:%.ok=%) ( echo "testRoot=`cd $(TESTDIR)/javatest/regtest/data/env ; pwd`" ; \ echo "classRoot=`cd $(@:%.ok=%); pwd`/work/classes" ; \ echo "test.vm.opts=-DVM_OPT=vm_opt" ; \ echo "test.tool.vm.opts=-J-DVM_OPT=vm_opt" ; \ echo "test.compiler.opts=-XDJAVAC_OPT=javac_opt" ; \ echo "test.java.opts=-DJAVA_OPT=java_opt"; \ echo "test.jdk=$(JDK17HOME)"; \ echo "compile.jdk=$(JDK16HOME)" ) > $(@:%.ok=%/ref.properties) DISPLAY=`sh display.sh` export DISPLAY ; \ trap "sh `pwd`/display.sh -kill" 0 ; \ JT_JAVA=$(JDK16HOME) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -compilejdk:$(JDK16HOME) \ -testjdk:$(JDK17HOME) \ -vmoption:-DVM_OPT=vm_opt \ -javaoption:-DJAVA_OPT=java_opt \ -javacoption:-XDJAVAC_OPT=javac_opt \ -e:refprops=`cd $(@:%.ok=%); pwd`/ref.properties \ -va \ $(TESTDIR)/javatest/regtest/data/env \ > $(@:%.ok=%/jt.log) 2>&1 || \ ( cat $(@:%.ok=%/jt.log) ; exit 1 ) echo "test passed at `date`" > $@ ifneq ($(OS_NAME), windows) TESTS.jtreg += \ $(BUILDDIR)/EnvTest.simple.ok \ $(BUILDDIR)/EnvTest.full.ok endif jtreg-jtreg4.2-b01/make/tests/ExcludeTest.gmk0000644000000000000000000000403212670642364021065 0ustar rootroot00000000000000# # Copyright (c) 2012, 2015, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/exclude.othervm.ok \ $(BUILDDIR)/exclude.agentvm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jh.jar $(RM) $(@:%.ok=%/work) $(@:%.ok=%/report) $(MKDIR) -p $(@:%.ok=%) $(JDK16HOME)/bin/java \ -Djavatest.regtest.showCmd=true \ -Djavatest.regtest.debugChild=true \ -Djavatest.regtest.traceAgent=true \ -jar $(ABS_JTREG_IMAGEJARDIR)/jtreg.jar \ -w:$(@:%.ok=%/work) \ -r:$(@:%.ok=%/report) \ $(@:$(BUILDDIR)/exclude.%.ok=-%) \ -exclude:$(TESTDIR)/javatest/regtest/exclude/ProblemList.txt \ $(TESTDIR)/javatest/regtest/exclude \ > $(@:%.ok=%/log 2>&1) \ || (cat $(@:%.ok=%/log) ; exit 1) echo $@ passed at `date` > $@ TESTS.jtreg += \ $(BUILDDIR)/exclude.othervm.ok \ $(BUILDDIR)/exclude.agentvm.ok jtreg-jtreg4.2-b01/make/tests/ExclusiveAccessTest.gmk0000644000000000000000000000505012670642364022566 0ustar rootroot00000000000000# # Copyright (c) 2011, 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. # $(BUILDDIR)/ExclusiveAccessTest.ref: ( for t in 1 2 3 4 ; do for i in 1 2 3 4 5 ; do echo "Test: $$i" ; done ; done ) > $@ $(BUILDDIR)/ExclusiveAccessTest.single.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg \ $(BUILDDIR)/ExclusiveAccessTest.ref $(RM) $(@:%.ok=%) && $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -conc:4 \ $(TESTDIR)/javatest/regtest/data/exclusive \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: passed: 4' $(@:%.ok=%/jt.log) > /dev/null $(DIFF) $(BUILDDIR)/ExclusiveAccessTest.ref $(@:%.ok=%)/Test.log echo "test passed at `date`" > $@ $(BUILDDIR)/ExclusiveAccessTest.multi.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg \ $(BUILDDIR)/ExclusiveAccessTest.ref $(RM) $(@:%.ok=%) && $(MKDIR) $(@:%.ok=%) for i in 1 2 3 4 ; do \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work.$$i -r:$(@:%.ok=%)/report.$$i \ -jdk:$(J2SEHOME) \ -lock:$(@:%.ok=%)/Test.lck \ $(TESTDIR)/javatest/regtest/data/exclusive/dir/Test$$i.sh \ > $(@:%.ok=%/jt.$$i.log) 2>&1 & \ done ; wait $(DIFF) $(BUILDDIR)/ExclusiveAccessTest.ref $(@:%.ok=%)/Test.log echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/ExclusiveAccessTest.single.ok jtreg-jtreg4.2-b01/make/tests/ExitCodeTest.gmk0000644000000000000000000001031012670642364021174 0ustar rootroot00000000000000# # Copyright (c) 2012, 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. # $(BUILDDIR)/ExitCodeTest.OK.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(TESTDIR)/javatest/regtest/data/exitCodes/Pass.java \ > $(@:%.ok=%/jt.log) 2>&1 ; rc=$$? ; \ if [ "$$rc" != 0 ]; then echo "unexpected exit code: " $$rc ; exit 1 ; fi echo "test passed at `date`" > $@ $(BUILDDIR)/ExitCodeTest.NoTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -bug:notFound \ $(TESTDIR)/javatest/regtest/data/exitCodes/Pass.java \ > $(@:%.ok=%/jt.log) 2>&1 ; rc=$$? ; \ if [ "$$rc" != 1 ]; then echo "unexpected exit code: " $$rc ; exit 1 ; fi echo "test passed at `date`" > $@ $(BUILDDIR)/ExitCodeTest.Fail.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(TESTDIR)/javatest/regtest/data/exitCodes/Fail.java \ > $(@:%.ok=%/jt.log) 2>&1 ; rc=$$? ; \ if [ "$$rc" != 2 ]; then echo "unexpected exit code: " $$rc ; exit 1 ; fi echo "test passed at `date`" > $@ $(BUILDDIR)/ExitCodeTest.Error.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(TESTDIR)/javatest/regtest/data/exitCodes/Error.java \ > $(@:%.ok=%/jt.log) 2>&1 ; rc=$$? ; \ if [ "$$rc" != 3 ]; then echo "unexpected exit code: " $$rc ; exit 1 ; fi echo "test passed at `date`" > $@ $(BUILDDIR)/ExitCodeTest.BadArgs.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -splodge \ $(TESTDIR)/javatest/regtest/data/exitCodes/Pass.java \ > $(@:%.ok=%/jt.log) 2>&1 ; rc=$$? ; \ if [ "$$rc" != 4 ]; then echo "unexpected exit code: " $$rc ; exit 1 ; fi echo "test passed at `date`" > $@ $(BUILDDIR)/ExitCodeTest.Fault.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(TESTDIR)/javatest/regtest/data/exitCodes/FileNotFound.java \ > $(@:%.ok=%/jt.log) 2>&1 ; rc=$$? ; \ if [ "$$rc" != 5 ]; then echo "unexpected exit code: " $$rc ; exit 1 ; fi echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/ExitCodeTest.OK.ok \ $(BUILDDIR)/ExitCodeTest.NoTest.ok \ $(BUILDDIR)/ExitCodeTest.Fail.ok \ $(BUILDDIR)/ExitCodeTest.Error.ok \ $(BUILDDIR)/ExitCodeTest.BadArgs.ok \ $(BUILDDIR)/ExitCodeTest.Fault.ok jtreg-jtreg4.2-b01/make/tests/ExtLibTest.gmk0000644000000000000000000000311012670642364020657 0ustar rootroot00000000000000# # Copyright (c) 2015, 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. # $(BUILDDIR)/ExtLibTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ -va \ $(TESTDIR)/javatest/regtest/data/extlib/test \ > $(@:%.ok=%/jt.log) 2>&1 echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/ExtLibTest.ok jtreg-jtreg4.2-b01/make/tests/ExtraPropDefnsTest.gmk0000644000000000000000000000744712670642364022415 0ustar rootroot00000000000000# # Copyright (c) 2015, 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. # #------------------------------------------------------------------------------- # $(BUILDDIR)/ExtraPropDefnsTest.valid.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ $(TESTDIR)/javatest/regtest/data/extra-props/valid \ > $(@:%.ok=%/jt.log) 2>&1 $(GREP) -s 'Test results: passed: 2' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/ExtraPropDefnsTest.valid.ok #------------------------------------------------------------------------------- # $(BUILDDIR)/ExtraPropDefnsTest.valid.libs.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ $(TESTDIR)/javatest/regtest/data/extra-props/valid.libs \ > $(@:%.ok=%/jt.log) 2>&1 $(GREP) -s 'Test results: passed: 1' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/ExtraPropDefnsTest.valid.libs.ok #------------------------------------------------------------------------------- # $(BUILDDIR)/ExtraPropDefnsTest.bad-compile.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ $(TESTDIR)/javatest/regtest/data/extra-props/bad-compile \ > $(@:%.ok=%/jt.log) 2>&1 ; rc=$$? ; \ if [ "$$rc" != 5 ]; then echo "unexpected exit code: " $$rc ; exit 1 ; fi $(GREP) -s 'Compilation of extra property definition files failed' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/ExtraPropDefnsTest.bad-compile.ok #------------------------------------------------------------------------------- # $(BUILDDIR)/ExtraPropDefnsTest.bad-execute.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ $(TESTDIR)/javatest/regtest/data/extra-props/bad-execute \ > $(@:%.ok=%/jt.log) 2>&1; rc=$$? ; \ if [ "$$rc" != 5 ]; then echo "unexpected exit code: " $$rc ; exit 1 ; fi $(GREP) -s 'Error: failed to get JDK properties' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/ExtraPropDefnsTest.bad-execute.ok jtreg-jtreg4.2-b01/make/tests/GroupTest.gmk0000644000000000000000000000551312670642364020575 0ustar rootroot00000000000000# # Copyright (c) 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. # #---------------------------------------------------------------------- GroupTest.GROUPS := $(shell $(GREP) -h '=' \ $(TESTDIR)/javatest/regtest/data/groups/TEST.group* | \ $(AWK) '{print $$1}' | $(SORT) -unk 1.2 ) $(BUILDDIR)/GroupTest.ok: $(GroupTest.GROUPS:%=$(BUILDDIR)/GroupTest.%.ok) echo $@ passed at `date` > $@ $(GroupTest.GROUPS:%=$(BUILDDIR)/GroupTest.%.ok): \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(MKDIR) -p $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(TESTDIR)/javatest/regtest/data/groups:$(@:$(BUILDDIR)/GroupTest.%.ok=%) ; \ status=$$? ; echo status=$$status ; \ case "$(@:$(BUILDDIR)/GroupTest.%.ok=%)" in \ g6 ) expect=1 ;; \ g10 ) expect=5 ;; \ * ) expect=0 ;; \ esac ; \ if [ "$$status" != "$$expect" ]; then echo "unexpected exit: $$status" ; exit 1; fi echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/GroupTest.ok $(BUILDDIR)/ShowGroupTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(MKDIR) -p $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -showGroups \ $(TESTDIR)/javatest/regtest/data/groups \ > $(@:%.ok=%)/jt.log 2>&1 $(GREP) '^g3[0-9]' $(@:%.ok=%)/jt.log > $(@:%.ok=%)/g3.found $(GREP) '^# g3[0-9]*' $(TESTDIR)/javatest/regtest/data/groups/TEST.groups3 \ | $(SED) -e 's/# //' > $(@:%.ok=%)/g3.expect $(DIFF) $(@:%.ok=%)/g3.expect $(@:%.ok=%)/g3.found echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/ShowGroupTest.ok jtreg-jtreg4.2-b01/make/tests/IgnoreSymbolFileTest.gmk0000644000000000000000000000402412670642364022706 0ustar rootroot00000000000000# # Copyright (c) 2012, 2015, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/ignoresymbolfile.othervm.ok \ $(BUILDDIR)/ignoresymbolfile.agentvm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jh.jar $(RM) $(@:%.ok=%/work) $(@:%.ok=%/report) $(MKDIR) -p $(@:%.ok=%) $(JDK17HOME)/bin/java \ -Djavatest.regtest.showCmd=true \ -Djavatest.regtest.debugChild=true \ -Djavatest.regtest.traceAgent=true \ -jar $(ABS_JTREG_IMAGEJARDIR)/jtreg.jar \ -w:$(@:%.ok=%/work) \ -r:$(@:%.ok=%/report) \ $(@:$(BUILDDIR)/ignoresymbolfile.%.ok=-%) \ $(TESTDIR)/javatest/regtest/data/ignoresymbolfile \ > $(@:%.ok=%/log 2>&1) \ || (cat $(@:%.ok=%/log) ; exit 1) echo $@ passed at `date` > $@ TESTS.jtreg += \ $(BUILDDIR)/ignoresymbolfile.othervm.ok \ $(BUILDDIR)/ignoresymbolfile.agentvm.ok jtreg-jtreg4.2-b01/make/tests/IgnoreTagTest.gmk0000644000000000000000000000555312670642364021364 0ustar rootroot00000000000000# # Copyright (c) 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. # #---------------------------------------------------------------------- $(BUILDDIR)/IgnoreTagTest.default.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(MKDIR) -p $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(TESTDIR)/javatest/regtest/data/ignoreTag \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: passed: 1; error: 4' $(@:%.ok=%/jt.log) > /dev/null echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/IgnoreTagTest.default.ok $(BUILDDIR)/IgnoreTagTest.run.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(MKDIR) -p $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -ignore:run \ -jdk:$(J2SEHOME) \ $(TESTDIR)/javatest/regtest/data/ignoreTag \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: passed: 5' $(@:%.ok=%/jt.log) > /dev/null echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/IgnoreTagTest.run.ok $(BUILDDIR)/IgnoreTagTest.quiet.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(MKDIR) -p $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -ignore:quiet \ -jdk:$(J2SEHOME) \ $(TESTDIR)/javatest/regtest/data/ignoreTag \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: passed: 1' $(@:%.ok=%/jt.log) > /dev/null echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/IgnoreTagTest.quiet.ok jtreg-jtreg4.2-b01/make/tests/JDK11Test.gmk0000644000000000000000000000443412670642364020254 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- # Test compilation and execution using JDK 1.1 # Only othervm supported -- jtreg can't run agentvm on 1.1 $(BUILDDIR)/JDK11Test.1.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) JTREG_SHOWAGENT=true JTREG_SHOWCMD=true \ JT_JAVA=$(JDK16HOME) \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK11HOME) \ $(TESTDIR)/javatest/regtest/data/jdk11/ExecuteTest.java echo "test passed at `date`" > $@ # Test split compilation using JDK 1.1 $(BUILDDIR)/JDK11Test.2.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) JTREG_SHOWAGENT=true JTREG_SHOWCMD=true \ JT_JAVA=$(JDK16HOME) \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -compilejdk:$(JDK11HOME) \ -jdk:$(JDK16HOME) \ $(TESTDIR)/javatest/regtest/data/jdk11/ExecuteTest.java echo "test passed at `date`" > $@ ifneq ($(JDK11HOME),) TESTS.jtreg += \ $(BUILDDIR)/JDK11Test.1.ok \ $(BUILDDIR)/JDK11Test.2.ok endif jtreg-jtreg4.2-b01/make/tests/JDKOptsTest.gmk0000644000000000000000000000342512670642364020757 0ustar rootroot00000000000000# # Copyright (c) 1997, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/JDKOptsTest.ok: \ $(TESTDIR)/javatest/regtest/JDKOptsTest.java \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(MKDIR) -p $(@:%.ok=%)/classes $(J2SEJAVAC) -cp $(JTREG_IMAGEDIR)/lib/jtreg.jar -source $(J2SEJAVAC_SOURCE) -target $(J2SEJAVAC_TARGET) \ -encoding ISO8859-1 -d $(@:%.ok=%)/classes $(TESTDIR)/javatest/regtest/JDKOptsTest.java $(J2SEJAVA) -cp "$(@:%.ok=%)/classes$(PS)$(JTREG_IMAGEDIR)/lib/jtreg.jar" JDKOptsTest echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/JDKOptsTest.ok jtreg-jtreg4.2-b01/make/tests/JavacExitCodeTests.gmk0000644000000000000000000000470012670642364022332 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/javacExitCodes.jdk5.othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK15HOME) \ -othervm \ $(TESTDIR)/javatest/regtest/testJavacExitCodes/ \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: passed: 4; failed: 4' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ $(BUILDDIR)/javacExitCodes.jdk6.othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ -othervm \ $(TESTDIR)/javatest/regtest/testJavacExitCodes/ \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: passed: 2; failed: 2; error: 4' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/javacExitCodes.jdk5.othervm.ok \ $(BUILDDIR)/javacExitCodes.jdk6.othervm.ok jtreg-jtreg4.2-b01/make/tests/JavacTests.gmk0000644000000000000000000000347212670642364020712 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- # # Verify javac etc available on path for @run main in all modes. $(BUILDDIR)/javac/othervm.ok \ $(BUILDDIR)/javac/agentvm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg JTREG_SHOWAGENT=true JTREG_SHOWCMD=true \ JTREG_USE_AGENTVM_FOR_SAMEVM=false \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ $(@:$(BUILDDIR)/javac/%.ok=-%) \ $(TESTDIR)/javatest/regtest/data/javac echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/javac/othervm.ok \ $(BUILDDIR)/javac/agentvm.ok jtreg-jtreg4.2-b01/make/tests/LibDirsTest.gmk0000644000000000000000000000424712670642364021034 0ustar rootroot00000000000000# # Copyright (c) 2012, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/LibDirsTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jh.jar $(RM) $(@:%.ok=%/work) $(@:%.ok=%/report) $(MKDIR) -p $(@:%.ok=%) $(JDK16HOME)/bin/java \ -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -w:$(@:%.ok=%/work) \ -r:$(@:%.ok=%/report) \ $(TESTDIR)/javatest/regtest/data/libdirs \ > $(@:%.ok=%/log 2>&1) \ || (cat $(@:%.ok=%/log) ; exit 1) ( cd $(@:%.ok=%/work)/classes ; find . -name \*.class ) \ | $(SED) -e 's|^./||' > $(@:%.ok=%/classes) c=`cat $(@:%.ok=%/classes) | \ $(GREP) -v l1/L1.class | \ $(GREP) -v l2/L2.class | \ $(GREP) -v t1/l3/L3.class | \ $(GREP) -v l4/L4.class | \ $(GREP) -v t1/l5/L5.class | \ $(GREP) -v l6/L6.class | \ $(GREP) -v t1/t2/LibTest.class ` ; \ if [ -n "$$c" ]; then echo "unexpected classes found" ; exit 1 ; fi echo $@ passed at `date` > $@ TESTS.jtreg += \ $(BUILDDIR)/LibDirsTest.ok jtreg-jtreg4.2-b01/make/tests/LinkLint.gmk0000644000000000000000000000316212670642364020363 0ustar rootroot00000000000000# # Copyright (c) 1997, 2011, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/linklint.ok: $(JTREG_ZIP) ifneq ($(LINKLINT), ) $(LINKLINT) -htmlonly -quiet \ -ignore /doc/jcov/report \ -doc $(BUILDDIR)/linklint \ -root $(JTREG_IMAGEDIR) /doc/jtreg/faq.html echo checked at `date` > $@ else echo files not checked at `date`: LINKLINT not set > $@ endif linklint: $(BUILDDIR)/linklint.ok FINAL_TESTS += $(BUILDDIR)/linklint.ok .PHONY: linklint jtreg-jtreg4.2-b01/make/tests/LockCheck.gmk0000644000000000000000000000343312670642364020466 0ustar rootroot00000000000000# # Copyright (c) 1997, 2011, 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. # #--------------------------------------------------------------------- # # check for leftover TestResultCache lock files. # leftover files may indicate a bug in the cache or its robustness $(BUILDDIR)/lockCheck.ok: @ ( \ lckfiles=`$(FIND) $(TOPDIR)/build -name ResultCache.jtw.lck -print` ; \ if [ ! -z "$$lckfiles" ] ; then \ echo "JavaTest cache lock files remain, please investigate and fix:" ; \ $(FIND) $(TOPDIR)/build -name \*.jtw.lck -ls ; \ exit 1 ; \ else \ echo "No leftover JavaTest cache lock files found." ; \ fi \ ) echo $@ passed at `date` > $@ FINAL_TESTS += $(BUILDDIR)/lockCheck.ok jtreg-jtreg4.2-b01/make/tests/ModLibsTest.gmk0000644000000000000000000000367512670642364021041 0ustar rootroot00000000000000# # Copyright (c) 2015, 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. # MODLIBS_TEST_FILES := \ $(shell $(FIND) $(TESTDIR)/javatest/regtest/data/modlibs -type f ) $(BUILDDIR)/ModLibsTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg \ $(MODLIBS_TEST_FILES) $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -J-Djavatest.regtest.allowTrailingBuild=true \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JIGSAWHOME) \ -othervm \ $(TESTDIR)/javatest/regtest/data/modlibs ( cd $(@:%.ok=%)/work ; $(FIND) . -name \*.class ) | \ $(SORT) > $(@:%.ok=%)/found-classes.txt $(DIFF) $(TESTDIR)/javatest/regtest/data/modlibs/expect-classes.txt \ $(@:%.ok=%)/found-classes.txt echo "test passed at `date`" > $@ ifdef JIGSAWHOME TESTS.jtreg += \ $(BUILDDIR)/ModLibsTest.ok endif jtreg-jtreg4.2-b01/make/tests/ModulesTest.gmk0000644000000000000000000000462012670642364021107 0ustar rootroot00000000000000# # Copyright (c) 2015, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/ModulesTest_NoLimitMods.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(MKDIR) -p $(@:%.ok=%)/classes $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JIGSAWHOME) \ $(TESTDIR)/javatest/regtest/data/modules \ > $(@:%.ok=%/jt.log) 2>&1 $(GREP) -s '^Test results: passed: 4$$' $(@:%.ok=%/jt.log) > /dev/null echo $@ passed at `date` > $@ $(BUILDDIR)/ModulesTest_LimitMods_java.base.ok \ $(BUILDDIR)/ModulesTest_LimitMods_java.se.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(MKDIR) -p $(@:%.ok=%)/classes $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JIGSAWHOME) \ -javaoptions:"-limitmods $(@:$(BUILDDIR)/ModulesTest_LimitMods_%.ok=%)" \ $(TESTDIR)/javatest/regtest/data/modules \ > $(@:%.ok=%/jt.log) 2>&1 $(GREP) -s '^Test results: passed: 2$$' $(@:%.ok=%/jt.log) > /dev/null echo $@ passed at `date` > $@ ifdef JIGSAWHOME TESTS.jtreg += \ $(BUILDDIR)/ModulesTest_NoLimitMods.ok \ $(BUILDDIR)/ModulesTest_LimitMods_java.base.ok \ $(BUILDDIR)/ModulesTest_LimitMods_java.se.ok \ endif #JIGSAW_HOME jtreg-jtreg4.2-b01/make/tests/MultiRunTest.gmk0000644000000000000000000000540212670642364021255 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/multirun.ok: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jh.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -agentvm \ $(TESTDIR)/javatest/regtest/data/multirun/a/test/p/Test.java/ \ $(TESTDIR)/javatest/regtest/data/multirun/b1/b/test/q/Test.java/ \ > $(@:%.ok=%/jt.a_b1.log) 2>&1 $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -agentvm \ $(TESTDIR)/javatest/regtest/data/multirun/a/test/p/Test.java/ \ $(TESTDIR)/javatest/regtest/data/multirun/b2/b/test/r/Test.java/ \ > $(@:%.ok=%/jt.a_b2.log) 2>&1 $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -agentvm \ $(TESTDIR)/javatest/regtest/data/multirun/b1/b/test/q/Test.java/ \ $(TESTDIR)/javatest/regtest/data/multirun/b2/b/test/r/Test.java/ \ > $(@:%.ok=%/jt.b1_b2.log) 2>&1 $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -agentvm \ $(TESTDIR)/javatest/regtest/data/multirun/a/test/p/Test.java/ \ $(TESTDIR)/javatest/regtest/data/multirun/b1/b/test/q/Test.java/ \ $(TESTDIR)/javatest/regtest/data/multirun/b2/b/test/r/Test.java/ \ > $(@:%.ok=%/jt.a_b1_b2.log) 2>&1 echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/multirun.ok jtreg-jtreg4.2-b01/make/tests/NoJUnit.gmk0000644000000000000000000000373512670642364020173 0ustar rootroot00000000000000# # Copyright (c) 1997, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/no-junit.ok: $(IMAGES_DIR)/open-jtreg.zip $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(UNZIP) -d $(@:%.ok=%) $(IMAGES_DIR)/open-jtreg.zip JT_JAVA=$(JDK16HOME) $(@:%.ok=%)/jtreg/bin/jtreg \ -w $(@:%.ok=%)/JTwork \ -r $(@:%.ok=%)/JTreport \ $(TESTDIR)/javatest/regtest/data/basic/junit \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: error: 29' $(@:%.ok=%/jt.log) > /dev/null if [ -n "`cat $(@:%.ok=%)/JTreport/text/summary.txt | \ $(GREP) -v -E '(Not run|Error. Parse Exception|Error. JUnit not available)'`" ]; then \ echo "Unexpected test results" ; exit 1 ; \ fi echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/no-junit.ok jtreg-jtreg4.2-b01/make/tests/NormalizeStatusTest.gmk0000644000000000000000000000410412670642364022640 0ustar rootroot00000000000000# # Copyright (c) 1997, 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. # #---------------------------------------------------------------------- # 7900029: newline in exception message will corrupt jtreg summary.txt output $(BUILDDIR)/NormalizeStatusTest.ok: $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(TESTDIR)/javatest/regtest/data/normalizeStatus/Test.java \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) $(MKDIR) $(@:%.ok=%) JTHOME=$(JTREG_IMAGEDIR) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -va -jdk:$(J2SEHOME) \ $(TESTDIR)/javatest/regtest/data/normalizeStatus/Test.java \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) "Test.java Failed. Execution failed: \`main' threw exception: java.lang.Error: abc def ghi" \ < $(@:%.ok=%)/report/text/summary.txt echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/NormalizeStatusTest.ok jtreg-jtreg4.2-b01/make/tests/OSTest.gmk0000644000000000000000000000337412670642364020025 0ustar rootroot00000000000000# # Copyright (c) 1997, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/OSTest.ok: \ $(TESTDIR)/javatest/regtest/OSTest.java \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(MKDIR) -p $(@:%.ok=%)/classes $(J2SEJAVAC) -cp $(JTREG_IMAGEDIR)/lib/jtreg.jar -source $(J2SEJAVAC_SOURCE) -target $(J2SEJAVAC_TARGET) \ -encoding ISO8859-1 -d $(@:%.ok=%)/classes $(TESTDIR)/javatest/regtest/OSTest.java $(J2SEJAVA) -cp "$(@:%.ok=%)/classes$(PS)$(JTREG_IMAGEDIR)/lib/jtreg.jar" OSTest echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/OSTest.ok jtreg-jtreg4.2-b01/make/tests/OpenFileTests.gmk0000644000000000000000000000735212670642364021370 0ustar rootroot00000000000000# # Copyright (c) 2011, 2015, 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. # # These tests run a set of 5 tests two of which create an open file # that will cause problems for jtreg cleaning up after a test. # # However, they are primarily designed for a Windows environment # where open files can be a problem during file cleanup before/after # a test. On a non-Windows environment (i.e. Linux, Solaris) all # the tests in the openfiles test suite pass. # But, for now, these makefiles are not set up to run on Windows. # When the makefiles are upgraded to run on Windows, the rules in this # makefile will have to be updated (perhaps by using target-specific # variable definitions) to behave correctly on Windows as well as # non-Windows platforms. ##### # In agentvm and othervm mode, jtreg should successfully run each test # by moving to a new scratch directory when it can't clear the previous one. $(BUILDDIR)/OpenFileTests.agentvm.ok \ $(BUILDDIR)/OpenFileTests.othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg if [ -d $(@:%.ok=%) ]; then $(CHMOD) -R +w $(@:%.ok=%) && $(RM) $(@:%.ok=%) ; fi $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK17HOME) \ $(@:$(BUILDDIR)/OpenFileTests.%.ok=-%) \ $(TESTDIR)/javatest/regtest/data/openfiles \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: passed: 5' $(@:%.ok=%/jt.log) > /dev/null $(CHMOD) -R +w $(@:%.ok=%) echo "test passed at `date`" > $@ ##### # In agent mode with -retain, the tests all return error # because the selected files cannot be retained $(BUILDDIR)/OpenFileTests.agentvm.retain.ok \ $(BUILDDIR)/OpenFileTests.othervm.retain.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg if [ -d $(@:%.ok=%) ]; then $(CHMOD) -R +w $(@:%.ok=%) && $(RM) $(@:%.ok=%) ; fi $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK17HOME) \ $(@:$(BUILDDIR)/OpenFileTests.%.retain.ok=-%) \ -retain:none \ $(TESTDIR)/javatest/regtest/data/openfiles \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: passed: 5' $(@:%.ok=%/jt.log) > /dev/null $(CHMOD) -R +w $(@:%.ok=%) echo "test passed at `date`" > $@ ifneq ($(OS_NAME), windows) # TEMP TESTS.jtreg += \ $(BUILDDIR)/OpenFileTests.agentvm.ok \ $(BUILDDIR)/OpenFileTests.agentvm.retain.ok \ $(BUILDDIR)/OpenFileTests.othervm.ok \ $(BUILDDIR)/OpenFileTests.othervm.retain.ok \ $(BUILDDIR)/OpenFileTests.othervm.retain.ok endif jtreg-jtreg4.2-b01/make/tests/PkgInfoTest.gmk0000644000000000000000000000315012670642364021031 0ustar rootroot00000000000000# # Copyright (c) 2012, 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. # # Check that package-info is accepted in a build list $(BUILDDIR)/PkgInfoTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(TESTDIR)/javatest/regtest/data/pkgInfo \ > $(@:%.ok=%/jt.log) echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/PkgInfoTest.ok jtreg-jtreg4.2-b01/make/tests/ProblemList.gmk0000644000000000000000000000565012670642364021077 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- # jdk/test/Makefile uses the following platform keys in ProblemList.txt # $(OS_NAME)-all # $(PLATFORM_OS) # $(OS_NAME)-$(OS_ARCH2) # $(OS_NAME)-$(OS_VERSION) # generic-$(OS_ARCH) # generic-$(OS_ARCH2) # generic-all # Create a version of ProblemList.txt to test by editing those values # into a template. $(BUILDDIR)/ProblemList.ok: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jh.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(MKDIR) $(@:%.ok=%)/1 $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/1/work -r:$(@:%.ok=%)/1/report \ -jdk:$(JDK16HOME) \ -agentvm \ $(TESTDIR)/javatest/regtest/data/problemList/ \ > $(@:%.ok=%/1/jt.log) 2>&1 $(GREP) -s 'Test results: passed: 6' $(@:%.ok=%/1/jt.log) > /dev/null $(MKDIR) $(@:%.ok=%)/2 @echo OS_ARCH $(OS_ARCH) @echo OS_ARCH2 $(OS_ARCH2) @echo OS_NAME $(OS_NAME) @echo OS_VERSION $(OS_VERSION) @echo PLATFORM_OS $(PLATFORM_OS) cat $(TESTDIR)/javatest/regtest/data/problemList/ProblemList.template | sed \ -e 's/OSNAME-\([A-Za-z]*\)$$/$(OS_NAME)-\1/' \ -e 's/\([A-Za-z]*\)-ARCH2$$/\1-$(OS_ARCH2)/' \ -e 's/\([A-Za-z]*\)-ARCH$$/\1-$(OS_ARCH)/' \ -e 's/\([A-Za-z]*\)-REV$$/\1-$(OS_VERSION)/' \ > $(@:%.ok=%)/2/ProblemList.txt $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/2/work -r:$(@:%.ok=%)/2/report \ -jdk:$(JDK16HOME) \ -agentvm \ -exclude:$(@:%.ok=%)/2/ProblemList.txt \ $(TESTDIR)/javatest/regtest/data/problemList/ \ > $(@:%.ok=%/2/jt.log) 2>&1 $(GREP) -s 'Test results: passed: 1' $(@:%.ok=%/2/jt.log) > /dev/null echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/ProblemList.ok jtreg-jtreg4.2-b01/make/tests/PropertyTests.gmk0000644000000000000000000000367012670642364021512 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/PropertyTest_agentvm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -agentvm \ $(TESTDIR)/javatest/regtest/data/Properties echo "test passed at `date`" > $@ $(BUILDDIR)/PropertyTest_othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -othervm \ $(TESTDIR)/javatest/regtest/data/Properties echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/PropertyTest_agentvm.ok \ $(BUILDDIR)/PropertyTest_othervm.ok jtreg-jtreg4.2-b01/make/tests/ReportOnlyTest.gmk0000644000000000000000000000374112670642364021617 0ustar rootroot00000000000000# # Copyright (c) 1997, 2014, 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. # #---------------------------------------------------------------------- # for full JavaTest gui, add "-gui" to jtreg call $(BUILDDIR)/ReportOnlyTest.ok: $(BUILDDIR)/Basic.othervm.ok \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg JAVA_HOME=$(J2SEHOME) CLASSPATH=$(ABSCLASSDIR) \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -reportOnly -automatic -v \ -workDir:$(BUILDDIR)/Basic.othervm/work \ -reportDir:$(BUILDDIR)/$(@:%.ok=%) \ $(TESTDIR)/javatest/regtest/data/basic \ > $(@:%.ok=%.jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Test results: passed: 92; failed: 44; error: 87' $(@:%.ok=%.jt.log) > /dev/null echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/ReportOnlyTest.ok jtreg-jtreg4.2-b01/make/tests/RequiresTest.gmk0000644000000000000000000000400612670642364021274 0ustar rootroot00000000000000# # Copyright (c) 1997, 2014, 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. # $(BUILDDIR)/RequiresTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ -va \ $(TESTDIR)/javatest/regtest/data/requires \ > $(@:%.ok=%/jt.log) 2>&1 || true $(GREP) -s "Test results: passed: 3; error: 4" $(@:%.ok=%/jt.log) > /dev/null $(GREP) -s "No expression for @requires" $(@:%.ok=%)/report/text/summary.txt > /dev/null $(GREP) -s "invalid numeric value: one" $(@:%.ok=%)/report/text/summary.txt > /dev/null $(GREP) -s "Syntax error in @requires expression" $(@:%.ok=%)/report/text/summary.txt > /dev/null $(GREP) -s "invalid name" $(@:%.ok=%)/report/text/summary.txt > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/RequiresTest.ok jtreg-jtreg4.2-b01/make/tests/RerunTest.gmk0000644000000000000000000000607712670642364020602 0ustar rootroot00000000000000# # Copyright (c) 2013, 2015, 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. # $(BUILDDIR)/RerunTest.agentvm.ok \ $(BUILDDIR)/RerunTest.othervm.ok: JAVAOPTION =-javaoption:-Dmy.java.option=x $(BUILDDIR)/RerunTest.agentvm.ok \ $(BUILDDIR)/RerunTest.othervm.ok: JAVACOPTION=-javacoption:-XDmy.javac.option=x $(BUILDDIR)/RerunTest.agentvm.ok \ $(BUILDDIR)/RerunTest.othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg \ display.sh $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) DISPLAY=`sh display.sh` export DISPLAY ; \ trap "sh `pwd`/display.sh -kill" 0 ; \ unset GNOME_DESKTOP_SESSION_ID ; \ unset XMODIFIERS ; \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -J-Djavatest.regtest.allowTrailingBuild=true \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ -verbose:summary \ -e:MY_ENV_VAR=x -vmoption:-Dmy.vm.option=x $(JAVAOPTION) $(JAVACOPTION) \ -ignore:run \ $(@:$(BUILDDIR)/RerunTest.%.ok=-%) \ $(TESTDIR)/javatest/regtest/data/rerun \ > $(@:%.ok=%/jt.log) 2>&1 $(GREP) -s 'Test results: passed: 10' $(@:%.ok=%/jt.log) > /dev/null for i in `cd $(TESTDIR)/javatest/regtest/data/rerun ; ls */*.sh */*.java` ; do \ echo Checking $(@:$(BUILDDIR)/RerunTest.%.ok=%) $$i ; \ mkdir -p `dirname $(@:%.ok=%)/out/$$i` ; \ $(JTREG_IMAGEDIR)/bin/jtreg \ -jdk:$(J2SEHOME) \ -w:$(@:%.ok=%)/work \ -dir:$(TESTDIR)/javatest/regtest/data/rerun \ -show:rerun $$i | \ sed -e 's|^HOME=.*|HOME=%HOME%|' \ -e 's|^DISPLAY=.*|DISPLAY=%DISPLAY%|' \ -e 's|$(JDK16HOME)|%JDKHOME%|g' \ -e "s|`cd $(JDK16HOME); pwd -P`|%JDKHOME%|g" \ -e 's|$(ABSTOPDIR)|%WS%|g' \ > $(@:%.ok=%)/out/$${i%.*}.out ; \ diff $(TESTDIR)/javatest/regtest/data/rerun/$${i%.*}.$(@:$(BUILDDIR)/RerunTest.%.ok=%).out \ $(@:%.ok=%)/out/$${i%.*}.out || exit 1 ; \ done echo "test passed at `date`" > $@ ifneq ($(OS_NAME), windows) TESTS.jtreg += \ $(BUILDDIR)/RerunTest.agentvm.ok \ $(BUILDDIR)/RerunTest.othervm.ok endif jtreg-jtreg4.2-b01/make/tests/RerunTest2.gmk0000644000000000000000000000323512670642364020655 0ustar rootroot00000000000000# # Copyright (c) 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. # $(BUILDDIR)/RerunTest2.ok: \ $(TESTDIR)/javatest/regtest/RerunTest2.java \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(MKDIR) $(@:%.ok=%)/classes $(J2SEJAVAC) \ -d $(@:%.ok=%)/classes \ -cp $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(TESTDIR)/javatest/regtest/RerunTest2.java cd $(@:%.ok=%) && $(J2SEJAVA) \ -classpath classes$(PS)../$(JTREG_IMAGEDIR)/lib/jtreg.jar \ RerunTest2 \ ../$(TESTDIR)/javatest/regtest/data/rerun2 jtreg-jtreg4.2-b01/make/tests/SecurityManagerTests.gmk0000644000000000000000000000641212670642364022765 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/GoodSecurityManagerTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -agentvm -allowSetSecurityManager \ $(TESTDIR)/javatest/regtest/data/SecurityManager/pass echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/GoodSecurityManagerTest.ok #---------------------------------------------------------------------- $(BUILDDIR)/BadSecurityManagerTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(MKDIR) -p $(@:%.ok=%)/ - $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -agentvm -allowSetSecurityManager \ $(TESTDIR)/javatest/regtest/data/SecurityManager/error \ 2>&1 | tee $(@:%.ok=%)/out.txt grep "Cannot reset security manager" $(@:%.ok=%)/out.txt echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/BadSecurityManagerTest.ok #---------------------------------------------------------------------- $(BUILDDIR)/SecurityManagerTest_agentvm_forbid.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(MKDIR) -p $(@:%.ok=%)/ - $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -agentvm -allowSetSecurityManager:no \ $(TESTDIR)/javatest/regtest/data/SecurityManager \ 2>&1 | tee $(@:%.ok=%)/out.txt grep "Test results: failed: 5" $(@:%.ok=%)/out.txt echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/SecurityManagerTest_agentvm_forbid.ok #---------------------------------------------------------------------- $(BUILDDIR)/SecurityManagerTest_othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -othervm \ $(TESTDIR)/javatest/regtest/data/SecurityManager echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/SecurityManagerTest_othervm.ok jtreg-jtreg4.2-b01/make/tests/SecurityProviderTest.gmk0000644000000000000000000000334112670642364023020 0ustar rootroot00000000000000# # Copyright (c) 2013, 2015, 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. # $(BUILDDIR)/SecProvTests.agentvm.ok \ $(BUILDDIR)/SecProvTests.othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg if [ -d $(@:%.ok=%) ]; then $(RM) $(@:%.ok=%) ; fi $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(@:$(BUILDDIR)/SecProvTests.%.ok=-%) \ $(TESTDIR)/javatest/regtest/data/secprov \ > $(@:%.ok=%/jt.log) 2>&1 echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/SecProvTests.agentvm.ok \ $(BUILDDIR)/SecProvTests.othervm.ok jtreg-jtreg4.2-b01/make/tests/StatsTests.gmk0000644000000000000000000000700112670642364020754 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/StatsTest.ok: $(TESTDIR)/javatest/regtest/StatsTest.java \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(MKDIR) $(@:%.ok=%)/classes $(J2SEJAVAC) -d $(@:%.ok=%)/classes -cp $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(TESTDIR)/javatest/regtest/StatsTest.java $(J2SEJAVA) -cp $(@:%.ok=%)/classes:$(JTREG_IMAGEDIR)/lib/jtreg.jar \ com.sun.javatest.regtest.StatsTest echo "test passed at `date`" > $@ ifneq ($(OS_NAME), windows) TESTS.jtreg += $(BUILDDIR)/StatsTest.ok endif $(BUILDDIR)/StatsTxt.1.ok: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/lib/jh.jar $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(J2SEJAVA) \ -Djtreg.stats.format="TEST-STATS: StatsTxt run=%r failed=%F excluded=%x" \ -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -jdk:$(J2SEHOME) \ -agentvm \ -w $(@:%.ok=%/work) \ -r $(@:%.ok=%/report) \ $(TESTDIR)/javatest/regtest/data/basic/main \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s '^TEST-STATS: StatsTxt run=44 failed=32 excluded=0$$' \ $(@:%.ok=%/jt.log) > /dev/null $(GREP) -s '^TEST-STATS: StatsTxt run=44 failed=32 excluded=0$$' \ $(@:%.ok=%/report/text/stats.txt) > /dev/null echo "test passed at `date`" > $@ $(BUILDDIR)/StatsTxt.2.ok: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/lib/jh.jar $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(J2SEJAVA) \ -Djtreg.stats.format="TEST-STATS: StatsTxt passed=%p failed=%F ignored=%i" \ -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -jdk:$(J2SEHOME) \ -agentvm \ -w $(@:%.ok=%/work) \ -r $(@:%.ok=%/report) \ -ignore:quiet \ $(TESTDIR)/javatest/regtest/data/basic/main \ $(TESTDIR)/javatest/regtest/data/basic/ignore \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s '^TEST-STATS: StatsTxt passed=12 failed=32 ignored=2$$' \ $(@:%.ok=%/jt.log) > /dev/null $(GREP) -s '^TEST-STATS: StatsTxt passed=12 failed=32 ignored=2$$' \ $(@:%.ok=%/report/text/stats.txt) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/StatsTxt.2.ok jtreg-jtreg4.2-b01/make/tests/T4499340.gmk0000644000000000000000000000430712670642364017625 0ustar rootroot00000000000000# # Copyright (c) 1997, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/T4499340.ok: $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(TESTDIR)/javatest/regtest/4499340/lib/HelloWorld.java \ $(TESTDIR)/javatest/regtest/4499340/test/dir/Test.java \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) $(MKDIR) $(@:%.ok=%) ( cd $(TESTDIR)/javatest/regtest/4499340 ; find test -name SCCS -prune -o -type f -print ) | \ while read file ; do \ $(MKDIR) -p `dirname $(@:%.ok=%)/$$file` ; \ $(CP) $(TESTDIR)/javatest/regtest/4499340/$$file `dirname $(@:%.ok=%)/$$file` ;\ done $(MKDIR) $(@:%.ok=%)/classes $(J2SEJAVAC) -d $(@:%.ok=%)/classes $(TESTDIR)/javatest/regtest/4499340/lib/HelloWorld.java $(JAR) cf $(@:%.ok=%)/test/dir/test.jar -C $(@:%.ok=%)/classes . JTHOME=$(JTREG_IMAGEDIR) JT_JAVA=$(J2SEHOME) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report -v:fail -jdk:$(J2SEHOME) $(@:%.ok=%)/test echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/T4499340.ok jtreg-jtreg4.2-b01/make/tests/T4730538.gmk0000644000000000000000000000332512670642364017621 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/T4730538.ok: $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(TESTDIR)/javatest/regtest/4730538/Test.java \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) $(MKDIR) $(@:%.ok=%) JTHOME=$(JTREG_IMAGEDIR) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report -v:fail \ -jdk:$(J2SEHOME) $(@:$(BUILDDIR)/T%.ok=$(TESTDIR)/javatest/regtest/%) echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/T4730538.ok jtreg-jtreg4.2-b01/make/tests/T6517728.gmk0000644000000000000000000000401512670642364017624 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- # only run the ...A test case by default, because the ...B test cases # checks the default when the test times out $(BUILDDIR)/T6517728.ok: $(TESTDIR)/javatest/regtest/6517728/T6517728A.java \ $(TESTDIR)/javatest/regtest/6517728/T6517728B.java \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar $(RM) $(@:%.ok=%) $(J2SEJAVA) $(JTREG_JAVA_OPTS) -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -w $(@:%.ok=%)/work/ovm \ -r $(@:%.ok=%)/report/ovm \ -ovm \ $(TESTDIR)/javatest/regtest/6517728/T6517728A.java $(J2SEJAVA) $(JTREG_JAVA_OPTS) -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -w $(@:%.ok=%)/work/svm \ -r $(@:%.ok=%)/report/svm \ -avm \ $(TESTDIR)/javatest/regtest/6517728/T6517728A.java echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/T6517728.ok jtreg-jtreg4.2-b01/make/tests/T6517916.gmk0000644000000000000000000000505012670642364017623 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- # on some platforms the launcher inserts extra environment variables: T6517916-ENVIRONMENT-NORMALIZATIONS = \ -e 's|^JAVA_MAIN_CLASS[_0-9]*=|JAVA_MAIN_CLASS=|' \ -e '/^JAVA_MAIN_CLASS=/s|MainWrapper|Main|' $(BUILDDIR)/T6517916.ok: \ $(TESTDIR)/javatest/regtest/6517916/T6517916.java \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar $(RM) $(@:%.ok=%) $(J2SEJAVA) $(JTREG_JAVA_OPTS) \ -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -w $(@:%.ok=%)/work/ovm \ -r $(@:%.ok=%)/report/ovm \ -ovm \ $(TESTDIR)/javatest/regtest/6517916 $(J2SEJAVA) -Djavatest.debug.child=true \ $(JTREG_JAVA_OPTS) \ -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -w $(@:%.ok=%)/work/svm \ -r $(@:%.ok=%)/report/svm \ -avm \ $(TESTDIR)/javatest/regtest/6517916 $(SED) -e 's|=[^:]*ovm/classes:|=|' -e 's|=[^:]*/6517916:|=|' \ $(T6517916-ENVIRONMENT-NORMALIZATIONS) \ < $(@:%.ok=%)/work/ovm/scratch/T6517916.out \ > $(@:%.ok=%)/work/ovm/scratch/T6517916.out2 $(SED) \ $(T6517916-ENVIRONMENT-NORMALIZATIONS) \ < $(@:%.ok=%)/work/svm/scratch/T6517916.out \ > $(@:%.ok=%)/work/svm/scratch/T6517916.out2 $(DIFF) \ $(@:%.ok=%)/work/ovm/scratch/T6517916.out2 \ $(@:%.ok=%)/work/svm/scratch/T6517916.out2 echo "test passed at `date`" > $@ ifneq ($(OS_NAME), windows) TESTS.jtreg += $(BUILDDIR)/T6517916.ok endif jtreg-jtreg4.2-b01/make/tests/T6519296.gmk0000644000000000000000000000321312670642364017625 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/T6519296.ok: $(TESTDIR)/javatest/regtest/6519296/T6519296.java \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar $(RM) $(@:%.ok=%) $(J2SEJAVA) $(JTREG_JAVA_OPTS) -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -w $(@:%.ok=%)/work \ -r $(@:%.ok=%)/report \ -avm \ $(TESTDIR)/javatest/regtest/6519296 echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/T6519296.ok jtreg-jtreg4.2-b01/make/tests/T6527624.gmk0000644000000000000000000000407112670642364017622 0ustar rootroot00000000000000# # Copyright (c) 1997, 2011, 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. # #---------------------------------------------------------------------- JAVATEST_VERSION := $(shell $(J2SEJAVA) -jar $(JAVATEST_JAR) -version 2>&1 | $(SED) -e '1s/^[^0-9]*\([0-9.]*\).*/\1/' -e '2,$$d' ) KET = ) SUMMARY_TXT := $(shell case "$(JAVATEST_VERSION)" in 3* $(KET) $(ECHO) summary.txt ;; * $(KET) $(ECHO) text/summary.txt ;; esac ) $(BUILDDIR)/T6527624.ok:\ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar $(RM) $(@:%.ok=%) - $(J2SEJAVA) $(JTREG_JAVA_OPTS) -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -w $(@:%.ok=%)/work \ -r $(@:%.ok=%)/report \ $(TESTDIR)/javatest/regtest/6527624 sort -df $(@:%.ok=%)/report/$(SUMMARY_TXT) > $(@:%.ok=%)/report/$(SUMMARY_TXT).sorted diff $(@:%.ok=%)/report/$(SUMMARY_TXT).sorted $(TESTDIR)/javatest/regtest/6527624/summary.golden echo "test passed at `date`" > $@ ifneq ($(OS_NAME), windows) TESTS.jtreg += $(BUILDDIR)/T6527624.ok endif jtreg-jtreg4.2-b01/make/tests/T6533043.gmk0000644000000000000000000000330412670642364017610 0ustar rootroot00000000000000# # Copyright (c) 1997, 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. # #---------------------------------------------------------------------- # 6533043: support failureProperty and errorProperty in task $(BUILDDIR)/T6533043.ok: $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg JAVA_HOME=$(JDK15HOME) $(ANT) -f $(TESTDIR)/javatest/regtest/6533043/build.xml \ -Dbuild.jtreg=$(BUILDDIR)/jtreg \ -Djtreg.jar=`pwd`/$(JTREG_IMAGEDIR)/lib/jtreg.jar \ -Dtestjdk=$(JDK15HOME) echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/T6533043.ok jtreg-jtreg4.2-b01/make/tests/T6533074.gmk0000644000000000000000000000327412670642364017622 0ustar rootroot00000000000000# # Copyright (c) 1997, 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. # #---------------------------------------------------------------------- # 6533074: allow additional compiler options to be specified $(BUILDDIR)/T6533074.ok: $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg JAVA_HOME=$(JDK15HOME) $(ANT) -f $(TESTDIR)/javatest/regtest/6533074/build.xml \ -Dbuild.jtreg=$(BUILDDIR)/jtreg \ -Djtreg.jar=`pwd`/$(JTREG_IMAGEDIR)/lib/jtreg.jar \ -Dtestjdk=$(JDK15HOME) echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/T6533074.ok jtreg-jtreg4.2-b01/make/tests/T6533136.gmk0000644000000000000000000000470612670642364017622 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- # 6533136: use -dir as a base directory for test files and directories on the command line $(BUILDDIR)/T6533136.ok: $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(TESTDIR)/javatest/regtest/data/basic/main/Pass.java \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) $(MKDIR) $(@:%.ok=%) ( b=`pwd`; cd $(TESTDIR)/javatest/regtest/data/basic/ ; \ JTHOME=$$b/$(JTREG_IMAGEDIR) $$b/$(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -avm -w:$$b/$(@:%.ok=%)/work -r:$$b/$(@:%.ok=%)/report \ -v:fail -jdk:$(J2SEHOME) main/Pass.java; \ JTHOME=$$b/$(JTREG_IMAGEDIR) $$b/$(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -ovm -w:$$b/$(@:%.ok=%)/work -r:$$b/$(@:%.ok=%)/report \ -v:fail -jdk:$(J2SEHOME) main/Pass.java ) JTHOME=$(JTREG_IMAGEDIR) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -avm -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -v:fail -jdk:$(J2SEHOME) \ -dir:$(TESTDIR)/javatest/regtest/data/basic/ main/Pass.java JTHOME=$(JTREG_IMAGEDIR) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -ovm -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -v:fail -jdk:$(J2SEHOME) \ -dir:$(TESTDIR)/javatest/regtest/data/basic/ main/Pass.java echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/T6533136.ok jtreg-jtreg4.2-b01/make/tests/T6585912.gmk0000644000000000000000000000463512670642364017634 0ustar rootroot00000000000000# # Copyright (c) 1997, 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. # #---------------------------------------------------------------------- # 6585912: jtreg should be able to really ignore @ignore tests $(BUILDDIR)/T6585912.ok: $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(TESTDIR)/javatest/regtest/data/6585912 | \ grep "Test results: passed: 1; failed: 1; error: 1" > /dev/null $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -ignore:quiet \ $(TESTDIR)/javatest/regtest/data/6585912 | \ grep "Test results: passed: 1; failed: 1" > /dev/null $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -ignore:error \ $(TESTDIR)/javatest/regtest/data/6585912 | \ grep "Test results: passed: 1; failed: 1; error: 1" > /dev/null $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -ignore:run \ $(TESTDIR)/javatest/regtest/data/6585912 | \ grep "Test results: passed: 2; failed: 1" > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/T6585912.ok jtreg-jtreg4.2-b01/make/tests/T6590657.gmk0000644000000000000000000000364012670642364017631 0ustar rootroot00000000000000# # Copyright (c) 1997, 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. # #---------------------------------------------------------------------- # 6590657: @clean will occasionally fail to delete @clean files $(BUILDDIR)/T6590657.ok: $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(TESTDIR)/javatest/regtest/6590657/T6590657.java \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) $(MKDIR) $(@:%.ok=%) JTHOME=$(JTREG_IMAGEDIR) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -J-Djavatest.regtest.allowTrailingBuild=true \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -va -jdk:$(J2SEHOME) \ $(TESTDIR)/javatest/regtest/6590657/T6590657.java $(GREP) "T6590657.java Passed. Build successful" < $(@:%.ok=%)/report/text/summary.txt echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/T6590657.ok jtreg-jtreg4.2-b01/make/tests/T6590671.gmk0000644000000000000000000000366412670642364017633 0ustar rootroot00000000000000# # Copyright (c) 1997, 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. # #---------------------------------------------------------------------- # 6590671: RegressionTestFinder should ignore , files $(BUILDDIR)/T6590671.ok: $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(TESTDIR)/javatest/regtest/6590671/T6590671.java \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) $(MKDIR) -p $(@:%.ok=%)/test $(CP) $(TESTDIR)/javatest/regtest/6590671/T6590671.java \ $(TESTDIR)/javatest/regtest/6590671/TEST.ROOT $(@:%.ok=%)/test $(CP) $(@:%.ok=%)/test/T6590671.java $(@:%.ok=%)/test/,T6590671.java JTHOME=$(JTREG_IMAGEDIR) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -v -jdk:$(J2SEHOME) \ $(@:%.ok=%)/test echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/T6590671.ok jtreg-jtreg4.2-b01/make/tests/T6622433.gmk0000644000000000000000000000564612670642364017625 0ustar rootroot00000000000000# # Copyright (c) 1997, 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. # #---------------------------------------------------------------------- # 6622433: support passing opts to java command only (i.e. without passing to javac) $(BUILDDIR)/T6622433.ok: $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(TESTDIR)/javatest/regtest/6622433/TestJava.java \ $(TESTDIR)/javatest/regtest/6622433/TestShell.sh \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) $(MKDIR) $(@:%.ok=%) JTHOME=$(JTREG_IMAGEDIR) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ -javaoption:-DTESTJAVAOPTION=X \ -javacoption:-XDrawDiagnostics \ -vmoption:-DTESTVMOPTION=Y \ $(TESTDIR)/javatest/regtest/6622433 $(GREP) 'TESTJAVAOPTION=X' $(@:%.ok=%)/work/TestJava.jtr > /dev/null $(GREP) 'TESTVMOPTION=Y' $(@:%.ok=%)/work/TestJava.jtr > /dev/null $(GREP) 'test.java.opts=-DTESTJAVAOPTION=X' $(@:%.ok=%)/work/TestJava.jtr > /dev/null $(GREP) 'test.compiler.opts=-XDrawDiagnostics' $(@:%.ok=%)/work/TestJava.jtr > /dev/null $(GREP) 'test.tool.vm.opts=-J-DTESTVMOPTION=Y' $(@:%.ok=%)/work/TestJava.jtr > /dev/null $(GREP) 'test.vm.opts=-DTESTVMOPTION=Y' $(@:%.ok=%)/work/TestJava.jtr > /dev/null $(GREP) 'TESTJAVACOPTS=-XDrawDiagnostics' $(@:%.ok=%)/work/TestShell.jtr > /dev/null $(GREP) 'TESTJAVAOPTS=-DTESTJAVAOPTION=X' $(@:%.ok=%)/work/TestShell.jtr > /dev/null $(GREP) 'TESTTOOLVMOPTS=-J-DTESTVMOPTION=Y' $(@:%.ok=%)/work/TestShell.jtr > /dev/null $(GREP) 'TESTVMOPTS=-DTESTVMOPTION=Y' $(@:%.ok=%)/work/TestShell.jtr > /dev/null $(GREP) 'TestCompile1.java:8:6: compiler.err.premature.eof' $(@:%.ok=%)/work/TestCompile1.jtr > /dev/null $(GREP) 'TESTVMOPTION=Y' $(@:%.ok=%)/work/TestCompile2.jtr > /dev/null echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/T6622433.ok jtreg-jtreg4.2-b01/make/tests/T6783039.gmk0000644000000000000000000000446712670642364017637 0ustar rootroot00000000000000# # Copyright (c) 2007, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/T6783039.ok: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar $(RM) $(BUILDDIR)/6783039/ for p in p1 p2 ; do for y in 2007 2008 ; do for d in 1 2 3 ; do \ mkdir -p $(BUILDDIR)/6783039/$$p/$$y/$$d/JTreport/text/ ; touch $(BUILDDIR)/6783039/$$p/$$y/$$d/JTreport/text/summary.txt ; \ done ; done ; done $(J2SEJAVA) -cp $(JTREG_IMAGEDIR)/lib/jtreg.jar com.sun.javatest.diff.Main \ $(BUILDDIR)/6783039/*/*/*/JTreport/text/summary.txt > $(BUILDDIR)/6783039/stdout $(J2SEJAVA) -cp $(JTREG_IMAGEDIR)/lib/jtreg.jar com.sun.javatest.diff.Main \ -o $(BUILDDIR)/6783039/out.txt $(BUILDDIR)/6783039/*/*/*/JTreport/text/summary.txt diff $(BUILDDIR)/6783039/stdout $(BUILDDIR)/6783039/out.txt mkdir $(BUILDDIR)/6783039/super $(J2SEJAVA) -cp $(JTREG_IMAGEDIR)/lib/jtreg.jar com.sun.javatest.diff.Main \ -o $(BUILDDIR)/6783039/super -super $(BUILDDIR)/6783039/ if [ `find $(BUILDDIR)/6783039/super -name \*.html | wc -l` != 9 ]; then \ echo "super output not as expected" ; exit 1 ; \ fi echo $@ passed at `date` > $@ TESTS.jtdiff += $(BUILDDIR)/T6783039.ok jtreg-jtreg4.2-b01/make/tests/T6783087.gmk0000644000000000000000000000431312670642364017630 0ustar rootroot00000000000000# # Copyright (c) 1997, 2011, 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. # #---------------------------------------------------------------------- # 6783087: jtreg follows symlinks when cleaning a directory $(BUILDDIR)/T6783087.ok: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar $(RM) $(BUILDDIR)/6783097/ $(MKDIR) -p $(BUILDDIR)/6783097/work/scratch $(MKDIR) $(BUILDDIR)/6783097/doNotDelete touch $(BUILDDIR)/6783097/doNotDelete.txt $(BUILDDIR)/6783097/doNotDelete/doNotDelete.txt ln -s `pwd`/$(BUILDDIR)/6783097/doNotDelete $(BUILDDIR)/6783097/work/scratch/doNotDelete ln -s `pwd`/$(BUILDDIR)/6783097/doNotDelete.txt $(BUILDDIR)/6783097/work/scratch/doNotDelete.txt $(J2SEJAVA) -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -w $(BUILDDIR)/6783097/work/ -r $(BUILDDIR)/6783097/report/ \ $(TESTDIR)/javatest/regtest/data/basic/main/Pass.java find $(BUILDDIR)/6783097/ if [ ! -f $(BUILDDIR)/6783097/doNotDelete.txt -o ! -f $(BUILDDIR)/6783097/doNotDelete/doNotDelete.txt ]; then \ echo "files deleted incorrectly" ; exit 1 ; \ fi echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/T6783087.ok jtreg-jtreg4.2-b01/make/tests/T6799634.gmk0000644000000000000000000000320712670642364017636 0ustar rootroot00000000000000# # Copyright (c) 1997, 2011, 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. # #---------------------------------------------------------------------- # 6799634: Allow annotation processing of class files in jtreg directives $(BUILDDIR)/T6799634.ok: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar $(JDK16HOME)/bin/java -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -w $(BUILDDIR)/6799634/work/ -r $(BUILDDIR)/6799634/report/ \ $(TESTDIR)/javatest/regtest/6799634 echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/T6799634.ok jtreg-jtreg4.2-b01/make/tests/T6809055.gmk0000644000000000000000000000320412670642364017620 0ustar rootroot00000000000000# # Copyright (c) 1997, 2011, 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. # #---------------------------------------------------------------------- # 6809055: Set test.src and test.classes information for @compile tasks $(BUILDDIR)/T6809055.ok: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar $(JDK16HOME)/bin/java -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -w $(BUILDDIR)/6809055/work/ -r $(BUILDDIR)/6809055/report/ \ $(TESTDIR)/javatest/regtest/6809055 echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/T6809055.ok jtreg-jtreg4.2-b01/make/tests/T6811371.gmk0000644000000000000000000000306712670642364017621 0ustar rootroot00000000000000# # Copyright (c) 1997, 2011, 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. # #---------------------------------------------------------------------- # 6811371: recategorize -e option as a general option instead of a JDK one $(BUILDDIR)/T6811371.ok: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar $(J2SEJAVA) -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar -help -e | grep "General Options" echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/T6811371.ok jtreg-jtreg4.2-b01/make/tests/T7113596.gmk0000644000000000000000000000415612670642364017626 0ustar rootroot00000000000000# # Copyright (c) 1997, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/T7113596.ok: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/lib/jh.jar $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(LN) -s $(J2SEHOME) $(@:%.ok=%)/jdk cd $(@:%.ok=%) && $(J2SEJAVA) -jar ../$(JTREG_IMAGEDIR)/lib/jtreg.jar \ -jdk:jdk \ ../$(TESTDIR)/javatest/regtest/data/T7113596 for i in COMPILEJAVA TESTJAVA ; do \ value=`$(GREP) $$i= $(@:%.ok=%)/JTwork/Test.jtr | $(SED) -e 's/[^=]*=//' | head -n 1` ; \ case $$value in \ jdk ) echo "$$i set to relative value" ; exit 1 ;; \ `cd $(@:%.ok=%)/jdk ; pwd` ) echo "$$i set to expected absolute path" ;; \ * ) echo "bad value for $$i: $$value" ; \ echo " expected: `cd $(@:%.ok=%)/jdk ; pwd`" ; \ exit 1 ;; \ esac \ done echo "test passed at `date`" > $@ ifneq ($(OS_NAME), windows) TESTS.jtreg += $(BUILDDIR)/T7113596.ok endif jtreg-jtreg4.2-b01/make/tests/T7900112.gmk0000644000000000000000000000365312670642364017613 0ustar rootroot00000000000000# # Copyright (c) 1997, 2011, 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. # #---------------------------------------------------------------------- # 7900112: don't print unnecessary stack traces $(BUILDDIR)/T7900112.ok: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JDK16HOME)/bin/java -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -w $(BUILDDIR)/7900112/work/ -r $(BUILDDIR)/7900112/report/ \ $(TESTDIR)/javatest/regtest/7900112 > $(@:%.ok=%/jt.log) 2>&1; \ $(GREP) 'java.lang.Exception: thrown exception is success' $(BUILDDIR)/7900112/work/TestExpected.jtr > /dev/null ; rc=$$?; \ if [ "$$rc" = 0 ]; then echo "Unexpected stacktrace for successful test in TestExpected.jtr" ; exit 1 ; fi echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/T7900112.ok jtreg-jtreg4.2-b01/make/tests/T7900130.gmk0000644000000000000000000000376712670642364017621 0ustar rootroot00000000000000# # Copyright (c) 1997, 2011, 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. # #---------------------------------------------------------------------- # 7900130: Exception in TestNG DataSource does not result in a reported test failure # Test should fail due to exception in @DataSource $(BUILDDIR)/T7900130.ok: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JDK16HOME)/bin/java -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -w $(BUILDDIR)/7900130/work/ -r $(BUILDDIR)/7900130/report/ \ $(TESTDIR)/javatest/regtest/7900130 > $(@:%.ok=%/jt.log) 2>&1 $(GREP) 'TestArguments.test_data("Thing1", "", 4, true, 2.0)' $(BUILDDIR)/7900130/work/TestArguments.jtr > /dev/null $(GREP) 'TestArguments.test_data("Thing2", null, 8, false, 6.0)' $(BUILDDIR)/7900130/work/TestArguments.jtr > /dev/null echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/T7900130.ok jtreg-jtreg4.2-b01/make/tests/T7900165.gmk0000644000000000000000000000354712670642364017625 0ustar rootroot00000000000000# # Copyright (c) 1997, 2011, 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. # #---------------------------------------------------------------------- # 7900165: Exception in TestNG DataSource does not result in a reported test failure # Test should fail due to exception in @DataSource $(BUILDDIR)/T7900165.ok: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JDK16HOME)/bin/java -jar $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -w $(BUILDDIR)/7900165/work/ -r $(BUILDDIR)/7900165/report/ \ $(TESTDIR)/javatest/regtest/7900165 > $(@:%.ok=%/jt.log) 2>&1 ; rc=$$? ; \ if [ "$$rc" != 2 ]; then echo "unexpected exit code: " $$rc ; exit 1 ; fi echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/T7900165.ok jtreg-jtreg4.2-b01/make/tests/TestAbsLib.gmk0000644000000000000000000000322512670642364020633 0ustar rootroot00000000000000# # Copyright (c) 2012, 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. # #---------------------------------------------------------------------- # # Verify @library tag works for absolute paths (i.e. rel to TEST.ROOT dir). $(BUILDDIR)/TestAbsLib.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ -va \ $(TESTDIR)/javatest/regtest/data/absLib echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/TestAbsLib.ok jtreg-jtreg4.2-b01/make/tests/TestNGLibTest.gmk0000644000000000000000000000337312670642364021276 0ustar rootroot00000000000000# # Copyright (c) 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. 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. # #---------------------------------------------------------------------- $(BUILDDIR)/TestNGLibTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jh.jar $(RM) $(@:%.ok=%/work) $(@:%.ok=%/report) $(MKDIR) -p $(@:%.ok=%) $(JDK16HOME)/bin/java \ -jar $(ABS_JTREG_IMAGEJARDIR)/jtreg.jar \ -w:$(@:%.ok=%/work) \ -r:$(@:%.ok=%/report) \ $(TESTDIR)/javatest/regtest/data/testng \ > $(@:%.ok=%/log 2>&1) \ || (cat $(@:%.ok=%/log) ; exit 1) echo $@ passed at `date` > $@ TESTS.jtreg += \ $(BUILDDIR)/TestNGLibTest.ok jtreg-jtreg4.2-b01/make/tests/TestNativePath.gmk0000644000000000000000000001120512670642364021537 0ustar rootroot00000000000000# # Copyright (c) 2014, 2015, 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. # #---------------------------------------------------------------------- NATIVEPATH := $(shell cd $(BUILDDIR); pwd) $(BUILDDIR)/TestNativePath.agentvm.ok \ $(BUILDDIR)/TestNativePath.othervm.ok: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -jdk:$(JDK16HOME) \ -nativepath:$(NATIVEPATH) \ -vmoption:-Dcorrect.nativepath=$(NATIVEPATH) \ -w:$(BUILDDIR)/jtreg/nativepath.othervm/work \ -r:$(BUILDDIR)/jtreg/nativepath.othervm/report \ -verbose:fail \ $(@:$(BUILDDIR)/TestNativePath.%.ok=-%) \ $(TESTDIR)/javatest/regtest/data/nativepath/NativesOK.java $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -jdk:$(JDK16HOME) \ -w:$(BUILDDIR)/jtreg/nativepath.othervm2/work \ -r:$(BUILDDIR)/jtreg/nativepath.othervm2/report \ -verbose:fail \ $(@:$(BUILDDIR)/TestNativePath.%.ok=-%) \ $(TESTDIR)/javatest/regtest/data/nativepath/NativesEmpty.java echo "$@ test passed at `date`" > $@ $(BUILDDIR)/TestNativePath.ok: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -jdk:$(JDK16HOME) \ -nativepath:/this/path/does/not/exist \ $(TESTDIR)/javatest/regtest/data/nativepath \ 2>&1 | grep -q "The -nativepath path does not exist" $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -jdk:$(JDK16HOME) \ -nativepath:$(JTREG_IMAGEDIR)/bin/jtreg \ $(TESTDIR)/javatest/regtest/data/nativepath \ 2>&1 | grep -q "The -nativepath path is not a directory" $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -jdk:$(JDK16HOME) \ -nativepath:$(JTREG_IMAGEDIR)/bin/jtreg:$(JDK16HOME) \ $(TESTDIR)/javatest/regtest/data/nativepath \ 2>&1 | grep -q "The argument to -nativepath cannot be more than one path." # Run a test with native code without the -nativepath option # should yield an error $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -jdk:$(JDK16HOME) \ -w:$(BUILDDIR)/jtreg/nativepath.othervm2/work \ -r:$(BUILDDIR)/jtreg/nativepath.othervm2/report \ -verbose:fail \ $(TESTDIR)/javatest/regtest/data/nativepath/NativesOK.java \ 2>&1 | grep -q "Use -nativepath to specify the location of native code" # Exclude all tests with native code $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -jdk:$(JDK16HOME) \ -w:$(BUILDDIR)/jtreg/nativepath.othervm2/work \ -r:$(BUILDDIR)/jtreg/nativepath.othervm2/report \ -k:!native \ -verbose:fail \ $(TESTDIR)/javatest/regtest/data/nativepath/NativesOK.java \ 2>&1 | grep -q "no tests selected" # Shell tests $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -jdk:$(JDK16HOME) \ -nativepath:$(NATIVEPATH) \ -e:CORRECTNATIVEPATH=$(NATIVEPATH) \ -w:$(BUILDDIR)/jtreg/nativepath.shell/work \ -r:$(BUILDDIR)/jtreg/nativepath.shell/report \ -verbose:fail \ $(TESTDIR)/javatest/regtest/data/nativepath/NativesOKShell.sh $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -jdk:$(JDK16HOME) \ -w:$(BUILDDIR)/jtreg/nativepath.shell/work \ -r:$(BUILDDIR)/jtreg/nativepath.shell/report \ -verbose:fail \ $(TESTDIR)/javatest/regtest/data/nativepath/NativesEmptyShell.sh echo "$@ test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/TestNativePath.ok \ $(BUILDDIR)/TestNativePath.agentvm.ok \ $(BUILDDIR)/TestNativePath.othervm.ok testnativepath: \ $(BUILDDIR)/TestNativePath.ok \ $(BUILDDIR)/TestNativePath.agentvm.ok \ $(BUILDDIR)/TestNativePath.othervm.ok jtreg-jtreg4.2-b01/make/tests/TestPropsTest.gmk0000644000000000000000000000337612670642364021451 0ustar rootroot00000000000000# # Copyright (c) 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. 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. # #---------------------------------------------------------------------- $(BUILDDIR)/TestPropsTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jh.jar $(RM) $(@:%.ok=%/work) $(@:%.ok=%/report) $(MKDIR) -p $(@:%.ok=%) $(JDK16HOME)/bin/java \ -jar $(ABS_JTREG_IMAGEJARDIR)/jtreg.jar \ -w:$(@:%.ok=%/work) \ -r:$(@:%.ok=%/report) \ $(TESTDIR)/javatest/regtest/data/testprops \ > $(@:%.ok=%/log 2>&1) \ || (cat $(@:%.ok=%/log) ; exit 1) echo $@ passed at `date` > $@ TESTS.jtreg += \ $(BUILDDIR)/TestPropsTest.ok jtreg-jtreg4.2-b01/make/tests/TestRequiredVersion.gmk0000644000000000000000000000533512670642364022631 0ustar rootroot00000000000000# # Copyright (c) 2014, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/TestRequiredVersion.ok: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg # test that a previous version is accepted mkdir -p $(BUILDDIR)/jtreg/requiredversion.previous/suite echo "requiredVersion = 1.0 b01" > $(BUILDDIR)/jtreg/requiredversion.previous/suite/TEST.ROOT $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -jdk:$(JDK16HOME) \ -w:$(BUILDDIR)/jtreg/requiredversion.previous/work \ -r:$(BUILDDIR)/jtreg/requiredversion.previous/report \ -verbose:fail \ $(BUILDDIR)/jtreg/requiredversion.previous/suite/ \ 2>&1 | tee $(BUILDDIR)/jtreg/requiredversion.previous/log.txt grep -q "no tests selected" $(BUILDDIR)/jtreg/requiredversion.previous/log.txt # test that a future version is not accepted mkdir -p $(BUILDDIR)/jtreg/requiredversion.future/suite echo "requiredVersion = 99.9 b01" > $(BUILDDIR)/jtreg/requiredversion.future/suite/TEST.ROOT $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -jdk:$(JDK16HOME) \ -w:$(BUILDDIR)/jtreg/requiredversion.future/work \ -r:$(BUILDDIR)/jtreg/requiredversion.future/report \ -verbose:fail \ $(BUILDDIR)/jtreg/requiredversion.future/suite/ \ 2>&1 | tee $(BUILDDIR)/jtreg/requiredversion.future/log.txt grep -q "requires jtreg version 99.9 b01 or higher" $(BUILDDIR)/jtreg/requiredversion.future/log.txt echo "$@ test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/TestRequiredVersion.ok testrequiredversion: \ $(BUILDDIR)/TestRequiredVersion.ok jtreg-jtreg4.2-b01/make/tests/TestRetainTest.gmk0000644000000000000000000000357412670642364021570 0ustar rootroot00000000000000# # Copyright (c) 1997, 2011, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/TestRetainTest.ok: $(TESTDIR)/javatest/regtest/RetainTest.java \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar $(RM) $(@:%.ok=%) $(MKDIR) $(@:%.ok=%) $(@:%.ok=%)/classes $(J2SEJAVAC) -d $(@:%.ok=%)/classes \ -cp $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(TESTDIR)/javatest/regtest/RetainTest.java $(J2SEJAVA) -cp "$(@:%.ok=%)/classes$(PS)$(JTREG_IMAGEDIR)/lib/jtreg.jar" RetainTest \ $(TESTDIR)/javatest/regtest/data/retain \ $(@:%.ok=%)/work \ $(@:%.ok=%)/report \ > $(@:%.ok=%.log 2>&1) || (cat $(@:%.ok=%.log) ; exit 1) echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/TestRetainTest.ok jtreg-jtreg4.2-b01/make/tests/TestVMOpts.gmk0000644000000000000000000000366712670642364020701 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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_OPTS += \ # -J-Djavatest.regtest.debugOptions=true $(BUILDDIR)/TestVMOpts.ok: $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -jdk:$(JDK16HOME) -Dfoo=bar -Xbootclasspath/p:baz \ -w:$(BUILDDIR)/jtreg/cmd.othervm/work \ -r:$(BUILDDIR)/jtreg/cmd.othervm/report \ -verbose:fail \ $(TESTDIR)/javatest/regtest/data/vmopts JAVA_HOME=$(JDK16HOME) $(ANT) -f $(TESTDIR)/javatest/regtest/data/vmopts/build.xml \ -Dbuild.jtreg=$(BUILDDIR)/jtreg \ -Djtreg.jar=`pwd`/$(JTREG_IMAGEDIR)/lib/jtreg.jar \ -Dtestjdk=$(JDK16HOME) echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/TestVMOpts.ok jtreg-jtreg4.2-b01/make/tests/TestWhiteSpaceFiles.gmk0000644000000000000000000000433412670642364022520 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/TestWhiteSpaceFiles.ok: \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/lib/jh.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(BUILDDIR)/tmp/$(@F:%.ok=%) $(MKDIR) -p $(BUILDDIR)/tmp/$(@F:%.ok=%) ln -s $(J2SEHOME) $(BUILDDIR)/tmp/$(@F:%.ok=%)/"j2se home" ln -s $(shell cd $(JTREG_IMAGEDIR); pwd) $(BUILDDIR)/tmp/$(@F:%.ok=%)/"jtreg home" $(BUILDDIR)/tmp/$(@F:%.ok=%)/"jtreg home"/bin/jtreg $(JTREG_OPTS) \ -w $(@:%.ok=%/ovm/work) \ -r $(@:%.ok=%/ovm/report) \ -jdk:$(BUILDDIR)/tmp/$(@F:%.ok=%)/"j2se home" \ $(TESTDIR)/javatest/regtest/data/basic/main/Pass.java $(BUILDDIR)/tmp/$(@F:%.ok=%)/"jtreg home"/bin/jtreg $(JTREG_OPTS) \ -avm \ -w $(@:%.ok=%/avm/work) \ -r $(@:%.ok=%/avm/report) \ -jdk:$(BUILDDIR)/tmp/$(@F:%.ok=%)/"j2se home" \ $(TESTDIR)/javatest/regtest/data/basic/main/Pass.java echo "test passed at `date`" > $@ ifneq ($(OS_NAME), windows) TESTS.jtreg += $(BUILDDIR)/TestWhiteSpaceFiles.ok endif jtreg-jtreg4.2-b01/make/tests/TimelimitTests.gmk0000644000000000000000000000747012670642364021625 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/timelimit.none.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -agentvm \ $(TESTDIR)/javatest/regtest/timelimit/ \ > $(@:%.ok=%/jt.log) 2>&1 $(GREP) -s 'Test results: passed: 3' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/timelimit.none.ok $(BUILDDIR)/timelimit.150.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -agentvm \ -timelimit:150 \ $(TESTDIR)/javatest/regtest/timelimit/ \ > $(@:%.ok=%/jt.log) 2>&1 $(GREP) -s 'Test results: passed: 1' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/timelimit.150.ok $(BUILDDIR)/timelimit.300.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -agentvm \ -timelimit:300 \ $(TESTDIR)/javatest/regtest/timelimit/ \ > $(@:%.ok=%/jt.log) 2>&1 $(GREP) -s 'Test results: passed: 2' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/timelimit.300.ok $(BUILDDIR)/timelimit.500.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -agentvm \ -timelimit:500 \ $(TESTDIR)/javatest/regtest/timelimit/ \ > $(@:%.ok=%/jt.log) 2>&1 $(GREP) -s 'Test results: passed: 3' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/timelimit.500.ok $(BUILDDIR)/timelimit.bad.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -agentvm \ -timelimit:bad \ $(TESTDIR)/javatest/regtest/timelimit/ \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Error: Bad value for -timeLimit' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += $(BUILDDIR)/timelimit.bad.ok jtreg-jtreg4.2-b01/make/tests/TimeoutHandlerTest.gmk0000644000000000000000000000653512670642364022432 0ustar rootroot00000000000000# # Copyright (c) 2014, 2015, 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. # #---------------------------------------------------------------------- # # Test that the default timeout handler in jtreg works # $(BUILDDIR)/TimeoutHandlerTestDefault.agentvm.ok \ $(BUILDDIR)/TimeoutHandlerTestDefault.othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK18HOME) \ -va \ $(@:$(BUILDDIR)/TimeoutHandlerTestDefault.%.ok=-%) \ $(TESTDIR)/javatest/regtest/data/timeouthandlers/TestJavaHang.java \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'Running jstack' $(@:%.ok=%/jt.log) > /dev/null; $(GREP) -s 'Test results: error: 1' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.timeouthandler += \ $(BUILDDIR)/TimeoutHandlerTestDefault.agentvm.ok \ $(BUILDDIR)/TimeoutHandlerTestDefault.othervm.ok # # Test that it is possible to supply an external timeout handler # $(BUILDDIR)/TimeoutHandlerTestExternal.agentvm.ok \ $(BUILDDIR)/TimeoutHandlerTestExternal.othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JDK18HOME)/bin/javac -cp $(JTREG_IMAGEDIR)/lib/jtreg.jar \ -d $(@:%.ok=%) \ $(TESTDIR)/javatest/regtest/data/timeouthandlers/MyHandler.java $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK18HOME) \ -va \ -timeoutHandler:MyHandler \ -timeoutHandlerDir:$(@:%.ok=%) \ $(@:$(BUILDDIR)/TimeoutHandlerTestExternal.%.ok=-%) \ $(TESTDIR)/javatest/regtest/data/timeouthandlers/TestJavaHang.java \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" $(GREP) -s 'I am handling it!' $(@:%.ok=%/jt.log) > /dev/null; $(GREP) -s 'Test results: error: 1' $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.timeouthandler += \ $(BUILDDIR)/TimeoutHandlerTestExternal.agentvm.ok \ $(BUILDDIR)/TimeoutHandlerTestExternal.othervm.ok TESTS.jtreg += ${TESTS.timeouthandler} testtimeouthandlers: \ ${TESTS.timeouthandler} jtreg-jtreg4.2-b01/make/tests/TimeoutHandlerTimeoutTest.gmk0000644000000000000000000000542412670642364023775 0ustar rootroot00000000000000# # Copyright (c) 2015, 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. # # use target-specific variables to specify jtreg option # and the resulting expected timeout $(BUILDDIR)/TimeoutHandlerTimeoutTest.default.ok: OPTION= $(BUILDDIR)/TimeoutHandlerTimeoutTest.default.ok: EXPECT=300 $(BUILDDIR)/TimeoutHandlerTimeoutTest.noTimeout.ok: OPTION=-timeoutHandlerTimeout:0 $(BUILDDIR)/TimeoutHandlerTimeoutTest.noTimeout.ok: EXPECT=0 $(BUILDDIR)/TimeoutHandlerTimeoutTest.timeout.ok: OPTION=-timeoutHandlerTimeout:5 $(BUILDDIR)/TimeoutHandlerTimeoutTest.timeout.ok: EXPECT=5 # the tests $(BUILDDIR)/TimeoutHandlerTimeoutTest.default.ok \ $(BUILDDIR)/TimeoutHandlerTimeoutTest.noTimeout.ok \ $(BUILDDIR)/TimeoutHandlerTimeoutTest.timeout.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg \ $(TESTDIR)/javatest/regtest/timeoutHandler/TestTimeoutHandler.java $(MKDIR) -p $(@:%.ok=%)/classes $(J2SEJAVAC) -d $(@:%.ok=%)/classes \ -classpath $(JTREG_IMAGEDIR)/lib/jtreg.jar:$(JTREG_IMAGEDIR)/lib/jtharness.jar \ $(TESTDIR)/javatest/regtest/timeoutHandler/TestTimeoutHandler.java EXPECTED_TIMEOUT=$(EXPECT) \ $(JTREG_IMAGEDIR)/bin/jtreg \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ -timeoutHandler:TestTimeoutHandler \ -timeoutHandlerDir:$(@:%.ok=%)/classes \ $(OPTION) \ $(TESTDIR)/javatest/regtest/timeoutHandler/test \ > $(@:%.ok=%/jt.log) 2>&1 $(GREP) -s "TestTimeoutHandler: timeout set to $(EXPECT)" $(@:%.ok=%/jt.log) > /dev/null echo "test passed at `date`" > $@ TESTS.jtreg += \ $(BUILDDIR)/TimeoutHandlerTimeoutTest.default.ok \ $(BUILDDIR)/TimeoutHandlerTimeoutTest.noTimeout.ok \ $(BUILDDIR)/TimeoutHandlerTimeoutTest.timeout.ok jtreg-jtreg4.2-b01/make/tests/TimeoutTest.gmk0000644000000000000000000000676212670642364021136 0ustar rootroot00000000000000# # Copyright (c) 1997, 2015, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/TimeoutTest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(MAKE) -C $(TESTDIR)/javatest/regtest/data/timeouts/test \ TEST_OUTPUT_DIR=`pwd`/$(BUILDDIR)/$(@:%.ok=%) \ JT_JAVA=$(J2SEHOME) \ TESTJAVA=$(J2SEHOME) \ JTREG_HOME=`cd $(JTREG_IMAGEDIR); pwd` echo "test passed at `date`" > $@ # This test is not included by default because it is by its nature so # slow to run. # TESTS.jtreg += $(BUILDDIR)/TimeoutTest.ok #---------------------------------------------------------------------- # This is a description of the expected results in each mode: # # agentvm # # AAA_Pass: pass # ZZZ_Pass: pass # ExitTest: error (calls System.exit in Agent) # SlowExitTest: pass (test finishes quickly but leaves a shutdown hook active in the agent) # SlowInterruptibleTest: error (timeout) # SlowUninterruptibleTest: error (timeout) # pass: 3, error 3 # # othervm # # AAA_Pass: pass # ZZZ_Pass: pass # ExitTest: failed (calls System.exit() with an unexpected exit code) # SlowExitTest: error (timeout, shutdown hook prevents othervm from shutting down) # SlowInterruptibleTest: error (timeout) # SlowUninterruptibleTest: error (timeout) # pass: 2, failed: 1, error: 3 $(BUILDDIR)/TimeoutTest.agentvm.ok \ $(BUILDDIR)/TimeoutTest.othervm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(JDK16HOME) \ -va \ $(@:$(BUILDDIR)/TimeoutTest.%.ok=-%) \ $(TESTDIR)/javatest/regtest/data/timeouts/test \ > $(@:%.ok=%/jt.log) 2>&1 || \ true "non-zero exit code from JavaTest intentionally ignored" case $(@:$(BUILDDIR)/TimeoutTest.%.ok=%) in \ othervm ) expect="Test results: passed: 2; failed: 1; error: 3" ;; \ agentvm ) expect="Test results: passed: 3; error: 3" ;; \ esac ; \ $(GREP) -s "$$expect" $(@:%.ok=%/jt.log) > /dev/null; echo "test passed at `date`" > $@ # These tests are not included by default because by their nature they are so # slow to run. # TESTS.jtreg += \ $(BUILDDIR)/TimeoutTest.agentvm.ok \ $(BUILDDIR)/TimeoutTest.othervm.ok testtimeouts: \ $(BUILDDIR)/TimeoutTest.ok \ $(BUILDDIR)/TimeoutTest.agentvm.ok \ $(BUILDDIR)/TimeoutTest.othervm.ok jtreg-jtreg4.2-b01/make/tests/buildWildcards.gmk0000644000000000000000000000302712670642364021573 0ustar rootroot00000000000000# # Copyright (c) 1997, 2014, 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. # $(BUILDDIR)/BuildWildcards.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/bin/jtreg $(RM) $(@:%.ok=%) ; $(MKDIR) $(@:%.ok=%) $(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ -w:$(@:%.ok=%)/work -r:$(@:%.ok=%)/report \ -jdk:$(J2SEHOME) \ $(TESTDIR)/javatest/regtest/data/build-wildcards \ > $(@:%.ok=%/jt.log) 2>&1 echo "test passed at `date`" > $@ jtreg-jtreg4.2-b01/make/tests/coverage.gmk0000644000000000000000000000376512670642364020443 0ustar rootroot00000000000000# # Copyright (c) 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. 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 target collects coverage data for jtreg itself, by creating # an instrumented copy of jtreg.jar, then running the jtreg tests # (as defined by "make test"), collecting the results with the grabber # and finally generating a report. COVDIR = $(BUILDDIR)/coverage coverage: $(RM) $(COVDIR) $(MAKE) BUILDDIR=$(COVDIR)/work $(JCOV) instr -template $(COVDIR)/template.xml $(COVDIR)/work/images/jtreg/lib/jtreg.jar echo "Class-Path: javatest.jar jh.jar jcov_network_saver.jar" > $(COVDIR)/manifest $(JAR) umf $(COVDIR)/manifest $(COVDIR)/work/images/jtreg/lib/jtreg.jar $(JCOV) grabber -verbose -template $(COVDIR)/template.xml -output $(COVDIR)/results.xml & sleep 5 - $(MAKE) BUILDDIR=$(COVDIR)/work -k test $(JCOV) grabberManager -stop $(JCOV) repgen -source $(TOPDIR)/src/share/classes -output $(COVDIR)/report $(COVDIR)/results.xml jtreg-jtreg4.2-b01/make/tests/i18n.com.sun.javatest.diff.gmk0000644000000000000000000000342612670642364023531 0ustar rootroot00000000000000# # Copyright (c) 2007, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/i18n.com.sun.javatest.diff.ok: \ $(JAVAFILES.com.sun.javatest.diff) \ $(JAVADIR)/com/sun/javatest/diff/i18n.properties \ $(BUILDDIR)/classes.com.sun.javatest.diff.ok \ checkI18NProps.sh CLASSPATH="$(CLASSDIR)$(PS)$(JAVADIR)$(PS)$(JAVATEST_JAR)" \ $(J2SEJAVA) -Djavatest.i18n.log=com.sun.javatest.diff \ com.sun.javatest.diff.Main -help all \ > $(@:%.ok=%.log) 2>&1 $(SH) checkI18NProps.sh $(JAVADIR)/com/sun/javatest/diff $(@:%.ok=%.log) echo $@ passed at `date` > $@ TESTS.jtdiff += $(BUILDDIR)/i18n.com.sun.javatest.diff.ok jtreg-jtreg4.2-b01/make/tests/i18n.com.sun.javatest.regtest.gmk0000644000000000000000000000417112670642364024274 0ustar rootroot00000000000000# # Copyright (c) 1997, 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. 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. # ifdef JCOV_HOME JCOV_JARS=\ -Djcov.jar=$(JCOV_HOME)/lib/jcov.jar \ -Djcov_network_saver.jar=$(JCOV_HOME)/lib/jcov_network_saver.jar else STATIC_JCOV_KEYS=\ $(GREP) help.jcov $(JAVADIR)/com/sun/javatest/regtest/i18n.properties | $(SED) -e 's/\(.*\)=.*/i18n: \1/' >> $(@:%.ok=%.log) endif $(BUILDDIR)/i18n.com.sun.javatest.regtest.ok: \ $(JAVAFILES.com.sun.javatest.regtest:%=$(JAVADIR)/com/sun/javatest/regtest/%) \ $(JAVADIR)/com/sun/javatest/regtest/i18n.properties \ $(BUILDDIR)/classes.com.sun.javatest.regtest.ok \ checkI18NProps.sh CLASSPATH="$(CLASSDIR)$(PS)$(JAVADIR)$(PS)$(JAVATEST_JAR)$(PS)$(JAVAHELP_JAR)" \ $(J2SEJAVA) -Djavatest.i18n.log=com.sun.javatest.regtest \ $(JCOV_JARS) \ com.sun.javatest.regtest.Main -help all \ > $(@:%.ok=%.log) 2>&1 $(STATIC_JCOV_KEYS) $(SH) checkI18NProps.sh $(JAVADIR)/com/sun/javatest/regtest $(@:%.ok=%.log) echo $@ passed at `date` > $@ TESTS.jtreg += $(BUILDDIR)/i18n.com.sun.javatest.regtest.ok jtreg-jtreg4.2-b01/make/tests/jcov.gmk0000644000000000000000000000522212670642364017577 0ustar rootroot00000000000000# # Copyright (c) 2012, 2015, 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. # #---------------------------------------------------------------------- $(BUILDDIR)/jcov.othervm.ok \ $(BUILDDIR)/jcov.agentvm.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar \ $(JTREG_IMAGEDIR)/lib/javatest.jar \ $(JTREG_IMAGEDIR)/lib/jh.jar \ $(JTREG_IMAGEDIR)/lib/jcov.jar \ $(JTREG_IMAGEDIR)/lib/jcov_network_saver.jar $(RM) $(@:%.ok=%/lib) $(@:%.ok=%/work) $(@:%.ok=%/report) $(MKDIR) -p $(@:%.ok=%/lib) $(J2SEJAVAC) -d $(@:%.ok=%/lib) `find $(TESTDIR)/javatest/regtest/jcov/src/ -name \*.java` $(JDK16HOME)/bin/java \ -Djavatest.regtest.showCmd=true \ -Djavatest.regtest.debugChild=true \ -Djavatest.regtest.showJCov=true \ -Djavatest.regtest.traceAgent=true \ -jar $(ABS_JTREG_IMAGEJARDIR)/jtreg.jar \ -w:$(@:%.ok=%/work) \ -r:$(@:%.ok=%/report) \ $(@:$(BUILDDIR)/jcov.%.ok=-%) \ -jcov/classes:$(@:%.ok=%/lib) \ -jcov/source:$(TESTDIR)/javatest/regtest/jcov/src/ \ $(TESTDIR)/javatest/regtest/jcov/test/ \ > $(@:%.ok=%/log 2>&1) \ || (cat $(@:%.ok=%/log) ; exit 1) if [ ! -r $(@:%.ok=%/work)/jcov/template.xml ]; then exit 1; fi if [ ! -r $(@:%.ok=%/work)/jcov/results.xml ]; then exit 1; fi if [ ! -r $(@:%.ok=%/work)/jcov/classes/com/acme/Library.class ]; then exit 1; fi if [ ! -r $(@:%.ok=%/report)/jcov/index.html ]; then exit 1; fi if [ ! -r $(@:%.ok=%/report)/jcov/com/acme/Library.html ]; then exit 1; fi echo $@ passed at `date` > $@ ifdef JCOV_HOME TESTS.jtreg += \ $(BUILDDIR)/jcov.othervm.ok \ $(BUILDDIR)/jcov.agentvm.ok endif #JCOV_HOME jtreg-jtreg4.2-b01/make/tests/jcovtest.gmk0000644000000000000000000000351512670642364020502 0ustar rootroot00000000000000# # Copyright (c) 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. 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. # ifdef JCOV_HOME $(BUILDDIR)/jcovtest.ok: \ $(JTREG_IMAGEDIR)/lib/jtreg.jar $(RM) $(BUILDDIR)/jcov $(MKDIR) $(BUILDDIR)/jcov $(JCOV) Instr \ -include com/sun/javatest/regtest/.\* \ -template $(BUILDDIR)/jcov/template.xml \ -implantrt $(JCOV_HOME)/lib/jcov_network_saver.jar \ $(JTREG_IMAGEDIR)/lib/jtreg.jar $(JCOV) Grabber \ -output $(BUILDDIR)/jcov/result.xml \ -template $(BUILDDIR)/jcov/template.xml & \ $(MAKE) test ; \ $(JCOV) GrabberManager -stop $(JCOV) RepGen \ -sourcepath $(JAVADIR) \ -output $(BUILDDIR)/jcov/report \ $(BUILDDIR)/jcov/result.xml echo "test passed at `date`" > $@ # convenience target test.jcov: $(BUILDDIR)/jcovtest.ok endif jtreg-jtreg4.2-b01/src/share/bin/jtdiff.sh0000644000000000000000000001024212670642364020320 0ustar rootroot00000000000000#!/bin/sh # # Copyright (c) 1998, 2015, 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. # # Usage: # jtdiff ...args.... # # jtdiff requires a version of Java equivalent to JDK 1.5.0 or higher. # $JT_HOME can be used to specify the jtdiff installation directory # (e.g. /usr/local/java/jct-tools/3.2.2) # # $JT_JAVA is used to specify the version of java to use when running JavaTest # (e.g. /usr/local/java/jdk1.5.0/solaris-sparc/bin/java) # # jtdiff also provides an Ant task for direct invocation from Ant. # Determine jtdiff/JavaTest installation directory if [ -n "$JT_HOME" ]; then if [ ! -r $JT_HOME/lib/jtreg.jar ];then echo "Invalid JT_HOME=$JT_HOME. Cannot find or read $JT_HOME/lib/jtreg.jar" exit 1; fi else # Deduce where script is installed # - should work on most derivatives of Bourne shell, like ash, bash, ksh, # sh, zsh, etc, including on Windows, MKS (ksh) and Cygwin (ash or bash) if type -p type 1>/dev/null 2>&1 && test -z "`type -p type`" ; then myname=`type -p "$0"` elif type type 1>/dev/null 2>&1 ; then myname=`type "$0" | sed -e 's/^.* is a tracked alias for //' -e 's/^.* is //'` elif whence whence 1>/dev/null 2>&1 ; then myname=`whence "$0"` fi mydir=`dirname "$myname"` p=`cd "$mydir" ; pwd` while [ -n "$p" -a "$p" != "/" ]; do if [ -r "$p"/lib/jtreg.jar ]; then JT_HOME="$p" ; break; fi p=`dirname "$p"` done if [ -z "$JT_HOME" ]; then echo "Cannot determine JT_HOME; please set it explicitly"; exit 1 fi fi # Normalize JT_HOME if using Cygwin case "`uname -s`" in CYGWIN* ) cygwin=1 ; JT_HOME=`cygpath -a -m "$JT_HOME"` ;; esac # Separate out -J* options for the JVM # Unset IFS and use newline as arg separator to preserve spaces in args DUALCASE=1 # for MKS: make case statement case-sensitive (6709498) saveIFS="$IFS" nl=' ' for i in "$@" ; do IFS= if [ -n "$cygwin" ]; then i=`echo $i | sed -e 's|/cygdrive/\([A-Za-z]\)/|\1:/|'` ; fi case $i in -J* ) javaOpts=$javaOpts$nl`echo $i | sed -e 's/^-J//'` ;; * ) jtdiffOpts=$jtdiffOpts$nl$i ;; esac IFS="$saveIFS" done unset DUALCASE # Determine java for jtdiff, from JT_JAVA, JAVA_HOME, java if [ -n "$JT_JAVA" ]; then if [ -d "$JT_JAVA" ]; then JT_JAVA="$JT_JAVA/bin/java" fi elif [ -n "$JAVA_HOME" ]; then JT_JAVA="$JAVA_HOME/bin/java" else JT_JAVA=java fi # Verify java version (1.)5 or newer used to run jtdiff version=`"$JT_JAVA" -classpath "${JT_HOME}/lib/jtreg.jar" com.sun.javatest.regtest.agent.GetSystemProperty java.version 2>&1 | grep 'java.version=' | sed -e 's/^.*=//' -e 's/^1\.//' -e 's/\([1-9][0-9]*\).*/\1/'` if [ -z "$version" ]; then echo "Cannot determine version of java to run jtdiff" exit 1; elif [ "$version" -lt 5 ]; then echo "java version 5 or later is required to run jtdiff" exit 1; fi # And finally ... IFS=$nl "${JT_JAVA:-${JAVA_HOME:+$JAVA_HOME/bin/}java}" \ $javaOpts \ -Dprogram=`basename "$0"` \ -cp "${JT_HOME}/lib/jtreg.jar" \ com.sun.javatest.diff.Main \ $jtdiffOpts jtreg-jtreg4.2-b01/src/share/bin/jtreg.sh0000644000000000000000000001136312670642364020172 0ustar rootroot00000000000000#!/bin/sh # # Copyright (c) 1998, 2015, 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. # # Usage: # jtreg ...args.... # Run the application via the regression test-suite front end # with the given arguments. # The Java runtime used to run JavaTest is found as follows: # - $JT_JAVA is used, if it is set # - Otherwise, $JAVA_HOME/bin/java is used if $JAVA_HOME is set # (cf JDK.) # - Otherwise, "java" is used # # jtreg requires a version of Java equivalent to JDK 1.5.0 or higher. # $JT_HOME can be used to specify the jtreg installation directory # (e.g. /usr/local/java/jct-tools/3.2.2) # # $JT_JAVA is used to specify the version of java to use when running JavaTest # (e.g. /usr/local/java/jdk1.5.0/solaris-sparc/bin/java) # # You can also run the jar file directly, as in # java -jar /lib/jtreg.jar ...args... # # jtreg also provides Ant tasks; see the online help for details. # E.g. jtreg -onlineHelp ant # Determine jtreg/JavaTest installation directory if [ -n "$JT_HOME" ]; then if [ ! -r $JT_HOME/lib/jtreg.jar ];then echo "Invalid JT_HOME=$JT_HOME. Cannot find or read $JT_HOME/lib/jtreg.jar" exit 1; fi else # Deduce where script is installed # - should work on most derivatives of Bourne shell, like ash, bash, ksh, # sh, zsh, etc, including on Windows, MKS (ksh) and Cygwin (ash or bash) if type -p type 1>/dev/null 2>&1 && test -z "`type -p type`" ; then myname=`type -p "$0"` elif type type 1>/dev/null 2>&1 ; then myname=`type "$0" | sed -e 's/^.* is a tracked alias for //' -e 's/^.* is //'` elif whence whence 1>/dev/null 2>&1 ; then myname=`whence "$0"` fi mydir=`dirname "$myname"` p=`cd "$mydir" ; pwd` while [ -n "$p" -a "$p" != "/" ]; do if [ -r "$p"/lib/jtreg.jar ]; then JT_HOME="$p" ; break; fi p=`dirname "$p"` done if [ -z "$JT_HOME" ]; then echo "Cannot determine JT_HOME; please set it explicitly"; exit 1 fi fi # Normalize JT_HOME if using Cygwin case "`uname -s`" in CYGWIN* ) cygwin=1 ; JT_HOME=`cygpath -a -m "$JT_HOME"` ;; esac # Separate out -J* options for the JVM # Note jdk as possible default to run jtreg # Unset IFS and use newline as arg separator to preserve spaces in args DUALCASE=1 # for MKS: make case statement case-sensitive (6709498) saveIFS="$IFS" nl=' ' for i in "$@" ; do IFS= if [ -n "$cygwin" ]; then i=`echo $i | sed -e 's|/cygdrive/\([A-Za-z]\)/|\1:/|'` ; fi case $i in -jdk:* ) jdk="`echo $i | sed -e 's/^-jdk://'`" jtregOpts=$jtregOpts$nl$i ;; -J* ) javaOpts=$javaOpts$nl`echo $i | sed -e 's/^-J//'` ;; * ) jtregOpts=$jtregOpts$nl$i ;; esac IFS="$saveIFS" done unset DUALCASE # Determine java for jtreg, from JT_JAVA, JAVA_HOME, -jdk, java if [ -n "$JT_JAVA" ]; then if [ -d "$JT_JAVA" ]; then JT_JAVA="$JT_JAVA/bin/java" fi elif [ -n "$JAVA_HOME" ]; then JT_JAVA="$JAVA_HOME/bin/java" elif [ -n "$jdk" ]; then JT_JAVA="$jdk/bin/java" else JT_JAVA=java fi # Verify java version (1.)5 or newer used to run jtreg version=`"$JT_JAVA" -classpath "${JT_HOME}/lib/jtreg.jar" com.sun.javatest.regtest.agent.GetSystemProperty java.version 2>&1 | grep 'java.version=' | sed -e 's/^.*=//' -e 's/^1\.//' -e 's/\([1-9][0-9]*\).*/\1/'` if [ -z "$version" ]; then echo "Cannot determine version of java to run jtreg" exit 1; elif [ "$version" -lt 5 ]; then echo "java version 5 or later is required to run jtreg" exit 1; fi # And finally ... IFS=$nl "${JT_JAVA}" \ $javaOpts \ -Dprogram=`basename "$0"` \ -jar "${JT_HOME}/lib/jtreg.jar" \ $jtregOpts jtreg-jtreg4.2-b01/src/share/classes/com/sun/javatest/diff/Diff.java0000644000000000000000000001273512670642364025243 0ustar rootroot00000000000000/* * Copyright (c) 2007, 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. */ package com.sun.javatest.diff; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import com.sun.javatest.Status; import com.sun.javatest.TestResult; import com.sun.javatest.TestSuite; import com.sun.javatest.WorkDirectory; import com.sun.javatest.util.I18NResourceBundle; public abstract class Diff { public abstract boolean report(File outFile) throws Fault, InterruptedException; protected boolean diff(List files, File outFile) throws Fault, InterruptedException { this.outFile = outFile; List list = new ArrayList(); for (File f: files) list.add(open(f)); PrintWriter prevOut = out; if (outFile != null) { try { out = new PrintWriter(new BufferedWriter(new FileWriter(outFile))); // FIXME don't want to use PrintWriter } catch (IOException e) { throw new Fault(i18n, "diff.cantOpenFile", outFile, e); } } try { initComparator(); initReporter(); reporter.setTitle(title); reporter.setComparator(comparator); reporter.setReaders(list); List testCounts = new ArrayList(); MultiMap table = new MultiMap(); for (DiffReader r: list) { int index = table.addColumn(r.getFile().getPath()); int[] counts = new int[Status.NUM_STATES]; for (TestResult tr: r) { table.addRow(index, tr.getTestName(), tr); counts[tr.getStatus().getType()]++; } testCounts.add(counts); } reporter.setTestCounts(testCounts); try { reporter.write(table); } catch (IOException e) { throw new Fault(i18n, "diff.ioError", e); } return (reporter.diffs == 0); } finally { if (out != prevOut) { // try { out.close(); // } catch (IOException e) { // throw new Fault(i18n, "main.ioError", e); // } out = prevOut; } } } protected void initFormat() { if (format == null && outFile != null) { String name = outFile.getName(); int dot = name.lastIndexOf("."); if (dot != -1) format = name.substring(dot + 1).toLowerCase(); } } protected void initReporter() throws Fault { if (reporter == null) { try { initFormat(); if (format != null && format.equals("html")) reporter = new HTMLReporter(out); else reporter = new SimpleReporter(out); } catch (IOException e) { throw new Fault(i18n, "diff.cantOpenReport", e); } } } protected void initComparator() { if (comparator == null) comparator = new StatusComparator(includeReason); } protected DiffReader open(File f) throws Fault { if (!f.exists()) throw new Fault(i18n, "main.cantFindFile", f); try { if (WorkDirectoryReader.accepts(f)) return new WorkDirectoryReader(f); if (ReportReader.accepts(f)) return new ReportReader(f); throw new Fault(i18n, "main.unrecognizedFile", f); } catch (TestSuite.Fault e) { throw new Fault(i18n, "main.cantOpenFile", f, e); } catch (WorkDirectory.Fault e) { throw new Fault(i18n, "main.cantOpenFile", f, e); } catch (IOException e) { throw new Fault(i18n, "main.cantOpenFile", f, e); } } protected File outFile; protected PrintWriter out; protected Comparator comparator; protected Reporter reporter; protected boolean includeReason; protected String format; protected String title; private static I18NResourceBundle i18n = I18NResourceBundle.getBundleForClass(Diff.class); } jtreg-jtreg4.2-b01/src/share/classes/com/sun/javatest/diff/DiffReader.java0000644000000000000000000000273612670642364026366 0ustar rootroot00000000000000/* * Copyright (c) 2007, 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. */ package com.sun.javatest.diff; import java.io.File; import com.sun.javatest.TestResult; /** * Interface for reading a series of test-status results. */ public interface DiffReader extends Iterable { File getWorkDirectory(); String getFileType(); File getFile(); } jtreg-jtreg4.2-b01/src/share/classes/com/sun/javatest/diff/Fault.java0000644000000000000000000000304312670642364025436 0ustar rootroot00000000000000/* * Copyright (c) 2007, 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. */ package com.sun.javatest.diff; import com.sun.javatest.util.I18NResourceBundle; /** * Exception to report a problem while executing in Main. */ public class Fault extends Exception { static final long serialVersionUID = 1607979458544175906L; Fault(I18NResourceBundle i18n, String s, Object... args) { super(i18n.getString(s, args)); } } jtreg-jtreg4.2-b01/src/share/classes/com/sun/javatest/diff/HTMLReporter.java0000644000000000000000000002764712670642364026672 0ustar rootroot00000000000000/* * Copyright (c) 2007, 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. */ package com.sun.javatest.diff; import java.io.File; import java.io.IOException; import java.io.Writer; import java.util.Date; import java.util.Map; import com.sun.javatest.Status; import com.sun.javatest.TestResult; import com.sun.javatest.util.I18NResourceBundle; import static com.sun.javatest.util.HTMLWriter.*; /* * TODO: import CSS * TODO: links to .jtr files */ /** * Report differences to an HTML file. */ public class HTMLReporter extends Reporter { /** Creates a new instance of HTMLReporter */ public HTMLReporter(Writer out) throws IOException { this.out = new HTMLWriter(out, DOCTYPE); this.out.setI18NResourceBundle(i18n); } public void write(MultiMap table) throws IOException { this.table = table; size = table.getColumns(); startReport(title); out.startTag(H1); if (title == null) out.writeI18N("html.head.notitle"); else out.writeI18N("html.head.title", title); out.endTag(H1); writeIndexTable(); writeMainTable(); writeSummary(); endReport(); } protected void startReport(String title) throws IOException { out.startTag(HTML); writeHead(title); out.startTag(BODY); } protected void endReport() throws IOException { out.startTag(HR); out.writeI18N("html.generatedAt", new Date()); out.endTag(BODY); out.endTag(HTML); out.flush(); } protected void writeHead(String title) throws IOException { out.startTag(HEAD); out.startTag(TITLE); if (title == null) out.writeI18N("html.head.notitle"); else out.writeI18N("html.head.title", title); out.endTag(TITLE); out.startTag(STYLE); out.writeAttr(TYPE, "text/css"); out.write("\n"); out.write("table { background-color:white }"); out.write("tr.head { background-color:#dddddd }"); out.write("tr.odd { background-color:#eeeeee }"); out.write("tr.even { background-color:white } "); out.write("td { padding: 0 .5em }"); out.write("td.pass { background-color:#ddffdd } "); out.write("td.fail { background-color:#ffdddd } "); out.write("td.error { background-color:#ddddff } "); out.write("td.notRun { background-color:#dddddd } "); out.write("th { padding: 0 .5em }"); out.write("hr { margin-top:30px; }"); out.write("\n"); out.endTag(STYLE); out.endTag(HEAD); } private void writeIndexTable() throws IOException { out.startTag(H2); out.writeI18N("html.head.sets"); out.endTag(H2); out.startTag(TABLE); out.writeAttr(FRAME, BOX); out.writeAttr(RULES, GROUPS); out.startTag(THEAD); out.startTag(TR); out.writeAttr(CLASS, HEAD); out.startTag(TH); out.writeI18N("html.th.set"); out.endTag(TH); out.startTag(TH); out.writeI18N("html.th.location"); out.endTag(TH); writeIndexTableInfoHeadings(); // out.startTag(TH); // out.writeI18N("html.th.type"); // out.endTag(TH); for (int c = 0; c < Status.NUM_STATES; c++) { out.startTag(TH); switch (c) { case Status.PASSED: out.writeI18N("html.th.pass"); break; case Status.FAILED: out.writeI18N("html.th.fail"); break; case Status.ERROR: out.writeI18N("html.th.error"); break; default: out.writeI18N("html.th.notRun"); break; } out.endTag(TH); } out.startTag(TH); out.writeI18N("html.th.total"); out.endTag(TH); out.endTag(TR); out.endTag(THEAD); out.startTag(TBODY); for (int i = 0; i < size; i++) { out.startTag(TR); out.writeAttr(CLASS, (i % 2 == 0 ? EVEN : ODD)); out.startTag(TD); out.write(String.valueOf(i + 1)); out.endTag(TD); out.startTag(TD); out.write(table.getColumnName(i)); writeIndexTableInfoValues(table.getColumnName(i)); out.endTag(TD); // out.startTag(TD); // out.write("??"); // out.endTag(TD); int total = 0; int[] counts = testCounts.get(i); for (int c = 0; c < Status.NUM_STATES; c++) { out.startTag(TD); if (counts[c] > 0) out.write(String.valueOf(counts[c])); else out.writeEntity(" "); total += counts[c]; out.endTag(TD); } out.startTag(TD); out.write(String.valueOf(total)); out.endTag(TD); out.endTag(TR); } out.endTag(TBODY); out.endTag(TABLE); } protected void writeIndexTableInfoHeadings() throws IOException { } protected void writeIndexTableInfoValues(String name) throws IOException { } private void writeMainTable() throws IOException { diffs = 0; for (Map.Entry> e: table.entrySet()) { String testName = e.getKey(); MultiMap.Entry result = e.getValue(); if (result.allEqual(comparator)) continue; if (diffs == 0) { out.startTag(H2); out.writeI18N("html.head.differences"); out.endTag(H2); out.startTag(TABLE); out.writeAttr(FRAME, BOX); out.writeAttr(RULES, GROUPS); out.startTag(THEAD); out.startTag(TR); out.writeAttr(CLASS, HEAD); out.startTag(TH); out.writeI18N("html.th.test"); out.endTag(TH); for (int i = 0; i < result.getSize(); i++) { out.startTag(TH); if (compact) out.write(String.valueOf(i + 1)); else out.writeI18N("html.th.setN", i + 1); out.endTag(TH); } out.endTag(TR); out.endTag(THEAD); out.startTag(TBODY); } out.startTag(TR); out.writeAttr(CLASS, (diffs % 2 == 0 ? EVEN : ODD)); out.startTag(TD); out.write(testName); out.endTag(TD); for (int i = 0; i < result.getSize(); i++) { TestResult tr = result.get(i); File trFile = (tr == null ? null : tr.getFile()); if (trFile == null) { File wd = readers.get(i).getWorkDirectory(); if (wd != null) trFile = new File(wd, tr.getWorkRelativePath()); } out.startTag(TD); Status s = (tr == null ? null : tr.getStatus()); out.writeAttr(CLASS, getClassAttr(s)); String text = getText(s); if (trFile != null && trFile.exists()) { out.startTag(A); out.writeAttr(HREF, trFile.toURI().toString()); if (text.startsWith("&")) out.writeEntity(text); else out.write(text); out.endTag(A); } else { if (text.startsWith("&")) out.writeEntity(text); else out.write(text); } out.endTag(TD); } out.endTag(TR); diffs++; } if (diffs > 0) { out.endTag(TBODY); out.endTag(TABLE); } } private void writeSummary() throws IOException { out.startTag(P); if (diffs == 0) out.writeI18N("html.diffs.none"); else out.writeI18N("html.diffs.count", diffs); out.endTag(P); } protected String getClassAttr(Status s) { switch (s == null ? Status.NOT_RUN : s.getType()) { case Status.PASSED: return PASS; case Status.FAILED: return FAIL; case Status.ERROR: return ERROR; default: return NOT_RUN; } } protected String getText(Status s) { if (statusStrings == null) { statusStrings = new String[Status.NUM_STATES]; if (compact) { statusStrings[Status.PASSED] = i18n.getString("html.pass.compact"); statusStrings[Status.FAILED] = i18n.getString("html.fail.compact"); statusStrings[Status.ERROR] = i18n.getString("html.error.compact"); statusStrings[Status.NOT_RUN] = i18n.getString("html.notRun.compact"); } else { statusStrings[Status.PASSED] = i18n.getString("html.pass"); statusStrings[Status.FAILED] = i18n.getString("html.fail"); statusStrings[Status.ERROR] = i18n.getString("html.error"); statusStrings[Status.NOT_RUN] = i18n.getString("html.notRun"); } } return statusStrings[s == null ? Status.NOT_RUN : s.getType()]; } private String[] statusStrings; protected final HTMLWriter out; private MultiMap table; private int size; private static final String DOCTYPE = ""; // HTML tags private static final String THEAD = "thead"; private static final String TBODY = "tbody"; // HTML attribute names private static final String CLASS = "class"; private static final String FRAME = "frame"; private static final String RULES = "rules"; // HTML attribute values private static final String BOX = "box"; private static final String GROUPS = "groups"; // HTML class values private static final String HEAD = "head"; private static final String ODD = "odd"; private static final String EVEN = "even"; private static final String PASS = "pass"; private static final String FAIL = "fail"; private static final String ERROR = "error"; private static final String NOT_RUN = "notRun"; private boolean compact = Boolean.TRUE.equals(Boolean.getBoolean("jtdiff.html.compact")); private static I18NResourceBundle i18n = I18NResourceBundle.getBundleForClass(HTMLReporter.class); } jtreg-jtreg4.2-b01/src/share/classes/com/sun/javatest/diff/HTMLWriter.java0000644000000000000000000005037012670642364026331 0ustar rootroot00000000000000/* * Copyright (c) 1996, 2008, 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. */ package com.sun.javatest.diff; import java.io.BufferedWriter; import java.io.File; import java.io.IOException; import java.io.Writer; import java.net.URL; import com.sun.javatest.util.I18NResourceBundle; /** * A class to facilitate writing HTML via a stream. */ public class HTMLWriter { /** * Create an HTMLWriter object, using a default doctype for HTML 3.2. * @param out a Writer to which to write the generated HTML * @throws IOException if there is a problem writing to the underlying stream */ public HTMLWriter(Writer out) throws IOException { this(out, ""); } /** * Create an HTMLWriter object, using a specifed doctype header. * @param out a Writer to which to write the generated HTML * @param docType a string containing a doctype header for the HTML to be generetaed * @throws IOException if there is a problem writing to the underlying stream */ public HTMLWriter(Writer out, String docType) throws IOException { if (out instanceof BufferedWriter) this.out = (BufferedWriter) out; else this.out = new BufferedWriter(out); this.out.write(docType); this.out.newLine(); } /** * Create an HTMLWriter object, using a specified bundle for l0calizing messages. * @param out a Writer to which to write the generated HTML * @param i18n a resource bundle to use to localize messages * @throws IOException if there is a problem writing to the underlying stream */ public HTMLWriter(Writer out, I18NResourceBundle i18n) throws IOException { this(out); this.i18n = i18n; } /** * Create an HTMLWriter object, using a specifed doctype header and * using a specified bundle for l0calizing messages. * @param out a Writer to which to write the generated HTML * @param docType a string containing a doctype header for the HTML to be generetaed * @param i18n a resource bundle to use to localize messages * @throws IOException if there is a problem writing to the underlying stream */ public HTMLWriter(Writer out, String docType, I18NResourceBundle i18n) throws IOException { this(out, docType); this.i18n = i18n; } /** * Set the reource bundle to be used for localizing messages. * @param i18n the resource bundle to be used for localizing messages */ public void setI18NResourceBundle(I18NResourceBundle i18n) { this.i18n = i18n; } /** * Flush the stream, and the underlying output stream. * @throws IOException if there is a problem writing to the underlying stream */ public void flush() throws IOException { out.flush(); } /** * Close the stream, and the underlying output stream. * @throws IOException if there is a problem closing the underlying stream */ public void close() throws IOException { out.close(); } /** * Write a newline to the underlying output stream. * @throws IOException if there is a problem writing to the underlying stream */ public void newLine() throws IOException { out.newLine(); } /** * Start an HTML tag. If a prior tag has been started, it will * be closed first. Once a tag has been opened, attributes for the * tag may be written out, followed by body content before finally * ending the tag. * @param tag the tag to be started * @throws IOException if there is a problem writing to the underlying stream * @see #writeAttr * @see #write * @see #endTag */ public void startTag(String tag) throws IOException { if (state == IN_TAG) { out.write(">"); state = IN_BODY; } newLine(); out.write("<"); out.write(tag); state = IN_TAG; } /** * Finish an HTML tag. It is expected that a call to endTag will match * a corresponding earlier call to startTag, but there is no formal check * for this. * @param tag the tag to be closed. * @throws IOException if there is a problem writing to the underlying stream */ public void endTag(String tag) throws IOException { if (state == IN_TAG) { out.write(">"); state = IN_BODY; out.newLine(); } out.write(""); //out.newLine(); // PATCHED, jjg state = IN_BODY; } /** * Finish an empty element tag, such as a META, BASE or LINK tag. * This is expected to correspond with a startTag. * @param tag the tag which is being closed. this is only useful for * validation, it is not written out * @throws IllegalStateException if this call does not follow startTag * (stream is not currently inside a tag) * @throws IOException if there is a problem writing to the underlying stream */ public void endEmptyTag(String tag) throws IOException { if (state != IN_TAG) throw new IllegalStateException(); out.write(">"); state = IN_BODY; out.newLine(); } /** * Write an attribute for a tag. A tag must previously have been started. * All tag attributes must be written before any body text is written. * The value will be quoted if necessary when writing it to the underlying * stream. No check is made that the attribute is valid for the current tag. * @param name the name of the attribute to be written * @param value the value of the attribute to be written * @throws IllegalStateException if the stream is not in a state to * write attributes -- e.g. if this call does not follow startTag or other * calls of writteAttr * @throws IOException if there is a problem writing to the underlying stream */ public void writeAttr(String name, String value) throws IOException { if (state != IN_TAG) throw new IllegalStateException(); out.write(" "); out.write(name); out.write("="); boolean alpha = true; for (int i = 0; i < value.length() && alpha; i++) alpha = Character.isLetter(value.charAt(i)); if (!alpha) out.write("\""); out.write(value); if (!alpha) out.write("\""); } /** * Write an attribute for a tag. A tag must previously have been started. * All tag attributes must be written before any body text is written. * The value will be quoted if necessary when writing it to the underlying * stream. No check is made that the attribute is valid for the current tag. * @param name the name of the attribute to be written * @param value the value of the attribute to be written * @throws IllegalStateException if the stream is not in a state to * write attributes -- e.g. if this call does not follow startTag or other * calls of writteAttr * @throws IOException if there is a problem writing to the underlying stream */ public void writeAttr(String name, int value) throws IOException { writeAttr(name, Integer.toString(value)); } /** * Write a line of text, followed by a newline. * The text will be escaped as necessary. * @param text the text to be written. * @throws IOException if there is a problem closing the underlying stream */ public void writeLine(String text) throws IOException { write(text); out.newLine(); } /** * Write body text, escaping it as necessary. * If this call follows a call of startTag, the open tag will be * closed -- meaning that no more attributes can be written until another * tag is started. If the text value is null, the current tag will still * be closed, but no other text will be written. * @param text the text to be written, may be null or zero length. * @throws IOException if there is a problem writing to the underlying stream */ public void write(String text) throws IOException { if (state == IN_TAG) { out.write(">"); state = IN_BODY; } if (text == null) return; // check to see if there are any special characters boolean specialChars = false; for (int i = 0; i < text.length() && !specialChars; i++) { switch (text.charAt(i)) { case '<': case '>': case '&': specialChars = true; } } // if there are special characters write the string character at a time; // otherwise, write it out as is if (specialChars) { for (int i = 0; i < text.length(); i++) { char c = text.charAt(i); switch (c) { case '<': out.write("<"); break; case '>': out.write(">"); break; case '&': out.write("&"); break; default: out.write(c); } } } else out.write(text); } /** * Write a basic HTML entity, such as   or { . * @param entity the entity to write * @throws IOException if there is a problem writing to the underlying stream */ public void writeEntity(String entity) throws IOException { if (state == IN_TAG) { out.write(">"); state = IN_BODY; } out.write(entity); } /** * Write an image tag, using a specified path for the image source attribute. * @param imagePath the path for the image source * @throws IOException if there is a problem closing the underlying stream */ public void writeImage(String imagePath) throws IOException { startTag(IMAGE); writeAttr(SRC, imagePath); } /** * Write an image tag, using a specified path for the image source attribute. * @param imageURL the url for the image source * @throws IOException if there is a problem closing the underlying stream */ public void writeImage(URL imageURL) throws IOException { writeImage(imageURL.toString()); } /** * Write a hypertext link. * @param anchor the target for the link * @param body the body text for the link * @throws IOException if there is a problem closing the underlying stream */ public void writeLink(String anchor, String body) throws IOException { startTag(A); writeAttr(HREF, anchor); write(body); endTag(A); } /** * Write a hypertext link. * @param file the target for the link * @param body the body text for the link * @throws IOException if there is a problem closing the underlying stream */ public void writeLink(File file, String body) throws IOException { startTag(A); StringBuffer sb = new StringBuffer(); String path = file.getPath().replace(File.separatorChar, '/'); if (file.isAbsolute() && !path.startsWith("/")) sb.append('/'); sb.append(path); writeAttr(HREF, sb.toString()); write(body); endTag(A); } /** * Write a hypertext link. * @param file the target and body for the link * @throws IOException if there is a problem closing the underlying stream */ public void writeLink(File file) throws IOException { writeLink(file, file.getPath()); } /** * Write a hypertext link. * @param url the target for the link * @param body the body text for the link * @throws IOException if there is a problem closing the underlying stream */ public void writeLink(URL url, String body) throws IOException { startTag(A); writeAttr(HREF, url.toString()); write(body); endTag(A); } /** * Write the destination marker for a hypertext link. * @param anchor the destination marker for hypertext links * @param body the body text for the marker * @throws IOException if there is a problem closing the underlying stream */ public void writeLinkDestination(String anchor, String body) throws IOException { startTag(A); writeAttr(NAME, anchor); write(body); endTag(A); } /** * Write a parameter tag. * @param name the name of the parameter * @param value the value of the parameter * @throws IOException if there is a problem closing the underlying stream */ public void writeParam(String name, String value) throws IOException { startTag(PARAM); writeAttr(NAME, name); writeAttr(VALUE, value); } /** * Write a style attribute. * @param value the value for the style atrtribute * @throws IOException if there is a problem closing the underlying stream */ public void writeStyleAttr(String value) throws IOException { writeAttr(STYLE, value); } /** * Write a localized message, using a specified resource bundle. * @param i18n the resource bundle used to localize the message * @param key the key for the message to be localized * @throws IOException if there is a problem closing the underlying stream */ public void write(I18NResourceBundle i18n, String key) throws IOException { write(i18n.getString(key)); } /** * Write a localized message, using a specified resource bundle. * @param i18n the resource bundle used to localize the message * @param key the key for the message to be localized * @param arg an argument to be formatted into the localized message * @throws IOException if there is a problem closing the underlying stream */ public void write(I18NResourceBundle i18n, String key, Object arg) throws IOException { write(i18n.getString(key, arg)); } /** * Write a localized message, using a specified resource bundle. * @param i18n the resource bundle used to localize the message * @param key the key for the message to be localized * @param args arguments to be formatted into the localized message * @throws IOException if there is a problem closing the underlying stream */ public void write(I18NResourceBundle i18n, String key, Object[] args) throws IOException { write(i18n.getString(key, args)); } /** * Write a localized message, using the default resource bundle. * @param key the key for the message to be localized * @throws IOException if there is a problem closing the underlying stream */ public void writeI18N(String key) throws IOException { write(i18n.getString(key)); } /** * Write a localized message, using the default resource bundle. * @param key the key for the message to be localized * @param arg an argument to be formatted into the localized message * @throws IOException if there is a problem closing the underlying stream */ public void writeI18N(String key, Object arg) throws IOException { write(i18n.getString(key, arg)); } /** * Write a localized message, using the default resource bundle. * @param key the key for the message to be localized * @param args arguments to be formatted into the localized message * @throws IOException if there is a problem closing the underlying stream */ public void writeI18N(String key, Object[] args) throws IOException { write(i18n.getString(key, args)); } /** The HTML "a" tag. */ public static final String A = "a"; /** The HTML "align" attribute. */ public static final String ALIGN = "align"; /** The HTML "b" tag. */ public static final String B = "b"; /** The HTML "body" tag. */ public static final String BODY = "body"; /** The HTML "border" attribute. */ public static final String BORDER = "border"; /** The HTML "br" tag. */ public static final String BR = "br"; /** The HTML "classid" attribute. */ public static final String CLASSID = "classid"; /** The HTML "code" tag. */ public static final String CODE = "code"; /** The HTML "color" attribte. */ public static final String COLOR = "color"; /** The HTML "col" attribute value. */ public static final String COL = "col"; /** The HTML "font" tag. */ public static final String FONT = "font"; /** The HTML "h1" tag. */ public static final String H1 = "h1"; /** The HTML "h2" tag. */ public static final String H2 = "h2"; /** The HTML "h3" tag. */ public static final String H3 = "h3"; /** The HTML "h4" tag. */ public static final String H4 = "h4"; /** The HTML "head" tag. */ public static final String HEAD = "head"; /** The HTML "href" attribute. */ public static final String HREF = "href"; /** The HTML "html" tag. */ public static final String HTML = "html"; /** The HTML "hr" tag. */ public static final String HR = "hr"; /** The HTML "i" tag. */ public static final String I = "i"; /** The HTML "image" tag. */ public static final String IMAGE = "image"; /** The HTML "left" attribute value. */ public static final String LEFT = "left"; /** The HTML "li" tag. */ public static final String LI = "li"; /** The HTML "link" tag. */ public static final String LINK = "link"; /** The HTML "name" attribute. */ public static final String NAME = "name"; /** The HTML "object" tag. */ public static final String OBJECT = "object"; /** The HTML "p" tag. */ public static final String PARAM = "param"; /** The HTML "param" tag. */ public static final String P = "p"; /** The HTML "rel" attribute value. */ public static final String REL = "rel"; /** The HTML "right" attribute value. */ public static final String RIGHT = "right"; /** The HTML "row" attribute value. */ public static final String ROW = "row"; /** The HTML "small" tag. */ public static final String SMALL = "small"; /** The HTML "src" attribute. */ public static final String SRC = "src"; /** The HTML "scope" attribute. */ public static final String SCOPE = "scope"; /** The HTML "style" attribute. */ public static final String STYLE = "style"; /** The HTML "table" tag. */ public static final String TABLE = "table"; /** The HTML "td" tag. */ public static final String TD = "td"; /** The HTML "title"attribute. */ public static final String TITLE = "title"; /** The HTML "th" tag. */ public static final String TH = "th"; /** The HTML "top" attribute value. */ public static final String TOP = "top"; /** The HTML "tr" tag. */ public static final String TR = "tr"; /** The HTML "type" attribute. */ public static final String TYPE = "type"; /** The HTML "ul" tag. */ public static final String UL = "ul"; /** The HTML "valign" attribute. */ public static final String VALIGN = "valign"; /** The HTML "value" attribute. */ public static final String VALUE = "value"; private BufferedWriter out; private int state; private I18NResourceBundle i18n; private static final int IN_TAG = 1; private static final int IN_BODY = 2; } jtreg-jtreg4.2-b01/src/share/classes/com/sun/javatest/diff/Help.java0000644000000000000000000004304112670642364025255 0ustar rootroot00000000000000/* * Copyright (c) 2007, 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. */ package com.sun.javatest.diff; import java.awt.Component; import java.awt.Container; import java.awt.Window; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.PrintStream; import java.io.PrintWriter; import java.net.MalformedURLException; import java.net.URL; import java.text.DateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.Enumeration; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Set; import java.util.SortedMap; import java.util.TreeMap; import javax.help.DefaultHelpBroker; import javax.help.HelpSet; import javax.help.JHelpSearchNavigator; import javax.swing.JFrame; import javax.swing.JTextField; import com.sun.javatest.regtest.Option; import com.sun.javatest.util.ExitCount; import com.sun.javatest.util.HelpTree; import com.sun.javatest.util.I18NResourceBundle; import com.sun.javatest.util.WrapWriter; /** * Handles help options for main program */ public class Help { /** Creates a new instance of Help */ public Help(List