--- a/nashorn/make/build-nasgen.xml Wed Jul 05 19:51:30 2017 +0200
+++ b/nashorn/make/build-nasgen.xml Tue Jul 22 11:55:03 2014 -0700
@@ -36,11 +36,13 @@
<pathelement location="${basedir}/jcov2/lib/jcov_j2se_rt.jar"/>
<pathelement location="${basedir}/buildtools/nasgen/dist/nasgen.jar"/>
<pathelement path="${basedir}/build/classes"/>
+ <pathelement location="${dist.dir}/nasgen.jar"/>
+ <pathelement path="${build.dir}/classes"/>
</classpath>
<jvmarg value="-Djava.ext.dirs="/>
- <arg value="${basedir}/build/classes"/>
+ <arg value="${build.dir}/classes"/>
<arg value="jdk.nashorn.internal.objects"/>
- <arg value="${basedir}/build/classes"/>
+ <arg value="${build.dir}/classes"/>
</java>
</target>
--- a/nashorn/make/build.xml Wed Jul 05 19:51:30 2017 +0200
+++ b/nashorn/make/build.xml Tue Jul 22 11:55:03 2014 -0700
@@ -304,6 +304,14 @@
grant codeBase "file:/${basedir}/${file.reference.testng.jar}" {
permission java.security.AllPermission;
};
+//// in case of absolute path:
+grant codeBase "file:/${nashorn.internal.tests.jar}" {
+ permission java.security.AllPermission;
+};
+
+grant codeBase "file:/${file.reference.testng.jar}" {
+ permission java.security.AllPermission;
+};
grant codeBase "file:/${basedir}/test/script/trusted/*" {
permission java.security.AllPermission;
@@ -391,7 +399,7 @@
<testng outputdir="${build.nosecurity.test.results.dir}" classfilesetref="test.nosecurity.classes"
verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
<jvmarg line="${ext.class.path}"/>
- <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
+ <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} -Dbuild.dir=${build.dir}"/>
<sysproperty key="nashorn.jar" value="${dist.dir}/nashorn.jar"/>
<propertyset>
<propertyref prefix="nashorn."/>
@@ -413,7 +421,7 @@
<testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
<jvmarg line="${ext.class.path}"/>
- <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
+ <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
<jvmarg line="${debug.test.jvmargs}"/>
<propertyset>
<propertyref prefix="nashorn."/>
@@ -451,7 +459,7 @@
<testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
<jvmarg line="${ext.class.path}"/>
- <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
+ <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} -Dbuild.dir=${build.dir}"/>
<propertyset>
<propertyref prefix="testjfx-test-sys-prop."/>
<mapper from="testjfx-test-sys-prop.*" to="*" type="glob"/>
@@ -471,7 +479,7 @@
<testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
<jvmarg line="${ext.class.path}"/>
- <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
+ <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
<propertyset>
<propertyref prefix="testmarkdown-test-sys-prop."/>
<mapper from="testmarkdown-test-sys-prop.*" to="*" type="glob"/>
@@ -490,7 +498,7 @@
<testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
<jvmarg line="${ext.class.path}"/>
- <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
+ <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
<propertyset>
<propertyref prefix="nashorn."/>
</propertyset>
@@ -510,7 +518,7 @@
<!-- use just build.test.classes.dir to avoid referring to TestNG -->
<java classname="${parallel.test.runner}" dir="${basedir}" fork="true">
<jvmarg line="${ext.class.path}"/>
- <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
+ <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
<classpath>
<pathelement path="${run.test.classpath}"/>
</classpath>
--- a/nashorn/make/project.properties Wed Jul 05 19:51:30 2017 +0200
+++ b/nashorn/make/project.properties Tue Jul 22 11:55:03 2014 -0700
@@ -309,7 +309,7 @@
run.test.jvmargs.octane.main=${run.test.jvmargs.common} -XX:+UnlockDiagnosticVMOptions -XX:+UseNewCode -XX:TypeProfileLevel=222
# Security manager args - make sure that we run with the nashorn.policy that the build creates
-run.test.jvmsecurityargs=-Xverify:all -Djava.security.manager -Djava.security.policy=${basedir}/build/nashorn.policy
+run.test.jvmsecurityargs=-Xverify:all -Djava.security.manager -Djava.security.policy=${build.dir}/nashorn.policy
# VM options for script tests with @fork option
test-sys-prop.test.fork.jvm.options=${run.test.jvmargs.main} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -cp ${run.test.classpath}
--- a/nashorn/test/src/jdk/nashorn/internal/test/framework/TestHelper.java Wed Jul 05 19:51:30 2017 +0200
+++ b/nashorn/test/src/jdk/nashorn/internal/test/framework/TestHelper.java Tue Jul 22 11:55:03 2014 -0700
@@ -39,7 +39,8 @@
public abstract class TestHelper {
public static final String TEST_ROOT = "test";
- public static final String BUILD_ROOT = "build/test";
+ public static final String BUILD_ROOT =
+ System.getProperty("build.dir", "build") + File.separator + "test";
public static final String TEST_PREFIX = TEST_ROOT + File.separator;
private TestHelper() {