8053908: jdeps is not PATH on Mac, results in ant clean test failure on Mac
authorsundar
Thu, 31 Jul 2014 18:14:46 +0530
changeset 25825 b97d77f4b98e
parent 25824 ea1f7997ebb2
child 25826 3d2dd01a3a4a
8053908: jdeps is not PATH on Mac, results in ant clean test failure on Mac Reviewed-by: hannesw, jlaskey
nashorn/test/script/nosecurity/JDK-8050964.js
--- a/nashorn/test/script/nosecurity/JDK-8050964.js	Wed Jul 30 10:06:42 2014 -0700
+++ b/nashorn/test/script/nosecurity/JDK-8050964.js	Thu Jul 31 18:14:46 2014 +0530
@@ -46,8 +46,11 @@
     nashornJar = new File(".", nashornJar);
 }
 
+var javahome = System.getProperty("java.home");
+var jdepsPath = javahome + "/../bin/jdeps".replaceAll(/\//g, File.separater);
+
 // run jdep on nashorn.jar - only summary but print profile info
-`jdeps -s -P ${nashornJar.absolutePath}`
+`${jdepsPath} -s -P ${nashornJar.absolutePath}`
 
 // check for "(compact1)" in output from jdep tool
 if (! /(compact1)/.test($OUT)) {