-
Enhancement
-
Resolution: Fixed
-
P3
-
9, 10
This does not mean that all test libraries shall go into top repo, there can still be repo local and test folder local test libraries. The idea is to give a home for the test libraries that make sense to share.
The best thing is if this new common location has the same layout as other things, lets use the java.base as an example. There is an addition however - it should also include the test folder for the test library tests.
Here are some examples of the suggested folder structure, basically making the test library a project of its own.
<jdk9 root>/test/lib/share/classes/ (package root)
<jdk9 root>/test/lib/share/conf/
<jdk9 root>/test/lib/share/native/
<jdk9 root>/test/lib-test // <test src root, same layout as lib, but without native redirection>
Package jdk.test.lib is the main package for all test libraries. Few things go at top level, but some will.
Package jdk.test.lib.processtools is the package for utilities for launching processes and analyzing the output.
<jdk9 root>/test/lib/share/classes/jdk/test/lib/processtools/OutputAnalyzer.java
<jdk9 root>/test/lib/share/classes/jdk/test/lib/processtools/OutputBuffer.java
<jdk9 root>/test/lib/share/classes/jdk/test/lib/processtools/ProcessTools.java
<jdk9 root>/test/lib/share/classes/jdk/test/lib/processtools/StreamPumper.java
<jdk9 root>/test/lib/share/classes/jdk/test/lib/processtools/JDKToolFinder.java
<jdk9 root>/test/lib/share/classes/jdk/test/lib/processtools/JDKToolLauncher.java
<jdk9 root>/test/lib-test/jdk/test/lib/processtools/OutputAnalyzerTest.java
Asserts can stay at top level.
<jdk9 root>/test/lib/share/classes/jdk/test/lib/Asserts.java
<jdk9 root>/test/lib-test/jdk/test/lib/AssertsTest.java
For VM specific info, it would have vm package. Note that the whitebox API moves here.
<jdk9 root>/test/lib/share/classes/jdk/test/lib/vm/InputArguments.java
<jdk9 root>/test/lib/share/classes/jdk/test/lib/vm/Platform.java
Ok, so then there are the stuff which just is a bucket of stuff and fluff.
A later exercise could be to break this class into better named and placed classes, but this is a start:
<jdk9 root>/test/lib/share/classes/jdk/test/lib/misc/Utils.java
- relates to
-
JDK-8081771 ProcessTool.createJavaProcessBuilder() needs new addTestVmAndJavaOptions argument
- Resolved
-
JDK-8139430 Refactor test library to decrease module dependencies of tests
- Resolved
-
JDK-8157957 ClassNotFoundException: jdk.test.lib.JDKToolFinder
- Resolved
-
JDK-8067013 Rename the com.oracle.java.testlibary package
- Closed
-
JDK-8114828 wrong class file error when compiling tests
- Closed
-
JDK-8202100 Merge vm/share/InMemoryJavaCompiler w/ jdk/test/lib/compiler/InMemoryJavaCompiler
- Resolved
-
JDK-8187806 executeTestJava handles -cp differently in jdk.test.lib.process.ProcessTools and jdk.testlibrary.ProcessTools
- Closed