8062638: RuntimeException when run command from js with -scripting on Cygwin

Tue, 25 Nov 2014 14:57:01 +0300

author
slugovoy
date
Tue, 25 Nov 2014 14:57:01 +0300
changeset 1106
ac111e4cb1dc
parent 1105
c3a510b73875
child 1107
4191f598c8ff

8062638: RuntimeException when run command from js with -scripting on Cygwin
8054343: Nashorn: Some tests fails on windows with AccessControlException
Reviewed-by: coffeys

test/script/basic/compile-octane-normal.js file | annotate | diff | comparison | revisions
test/script/basic/compile-octane-splitter.js file | annotate | diff | comparison | revisions
test/script/basic/compile-octane.js file | annotate | diff | comparison | revisions
test/script/nosecurity/JDK-8050964.js file | annotate | diff | comparison | revisions
test/script/nosecurity/JDK-8055034.js file | annotate | diff | comparison | revisions
     1.1 --- a/test/script/basic/compile-octane-normal.js	Mon Nov 24 12:03:15 2014 +0100
     1.2 +++ b/test/script/basic/compile-octane-normal.js	Tue Nov 25 14:57:01 2014 +0300
     1.3 @@ -38,5 +38,5 @@
     1.4   */
     1.5  
     1.6  var fn  = __DIR__ + 'compile-octane.js';
     1.7 -var url = "file://" + fn;
     1.8 -loadWithNewGlobal(new java.net.URL(url));
     1.9 +var url = new java.io.File(fn).toURL();
    1.10 +loadWithNewGlobal(url);
     2.1 --- a/test/script/basic/compile-octane-splitter.js	Mon Nov 24 12:03:15 2014 +0100
     2.2 +++ b/test/script/basic/compile-octane-splitter.js	Tue Nov 25 14:57:01 2014 +0300
     2.3 @@ -40,5 +40,5 @@
     2.4   */
     2.5  
     2.6  var fn  = __DIR__ + 'compile-octane.js';
     2.7 -var url = "file://" + fn;
     2.8 -loadWithNewGlobal(new java.net.URL(url));
     2.9 +var url = new java.io.File(fn).toURL();
    2.10 +loadWithNewGlobal(url);
     3.1 --- a/test/script/basic/compile-octane.js	Mon Nov 24 12:03:15 2014 +0100
     3.2 +++ b/test/script/basic/compile-octane.js	Tue Nov 25 14:57:01 2014 +0300
     3.3 @@ -132,7 +132,7 @@
     3.4          str2 += " processing file: " + file + "...";
     3.5          print_if_verbose(str2);
     3.6          }
     3.7 -        newGlobal.load("file://" + path + file);
     3.8 +        newGlobal.load(new java.io.File(path + file).toURL());
     3.9      }
    3.10      }
    3.11      print("Done.");
     4.1 --- a/test/script/nosecurity/JDK-8050964.js	Mon Nov 24 12:03:15 2014 +0100
     4.2 +++ b/test/script/nosecurity/JDK-8050964.js	Tue Nov 25 14:57:01 2014 +0300
     4.3 @@ -50,6 +50,7 @@
     4.4  var jdepsPath = javahome + "/../bin/jdeps".replaceAll(/\//g, File.separater);
     4.5  
     4.6  // run jdep on nashorn.jar - only summary but print profile info
     4.7 +$ENV.PWD=System.getProperty("user.dir") // to avoid RE on Cygwin
     4.8  `${jdepsPath} -s -P ${nashornJar.absolutePath}`
     4.9  
    4.10  // check for "(compact1)" in output from jdep tool
     5.1 --- a/test/script/nosecurity/JDK-8055034.js	Mon Nov 24 12:03:15 2014 +0100
     5.2 +++ b/test/script/nosecurity/JDK-8055034.js	Tue Nov 25 14:57:01 2014 +0300
     5.3 @@ -49,7 +49,7 @@
     5.4  var jjsCmd = javahome + "/../bin/jjs";
     5.5  jjsCmd += " -J-Djava.ext.dirs=" + nashornJarDir;
     5.6  jjsCmd = jjsCmd.toString().replaceAll(/\//g, File.separater);
     5.7 -
     5.8 +$ENV.PWD=System.getProperty("user.dir") // to avoid RE on Cygwin
     5.9  $EXEC(jjsCmd, "var x = Object.create(null);\nx;\nprint('PASSED');\nexit(0)");
    5.10  
    5.11  // $ERR has all interactions including prompts! Just check for error substring.

mercurial