8079769: tools/pack200/PackTestZip64.java may timeout at preparing the large test file
authoramlu
Thu, 13 Aug 2015 09:35:45 +0300
changeset 32142 bb38b4bc2063
parent 32141 06929447eac0
child 32143 394ab6a6658d
8079769: tools/pack200/PackTestZip64.java may timeout at preparing the large test file Reviewed-by: ksrini
jdk/test/tools/pack200/PackTestZip64.java
jdk/test/tools/pack200/PackTestZip64Manual.java
--- a/jdk/test/tools/pack200/PackTestZip64.java	Thu Aug 13 06:42:05 2015 +0300
+++ b/jdk/test/tools/pack200/PackTestZip64.java	Thu Aug 13 09:35:45 2015 +0300
@@ -37,10 +37,13 @@
  * @compile -XDignore.symbol.file Utils.java PackTestZip64.java
  * @run main PackTestZip64
  * @author kizune
- * @key intermittent
  */
 
 public class PackTestZip64 {
+
+    private static final boolean bigJarEnabled
+            = Boolean.getBoolean("PackTestZip64.enableBigJar");
+
     public static void main(String... args) throws Exception {
         testPacking();
         Utils.cleanup();
@@ -50,10 +53,14 @@
     private static final byte[] BUFFER = new byte[1024];
 
     static void testPacking() throws IOException {
-        // make a copy of the test specimen to local directory
         File testFile = new File("tools_java.jar");
-        // Add a large number of small files to the golden jar
-        generateLargeJar(testFile, Utils.getGoldenJar());
+        if (bigJarEnabled) {
+            // Add a large number of small files to the golden jar
+            generateLargeJar(testFile, Utils.getGoldenJar());
+        } else {
+            // make a copy of the test specimen to local directory
+            Utils.copyFile(Utils.getGoldenJar(), testFile);
+        }
 
         List<String> cmdsList = new ArrayList<>();
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/tools/pack200/PackTestZip64Manual.java	Thu Aug 13 09:35:45 2015 +0300
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8029646
+ * @summary tests that native unpacker produces the same result as Java one
+ * @compile -XDignore.symbol.file Utils.java PackTestZip64.java
+ * @run main/manual/othervm -DPackTestZip64.enableBigJar=true PackTestZip64
+ */
+
+public class PackTestZip64Manual {
+}