# HG changeset patch # User mhaupt # Date 1435828160 -7200 # Node ID 6eca661ddf7954b28c22088813b2e10c8167de1a # Parent 1172aca37bba7a8da5b8a2665be48a86bcbdbc9c 8130306: enable running Nashorn test on Windows Summary: fix executable name (add .exe suffix) Reviewed-by: hannesw, sundar diff -r 1172aca37bba -r 6eca661ddf79 test/script/nosecurity/JDK-8050964.js --- a/test/script/nosecurity/JDK-8050964.js Thu Jul 02 10:55:35 2015 +0200 +++ b/test/script/nosecurity/JDK-8050964.js Thu Jul 02 11:09:20 2015 +0200 @@ -46,10 +46,14 @@ nashornJar = new File(".", nashornJar); } +var os = System.getProperty("os.name"), + win = os.startsWith("Windows"), + jdepsName = "jdeps" + (win ? ".exe" : ""); + var javahome = System.getProperty("java.home"); -var jdepsPath = javahome + "/../bin/jdeps".replace(/\//g, File.separator); +var jdepsPath = javahome + "/../bin/".replace(/\//g, File.separator) + jdepsName; if (! new File(jdepsPath).isFile()) { - jdepsPath = javahome + "/bin/jdeps".replace(/\//g, File.separator); + jdepsPath = javahome + "/bin/".replace(/\//g, File.separator) + jdepsName; } // run jdep on nashorn.jar - only summary but print profile info