test/testlibrary/com/oracle/java/testlibrary/JDKToolFinder.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/test/testlibrary/com/oracle/java/testlibrary/JDKToolFinder.java	Sun Aug  4 02:51:58 2013
--- new/test/testlibrary/com/oracle/java/testlibrary/JDKToolFinder.java	Sun Aug  4 02:51:58 2013

*** 29,50 **** --- 29,69 ---- private JDKToolFinder() { } /** * Returns the full path to an executable in jdk/bin based on System property ! * test.jdk (set by jtreg test suite) + * Returns the full path to an executable in jdk/bin based on System ! * property {@code compile.jdk} (set by jtreg test suite) * * @return Full path to an executable in jdk/bin */ public static String getJDKTool(String tool) { ! String binPath = System.getProperty("test.jdk"); ! String binPath = System.getProperty("compile.jdk"); if (binPath == null) { ! throw new RuntimeException("System property 'test.jdk' not set. This property is normally set by jtreg. " + "When running test separately, set this property using '-Dtest.jdk=/path/to/jdk'."); ! throw new RuntimeException("System property 'compile.jdk' not set. " + + "This property is normally set by jtreg. " + + "When running test separately, set this property using " + + "'-Dcompile.jdk=/path/to/jdk'."); } + binPath += File.separatorChar + "bin" + File.separatorChar + tool; + return binPath; + } + /** + * Returns the full path to an executable in <current jdk>/bin based + * on System property {@code test.jdk} (set by jtreg test suite) + * + * @return Full path to an executable in jdk/bin + */ + public static String getCurrentJDKTool(String tool) { + String binPath = System.getProperty("test.jdk"); + if (binPath == null) { + throw new RuntimeException("System property 'test.jdk' not set. " + + "This property is normally set by jtreg. " + + "When running test separately, set this property using " + + "'-Dtest.jdk=/path/to/jdk'."); + } binPath += File.separatorChar + "bin" + File.separatorChar + tool; return binPath; } }

test/testlibrary/com/oracle/java/testlibrary/JDKToolFinder.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File