changeset 489:9d5ac9297316

Add support for TEST.ROOT
author jjg
date Fri, 25 Jan 2019 11:21:12 -0800
parents e4bfad6eca4f
children b4ec8b1f32b4
files src/share/classes/com/sun/javatest/regtest/exec/RegressionScript.java src/share/classes/com/sun/javatest/regtest/exec/ShellAction.java src/share/doc/javatest/regtest/tag-spec.html test/rerun/std/AppletTest.agentvm.out test/rerun/std/AppletTest.othervm.out test/rerun/std/BuildTest.agentvm.out test/rerun/std/BuildTest.othervm.out test/rerun/std/CompileTest.agentvm.out test/rerun/std/CompileTest.othervm.out test/rerun/std/JUnitTest.agentvm.out test/rerun/std/JUnitTest.othervm.out test/rerun/std/MainTest.agentvm.out test/rerun/std/MainTest.othervm.out test/rerun/std/ShellTest.agentvm.out test/rerun/std/ShellTest.othervm.out test/rerun/std/TestNGTest.agentvm.out test/rerun/std/TestNGTest.othervm.out test/rerun/testng/TestNGTest.agentvm.out test/rerun/testng/TestNGTest.othervm.out
diffstat 19 files changed, 39 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/javatest/regtest/exec/RegressionScript.java	Thu Jan 17 18:13:30 2019 -0800
+++ b/src/share/classes/com/sun/javatest/regtest/exec/RegressionScript.java	Fri Jan 25 11:21:12 2019 -0800
@@ -1100,6 +1100,7 @@
         p.put("test.jdk", getTestJDK().getAbsolutePath());
         p.put("compile.jdk", getCompileJDK().getAbsolutePath());
         p.put("test.timeout.factor", String.valueOf(getTimeoutFactor()));
+        p.put("test.root", getTestRootDir().getPath());
         if (!modules.isEmpty())
             p.put("test.modules", modules.toString());
         File nativeDir = getNativeDir();
@@ -1127,6 +1128,10 @@
         return sb.toString();
     }
 
+    File getTestRootDir() {
+        return params.getTestSuite().getRootDir();
+    }
+
     //--------------------------------------------------------------------------
 
     /*
--- a/src/share/classes/com/sun/javatest/regtest/exec/ShellAction.java	Thu Jan 17 18:13:30 2019 -0800
+++ b/src/share/classes/com/sun/javatest/regtest/exec/ShellAction.java	Fri Jan 25 11:21:12 2019 -0800
@@ -220,7 +220,8 @@
             env.put("TESTJAVACOPTS", fixupSep(StringUtils.join(compilerOpts, " ")));
             List<String> javaOpts = script.getTestJavaOptions();
             env.put("TESTJAVAOPTS", fixupSep(StringUtils.join(javaOpts, " ")));
-            env.put("TESTTIMEOUTFACTOR", script.getTimeoutFactor() + "");
+            env.put("TESTTIMEOUTFACTOR", String.valueOf(script.getTimeoutFactor()));
+            env.put("TESTROOT", script.getTestRootDir().getPath());
             Modules modules = script.getModules();
             if (!modules.isEmpty())
                 env.put("TESTMODULES", modules.toString());
--- a/src/share/doc/javatest/regtest/tag-spec.html	Thu Jan 17 18:13:30 2019 -0800
+++ b/src/share/doc/javatest/regtest/tag-spec.html	Fri Jan 25 11:21:12 2019 -0800
@@ -1294,6 +1294,12 @@
 will be unset or empty, if the version of JDK used to run the tests does not
 support modules.
 
+<tr>
+<td><code>test.root</code>
+<td><code>TESTROOT</code>
+<td>The root directory of the test suite 
+(the directory containing the <a href="#TEST_ROOT">TEST.ROOT</a> file.)
+
 </tbody>
 </table>
 
--- a/test/rerun/std/AppletTest.agentvm.out	Thu Jan 17 18:13:30 2019 -0800
+++ b/test/rerun/std/AppletTest.agentvm.out	Fri Jan 25 11:21:12 2019 -0800
@@ -21,6 +21,7 @@
         -J-Dtest.jdk=%JDKHOME% \
         -J-Dcompile.jdk=%JDKHOME% \
         -J-Dtest.timeout.factor=1.0 \
+        -J-Dtest.root=%WS%/test/rerun \
         -XDmy.javac.option=x \
         -d %BUILD%/RerunTest.agentvm/work/classes/std/AppletTest.d \
         -sourcepath %WS%/test/rerun/std \
@@ -51,5 +52,6 @@
         -Dtest.jdk=%JDKHOME% \
         -Dcompile.jdk=%JDKHOME% \
         -Dtest.timeout.factor=1.0 \
+        -Dtest.root=%WS%/test/rerun \
         -mx128m com.sun.javatest.regtest.agent.AppletWrapper %BUILD%/RerunTest.agentvm/work/std/AppletTest.d/applet.0.jta
 
--- a/test/rerun/std/AppletTest.othervm.out	Thu Jan 17 18:13:30 2019 -0800
+++ b/test/rerun/std/AppletTest.othervm.out	Fri Jan 25 11:21:12 2019 -0800
@@ -19,6 +19,7 @@
         -J-Dtest.jdk=%JDKHOME% \
         -J-Dcompile.jdk=%JDKHOME% \
         -J-Dtest.timeout.factor=1.0 \
+        -J-Dtest.root=%WS%/test/rerun \
         -XDmy.javac.option=x \
         -d %BUILD%/RerunTest.othervm/work/classes/std/AppletTest.d \
         -sourcepath %WS%/test/rerun/std \
@@ -48,5 +49,6 @@
         -Dtest.jdk=%JDKHOME% \
         -Dcompile.jdk=%JDKHOME% \
         -Dtest.timeout.factor=1.0 \
+        -Dtest.root=%WS%/test/rerun \
         -mx128m com.sun.javatest.regtest.agent.AppletWrapper %BUILD%/RerunTest.othervm/work/std/AppletTest.d/applet.0.jta
 
--- a/test/rerun/std/BuildTest.agentvm.out	Thu Jan 17 18:13:30 2019 -0800
+++ b/test/rerun/std/BuildTest.agentvm.out	Fri Jan 25 11:21:12 2019 -0800
@@ -25,6 +25,7 @@
         -J-Dtest.jdk=%JDKHOME% \
         -J-Dcompile.jdk=%JDKHOME% \
         -J-Dtest.timeout.factor=1.0 \
+        -J-Dtest.root=%WS%/test/rerun \
         -XDmy.javac.option=x \
         -d %BUILD%/RerunTest.agentvm/work/classes/std/BuildTest.d \
         -sourcepath %WS%/test/rerun/std \
--- a/test/rerun/std/BuildTest.othervm.out	Thu Jan 17 18:13:30 2019 -0800
+++ b/test/rerun/std/BuildTest.othervm.out	Fri Jan 25 11:21:12 2019 -0800
@@ -23,6 +23,7 @@
         -J-Dtest.jdk=%JDKHOME% \
         -J-Dcompile.jdk=%JDKHOME% \
         -J-Dtest.timeout.factor=1.0 \
+        -J-Dtest.root=%WS%/test/rerun \
         -XDmy.javac.option=x \
         -d %BUILD%/RerunTest.othervm/work/classes/std/BuildTest.d \
         -sourcepath %WS%/test/rerun/std \
--- a/test/rerun/std/CompileTest.agentvm.out	Thu Jan 17 18:13:30 2019 -0800
+++ b/test/rerun/std/CompileTest.agentvm.out	Fri Jan 25 11:21:12 2019 -0800
@@ -21,6 +21,7 @@
         -J-Dtest.jdk=%JDKHOME% \
         -J-Dcompile.jdk=%JDKHOME% \
         -J-Dtest.timeout.factor=1.0 \
+        -J-Dtest.root=%WS%/test/rerun \
         -XDmy.javac.option=x \
         -d %BUILD%/RerunTest.agentvm/work/classes/std/CompileTest.d \
         -sourcepath %WS%/test/rerun/std \
--- a/test/rerun/std/CompileTest.othervm.out	Thu Jan 17 18:13:30 2019 -0800
+++ b/test/rerun/std/CompileTest.othervm.out	Fri Jan 25 11:21:12 2019 -0800
@@ -19,6 +19,7 @@
         -J-Dtest.jdk=%JDKHOME% \
         -J-Dcompile.jdk=%JDKHOME% \
         -J-Dtest.timeout.factor=1.0 \
+        -J-Dtest.root=%WS%/test/rerun \
         -XDmy.javac.option=x \
         -d %BUILD%/RerunTest.othervm/work/classes/std/CompileTest.d \
         -sourcepath %WS%/test/rerun/std \
--- a/test/rerun/std/JUnitTest.agentvm.out	Thu Jan 17 18:13:30 2019 -0800
+++ b/test/rerun/std/JUnitTest.agentvm.out	Fri Jan 25 11:21:12 2019 -0800
@@ -21,6 +21,7 @@
         -J-Dtest.jdk=%JDKHOME% \
         -J-Dcompile.jdk=%JDKHOME% \
         -J-Dtest.timeout.factor=1.0 \
+        -J-Dtest.root=%WS%/test/rerun \
         -XDmy.javac.option=x \
         -d %BUILD%/RerunTest.agentvm/work/classes/std/JUnitTest.d \
         -sourcepath %WS%/test/rerun/std \
@@ -48,6 +49,7 @@
         -Dtest.jdk=%JDKHOME% \
         -Dcompile.jdk=%JDKHOME% \
         -Dtest.timeout.factor=1.0 \
+        -Dtest.root=%WS%/test/rerun \
         -classpath %BUILD%/RerunTest.agentvm/work/classes/std/JUnitTest.d:%WS%/test/rerun/std:%BUILD%/images/jtreg/lib/junit.jar:%JDKHOME%/lib/tools.jar:%BUILD%/images/jtreg/lib/javatest.jar:%BUILD%/images/jtreg/lib/jtreg.jar \
         com.sun.javatest.regtest.agent.JUnitRunner std/JUnitTest.java JUnitTest
 
--- a/test/rerun/std/JUnitTest.othervm.out	Thu Jan 17 18:13:30 2019 -0800
+++ b/test/rerun/std/JUnitTest.othervm.out	Fri Jan 25 11:21:12 2019 -0800
@@ -19,6 +19,7 @@
         -J-Dtest.jdk=%JDKHOME% \
         -J-Dcompile.jdk=%JDKHOME% \
         -J-Dtest.timeout.factor=1.0 \
+        -J-Dtest.root=%WS%/test/rerun \
         -XDmy.javac.option=x \
         -d %BUILD%/RerunTest.othervm/work/classes/std/JUnitTest.d \
         -sourcepath %WS%/test/rerun/std \
@@ -46,6 +47,7 @@
         -Dtest.jdk=%JDKHOME% \
         -Dcompile.jdk=%JDKHOME% \
         -Dtest.timeout.factor=1.0 \
+        -Dtest.root=%WS%/test/rerun \
         -Dmy.vm.option=x \
         -Dmy.java.option=x \
         com.sun.javatest.regtest.agent.MainWrapper %BUILD%/RerunTest.othervm/work/std/JUnitTest.d/junit.0.jta std/JUnitTest.java JUnitTest
--- a/test/rerun/std/MainTest.agentvm.out	Thu Jan 17 18:13:30 2019 -0800
+++ b/test/rerun/std/MainTest.agentvm.out	Fri Jan 25 11:21:12 2019 -0800
@@ -21,6 +21,7 @@
         -J-Dtest.jdk=%JDKHOME% \
         -J-Dcompile.jdk=%JDKHOME% \
         -J-Dtest.timeout.factor=1.0 \
+        -J-Dtest.root=%WS%/test/rerun \
         -XDmy.javac.option=x \
         -d %BUILD%/RerunTest.agentvm/work/classes/std/MainTest.d \
         -sourcepath %WS%/test/rerun/std \
@@ -48,6 +49,7 @@
         -Dtest.jdk=%JDKHOME% \
         -Dcompile.jdk=%JDKHOME% \
         -Dtest.timeout.factor=1.0 \
+        -Dtest.root=%WS%/test/rerun \
         -classpath %BUILD%/RerunTest.agentvm/work/classes/std/MainTest.d:%WS%/test/rerun/std:%JDKHOME%/lib/tools.jar:%BUILD%/images/jtreg/lib/javatest.jar:%BUILD%/images/jtreg/lib/jtreg.jar \
         MainTest
 
--- a/test/rerun/std/MainTest.othervm.out	Thu Jan 17 18:13:30 2019 -0800
+++ b/test/rerun/std/MainTest.othervm.out	Fri Jan 25 11:21:12 2019 -0800
@@ -19,6 +19,7 @@
         -J-Dtest.jdk=%JDKHOME% \
         -J-Dcompile.jdk=%JDKHOME% \
         -J-Dtest.timeout.factor=1.0 \
+        -J-Dtest.root=%WS%/test/rerun \
         -XDmy.javac.option=x \
         -d %BUILD%/RerunTest.othervm/work/classes/std/MainTest.d \
         -sourcepath %WS%/test/rerun/std \
@@ -46,6 +47,7 @@
         -Dtest.jdk=%JDKHOME% \
         -Dcompile.jdk=%JDKHOME% \
         -Dtest.timeout.factor=1.0 \
+        -Dtest.root=%WS%/test/rerun \
         -Dmy.vm.option=x \
         -Dmy.java.option=x \
         com.sun.javatest.regtest.agent.MainWrapper %BUILD%/RerunTest.othervm/work/std/MainTest.d/main.0.jta
--- a/test/rerun/std/ShellTest.agentvm.out	Thu Jan 17 18:13:30 2019 -0800
+++ b/test/rerun/std/ShellTest.agentvm.out	Fri Jan 25 11:21:12 2019 -0800
@@ -17,6 +17,7 @@
 TESTJAVACOPTS=-XDmy.javac.option=x \
 TESTJAVAOPTS=-Dmy.java.option=x \
 TESTTIMEOUTFACTOR=1.0 \
+TESTROOT=%WS%/test/rerun \
     sh \
         %WS%/test/rerun/std/ShellTest.sh
 
--- a/test/rerun/std/ShellTest.othervm.out	Thu Jan 17 18:13:30 2019 -0800
+++ b/test/rerun/std/ShellTest.othervm.out	Fri Jan 25 11:21:12 2019 -0800
@@ -17,6 +17,7 @@
 TESTJAVACOPTS=-XDmy.javac.option=x \
 TESTJAVAOPTS=-Dmy.java.option=x \
 TESTTIMEOUTFACTOR=1.0 \
+TESTROOT=%WS%/test/rerun \
     sh \
         %WS%/test/rerun/std/ShellTest.sh
 
--- a/test/rerun/std/TestNGTest.agentvm.out	Thu Jan 17 18:13:30 2019 -0800
+++ b/test/rerun/std/TestNGTest.agentvm.out	Fri Jan 25 11:21:12 2019 -0800
@@ -21,6 +21,7 @@
         -J-Dtest.jdk=%JDKHOME% \
         -J-Dcompile.jdk=%JDKHOME% \
         -J-Dtest.timeout.factor=1.0 \
+        -J-Dtest.root=%WS%/test/rerun \
         -XDmy.javac.option=x \
         -d %BUILD%/RerunTest.agentvm/work/classes/std/TestNGTest.d \
         -sourcepath %WS%/test/rerun/std \
@@ -48,6 +49,7 @@
         -Dtest.jdk=%JDKHOME% \
         -Dcompile.jdk=%JDKHOME% \
         -Dtest.timeout.factor=1.0 \
+        -Dtest.root=%WS%/test/rerun \
         -classpath %BUILD%/RerunTest.agentvm/work/classes/std/TestNGTest.d:%WS%/test/rerun/std:%BUILD%/images/jtreg/lib/testng.jar:%JDKHOME%/lib/tools.jar:%BUILD%/images/jtreg/lib/javatest.jar:%BUILD%/images/jtreg/lib/jtreg.jar \
         com.sun.javatest.regtest.agent.TestNGRunner std/TestNGTest.java false TestNGTest
 
--- a/test/rerun/std/TestNGTest.othervm.out	Thu Jan 17 18:13:30 2019 -0800
+++ b/test/rerun/std/TestNGTest.othervm.out	Fri Jan 25 11:21:12 2019 -0800
@@ -19,6 +19,7 @@
         -J-Dtest.jdk=%JDKHOME% \
         -J-Dcompile.jdk=%JDKHOME% \
         -J-Dtest.timeout.factor=1.0 \
+        -J-Dtest.root=%WS%/test/rerun \
         -XDmy.javac.option=x \
         -d %BUILD%/RerunTest.othervm/work/classes/std/TestNGTest.d \
         -sourcepath %WS%/test/rerun/std \
@@ -46,6 +47,7 @@
         -Dtest.jdk=%JDKHOME% \
         -Dcompile.jdk=%JDKHOME% \
         -Dtest.timeout.factor=1.0 \
+        -Dtest.root=%WS%/test/rerun \
         -Dmy.vm.option=x \
         -Dmy.java.option=x \
         com.sun.javatest.regtest.agent.MainWrapper %BUILD%/RerunTest.othervm/work/std/TestNGTest.d/testng.0.jta std/TestNGTest.java false TestNGTest
--- a/test/rerun/testng/TestNGTest.agentvm.out	Thu Jan 17 18:13:30 2019 -0800
+++ b/test/rerun/testng/TestNGTest.agentvm.out	Fri Jan 25 11:21:12 2019 -0800
@@ -21,6 +21,7 @@
         -J-Dtest.jdk=%JDKHOME% \
         -J-Dcompile.jdk=%JDKHOME% \
         -J-Dtest.timeout.factor=1.0 \
+        -J-Dtest.root=%WS%/test/rerun \
         -XDmy.javac.option=x \
         -d %BUILD%/RerunTest.agentvm/work/classes/testng \
         -sourcepath %WS%/test/rerun/testng \
@@ -49,6 +50,7 @@
         -Dtest.jdk=%JDKHOME% \
         -Dcompile.jdk=%JDKHOME% \
         -Dtest.timeout.factor=1.0 \
+        -Dtest.root=%WS%/test/rerun \
         -classpath %BUILD%/RerunTest.agentvm/work/classes/testng:%WS%/test/rerun/testng:%BUILD%/images/jtreg/lib/testng.jar:%JDKHOME%/lib/tools.jar:%BUILD%/images/jtreg/lib/javatest.jar:%BUILD%/images/jtreg/lib/jtreg.jar \
         com.sun.javatest.regtest.agent.TestNGRunner testng/TestNGTest.java false TestNGTest
 
--- a/test/rerun/testng/TestNGTest.othervm.out	Thu Jan 17 18:13:30 2019 -0800
+++ b/test/rerun/testng/TestNGTest.othervm.out	Fri Jan 25 11:21:12 2019 -0800
@@ -19,6 +19,7 @@
         -J-Dtest.jdk=%JDKHOME% \
         -J-Dcompile.jdk=%JDKHOME% \
         -J-Dtest.timeout.factor=1.0 \
+        -J-Dtest.root=%WS%/test/rerun \
         @%BUILD%/RerunTest.othervm/work/testng/TestNGTest.d/compile.0.jta
 
 ### Section testng
@@ -42,6 +43,7 @@
         -Dtest.jdk=%JDKHOME% \
         -Dcompile.jdk=%JDKHOME% \
         -Dtest.timeout.factor=1.0 \
+        -Dtest.root=%WS%/test/rerun \
         -Dmy.vm.option=x \
         -Dmy.java.option=x \
         com.sun.javatest.regtest.agent.MainWrapper %BUILD%/RerunTest.othervm/work/testng/TestNGTest.d/testng.1.jta testng/TestNGTest.java false TestNGTest