You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2014/03/04 01:18:30 UTC
svn commit: r1573824 -
/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java
Author: sebb
Date: Tue Mar 4 00:18:30 2014
New Revision: 1573824
URL: http://svn.apache.org/r1573824
Log:
Conditional testing for XZ BCJ bug
Modified:
commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java
Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java?rev=1573824&r1=1573823&r2=1573824&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java (original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java Tue Mar 4 00:18:30 2014
@@ -30,6 +30,15 @@ import org.tukaani.xz.LZMA2Options;
public class SevenZOutputFileTest extends AbstractTestCase {
+ private static final boolean XZ_BCJ_IS_BUGGY;
+
+ static {
+ final String version = org.tukaani.xz.XZ.class.getPackage().getImplementationVersion();
+ XZ_BCJ_IS_BUGGY=version.equals("1.4");
+ if (XZ_BCJ_IS_BUGGY) {
+ System.out.println("XZ version is " + version + " - skipping BCJ tests");
+ }
+ }
private File output;
@Override
@@ -234,31 +243,37 @@ public class SevenZOutputFileTest extend
testRoundTrip(SevenZMethod.DEFLATE);
}
- /* must wait for XZ for Java > 1.4
+ /* must wait for XZ for Java > 1.4 */
public void testBCJX86Roundtrip() throws Exception {
+ if (XZ_BCJ_IS_BUGGY) { return; }
testFilterRoundTrip(new SevenZMethodConfiguration(SevenZMethod.BCJ_X86_FILTER));
}
public void testBCJARMRoundtrip() throws Exception {
+ if (XZ_BCJ_IS_BUGGY) { return; }
testFilterRoundTrip(new SevenZMethodConfiguration(SevenZMethod.BCJ_ARM_FILTER));
}
public void testBCJARMThumbRoundtrip() throws Exception {
+ if (XZ_BCJ_IS_BUGGY) { return; }
testFilterRoundTrip(new SevenZMethodConfiguration(SevenZMethod.BCJ_ARM_THUMB_FILTER));
}
public void testBCJIA64Roundtrip() throws Exception {
+ if (XZ_BCJ_IS_BUGGY) { return; }
testFilterRoundTrip(new SevenZMethodConfiguration(SevenZMethod.BCJ_IA64_FILTER));
}
public void testBCJPPCRoundtrip() throws Exception {
+ if (XZ_BCJ_IS_BUGGY) { return; }
testFilterRoundTrip(new SevenZMethodConfiguration(SevenZMethod.BCJ_PPC_FILTER));
}
public void testBCJSparcRoundtrip() throws Exception {
+ if (XZ_BCJ_IS_BUGGY) { return; }
testFilterRoundTrip(new SevenZMethodConfiguration(SevenZMethod.BCJ_SPARC_FILTER));
}
- */
+ /**/
public void testDeltaRoundtrip() throws Exception {
testFilterRoundTrip(new SevenZMethodConfiguration(SevenZMethod.DELTA_FILTER));