--- old/test/tools/pack200/Utils.java Fri Dec 19 09:32:45 2014 +++ new/test/tools/pack200/Utils.java Fri Dec 19 09:32:44 2014 @@ -82,11 +82,7 @@ if (VerifierJar.exists()) { return; } - File srcDir = new File(TEST_SRC_DIR, VERIFIER_DIR_NAME); - if (!srcDir.exists()) { - // if not available try one level above - srcDir = new File(TEST_SRC_DIR.getParentFile(), VERIFIER_DIR_NAME); - } + File srcDir = new File(getVerifierDir(), "src"); List javaFileList = findFiles(srcDir, createFilter(JAVA_FILE_EXT)); File tmpFile = File.createTempFile("javac", ".tmp"); XCLASSES.mkdirs(); @@ -115,6 +111,18 @@ "."); } + private static File getVerifierDir() { + File srcDir = new File(TEST_SRC_DIR, VERIFIER_DIR_NAME); + if (!srcDir.exists()) { + // if not available try one level above + srcDir = new File(TEST_SRC_DIR.getParentFile(), VERIFIER_DIR_NAME); + } + return srcDir; + } + + static File getGoldenJar() { + return new File(new File(getVerifierDir(), "data"), "golden.jar"); + } static void dirlist(File dir) { File[] files = dir.listFiles(); System.out.println("--listing " + dir.getAbsolutePath() + "---"); @@ -564,7 +572,8 @@ File rtJar = new File("rt.jar"); cmdList.clear(); cmdList.add(getJarCmd()); - cmdList.add("cvf"); + // cmdList.add("cvf"); too noisy + cmdList.add("cf"); cmdList.add(rtJar.getName()); cmdList.add("-C"); cmdList.add("out"); @@ -574,24 +583,4 @@ recursiveDelete(new File("out")); return rtJar; } - private static List locaterCache = null; - // search the source dir and jdk dir for requested file and returns - // the first location it finds. - static File locateJar(String name) { - try { - if (locaterCache == null) { - locaterCache = new ArrayList(); - locaterCache.addAll(findFiles(TEST_SRC_DIR, createFilter(JAR_FILE_EXT))); - locaterCache.addAll(findFiles(JavaSDK, createFilter(JAR_FILE_EXT))); - } - for (File f : locaterCache) { - if (f.getName().equals(name)) { - return f; - } - } - throw new IOException("file not found: " + name); - } catch (IOException e) { - throw new RuntimeException(e); - } - } }