Mercurial > hg > shenandoah-preopenjdk-archive > openjdk8 > nashorn
changeset 1103:ac111e4cb1dc
8062638: RuntimeException when run command from js with -scripting on Cygwin
8054343: Nashorn: Some tests fails on windows with AccessControlException
Reviewed-by: coffeys
author | slugovoy |
---|---|
date | Tue, 25 Nov 2014 14:57:01 +0300 |
parents | c3a510b73875 |
children | 4191f598c8ff |
files | test/script/basic/compile-octane-normal.js test/script/basic/compile-octane-splitter.js test/script/basic/compile-octane.js test/script/nosecurity/JDK-8050964.js test/script/nosecurity/JDK-8055034.js |
diffstat | 5 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/test/script/basic/compile-octane-normal.js Mon Nov 24 12:03:15 2014 +0100 +++ b/test/script/basic/compile-octane-normal.js Tue Nov 25 14:57:01 2014 +0300 @@ -38,5 +38,5 @@ */ var fn = __DIR__ + 'compile-octane.js'; -var url = "file://" + fn; -loadWithNewGlobal(new java.net.URL(url)); +var url = new java.io.File(fn).toURL(); +loadWithNewGlobal(url);
--- a/test/script/basic/compile-octane-splitter.js Mon Nov 24 12:03:15 2014 +0100 +++ b/test/script/basic/compile-octane-splitter.js Tue Nov 25 14:57:01 2014 +0300 @@ -40,5 +40,5 @@ */ var fn = __DIR__ + 'compile-octane.js'; -var url = "file://" + fn; -loadWithNewGlobal(new java.net.URL(url)); +var url = new java.io.File(fn).toURL(); +loadWithNewGlobal(url);
--- a/test/script/basic/compile-octane.js Mon Nov 24 12:03:15 2014 +0100 +++ b/test/script/basic/compile-octane.js Tue Nov 25 14:57:01 2014 +0300 @@ -132,7 +132,7 @@ str2 += " processing file: " + file + "..."; print_if_verbose(str2); } - newGlobal.load("file://" + path + file); + newGlobal.load(new java.io.File(path + file).toURL()); } } print("Done.");
--- a/test/script/nosecurity/JDK-8050964.js Mon Nov 24 12:03:15 2014 +0100 +++ b/test/script/nosecurity/JDK-8050964.js Tue Nov 25 14:57:01 2014 +0300 @@ -50,6 +50,7 @@ var jdepsPath = javahome + "/../bin/jdeps".replaceAll(/\//g, File.separater); // run jdep on nashorn.jar - only summary but print profile info +$ENV.PWD=System.getProperty("user.dir") // to avoid RE on Cygwin `${jdepsPath} -s -P ${nashornJar.absolutePath}` // check for "(compact1)" in output from jdep tool
--- a/test/script/nosecurity/JDK-8055034.js Mon Nov 24 12:03:15 2014 +0100 +++ b/test/script/nosecurity/JDK-8055034.js Tue Nov 25 14:57:01 2014 +0300 @@ -49,7 +49,7 @@ var jjsCmd = javahome + "/../bin/jjs"; jjsCmd += " -J-Djava.ext.dirs=" + nashornJarDir; jjsCmd = jjsCmd.toString().replaceAll(/\//g, File.separater); - +$ENV.PWD=System.getProperty("user.dir") // to avoid RE on Cygwin $EXEC(jjsCmd, "var x = Object.create(null);\nx;\nprint('PASSED');\nexit(0)"); // $ERR has all interactions including prompts! Just check for error substring.