diff --git a/nashorn/make/build-nasgen.xml b/nashorn/make/build-nasgen.xml
index 9dca5505316..16094cc964b 100644
--- a/nashorn/make/build-nasgen.xml
+++ b/nashorn/make/build-nasgen.xml
@@ -36,11 +36,13 @@
+
+
-
+
-
+
diff --git a/nashorn/make/build.xml b/nashorn/make/build.xml
index 78cc8f9ea26..35edc417edb 100644
--- a/nashorn/make/build.xml
+++ b/nashorn/make/build.xml
@@ -304,6 +304,14 @@ grant codeBase "file:/${basedir}/${nashorn.internal.tests.jar}" {
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 @@ grant codeBase "file:/${basedir}/test/script/markdown.js" {
-
+
@@ -413,7 +421,7 @@ grant codeBase "file:/${basedir}/test/script/markdown.js" {
-
+
@@ -451,7 +459,7 @@ grant codeBase "file:/${basedir}/test/script/markdown.js" {
-
+
@@ -471,7 +479,7 @@ grant codeBase "file:/${basedir}/test/script/markdown.js" {
-
+
@@ -490,7 +498,7 @@ grant codeBase "file:/${basedir}/test/script/markdown.js" {
-
+
@@ -510,7 +518,7 @@ grant codeBase "file:/${basedir}/test/script/markdown.js" {
-
+
diff --git a/nashorn/make/project.properties b/nashorn/make/project.properties
index 77f8ed73bf7..642793a8e66 100644
--- a/nashorn/make/project.properties
+++ b/nashorn/make/project.properties
@@ -309,7 +309,7 @@ run.test.jvmargs.main=${run.test.jvmargs.common} -ea
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}
diff --git a/nashorn/test/src/jdk/nashorn/internal/test/framework/TestHelper.java b/nashorn/test/src/jdk/nashorn/internal/test/framework/TestHelper.java
index b48ed8b5c19..bb16cf48caa 100644
--- a/nashorn/test/src/jdk/nashorn/internal/test/framework/TestHelper.java
+++ b/nashorn/test/src/jdk/nashorn/internal/test/framework/TestHelper.java
@@ -39,7 +39,8 @@ import java.io.Reader;
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() {