# HG changeset patch # User slugovoy # Date 1416916621 -10800 # Node ID ac111e4cb1dca817326e649c68a02151ab7d9748 # Parent c3a510b73875da69575c9f1646f0ad7be6dfc006 8062638: RuntimeException when run command from js with -scripting on Cygwin 8054343: Nashorn: Some tests fails on windows with AccessControlException Reviewed-by: coffeys diff -r c3a510b73875 -r ac111e4cb1dc test/script/basic/compile-octane-normal.js --- 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); diff -r c3a510b73875 -r ac111e4cb1dc test/script/basic/compile-octane-splitter.js --- 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); diff -r c3a510b73875 -r ac111e4cb1dc test/script/basic/compile-octane.js --- 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."); diff -r c3a510b73875 -r ac111e4cb1dc test/script/nosecurity/JDK-8050964.js --- 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 diff -r c3a510b73875 -r ac111e4cb1dc test/script/nosecurity/JDK-8055034.js --- 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.