changeset 1109:0c9f3369f3d3

8062638: RuntimeException when run command from js with -scripting on Cygwin Reviewed-by: hannesw, lagergren
author slugovoy
date Mon, 17 Nov 2014 14:57:28 +0300
parents 74dcd8dbef25
children 80be1cd8c2a2
files test/script/nosecurity/JDK-8050964.js test/script/nosecurity/JDK-8055034.js
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/script/nosecurity/JDK-8050964.js	Thu Nov 13 09:38:35 2014 -0800
+++ b/test/script/nosecurity/JDK-8050964.js	Mon Nov 17 14:57:28 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	Thu Nov 13 09:38:35 2014 -0800
+++ b/test/script/nosecurity/JDK-8055034.js	Mon Nov 17 14:57:28 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.