diff options
author | Dominik Stadler <centic@apache.org> | 2014-10-20 13:54:41 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2014-10-20 13:54:41 +0000 |
commit | dc570c8e83be826d1aa32db58ebc721d34ed4bc5 (patch) | |
tree | 14ae365ae22744a9af4b1195a8b1745af053d170 | |
parent | 544c826ec5f6f3dcb84b97f6ff945d51e0360116 (diff) | |
download | poi-dc570c8e83be826d1aa32db58ebc721d34ed4bc5.tar.gz poi-dc570c8e83be826d1aa32db58ebc721d34ed4bc5.zip |
* Also adjust build.xml for newer required Ant 1.8.0
* Pass "additionaljar" to junit calls to enable us to exclude tests which we know are failing (newer XML Security stuff)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1633156 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | build.xml | 12 | ||||
-rw-r--r-- | src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java | 13 |
2 files changed, 18 insertions, 7 deletions
@@ -30,9 +30,9 @@ under the License. Yegor Kozlov yegor at apache.org Dominik Stadler centic at apache.org - This build was tested with ant 1.6.2 although it will probably work with - other versions. The following jar files should be available on the - classpath when running ant: + This build was tested with ant 1.9.4 although it will probably work with + other versions, however at least 1.8.0 is required. The following jar + files should be available on the classpath when running ant: LIBRARY LOCATION ======= ======== @@ -86,6 +86,7 @@ under the License. <property name="poi.test.locale" value="-Duser.language=en -Duser.country=US"/> <property name="POI.testdata.path" value="test-data"/> <property name="java.awt.headless" value="true"/> + <property name="additionaljar" value=""/> <!-- Main: --> <property name="main.resource1.dir" value="src/resources/main"/> @@ -901,6 +902,7 @@ under the License. <jvmarg value="${poi.test.locale}"/> <jvmarg value="-ea"/> <jvmarg value="-Xmx256m"/> + <jvmarg value="-Dadditionaljar=${additionaljar}"/> <formatter type="plain"/> <formatter type="xml"/> <batchtest todir="${main.reports.test}"> @@ -942,6 +944,7 @@ under the License. <syspropertyset refid="junit.properties"/> <jvmarg value="${poi.test.locale}"/> <jvmarg value="-ea"/> + <jvmarg value="-Dadditionaljar=${additionaljar}"/> <!-- YK: ensure that JUnit has enough memory to run tests. Without the line below tests fail on Mac OS X with jdk-1.6.26 @@ -984,6 +987,7 @@ under the License. <syspropertyset refid="junit.properties"/> <jvmarg value="${poi.test.locale}"/> <jvmarg value="-ea"/> + <jvmarg value="-Dadditionaljar=${additionaljar}"/> <formatter type="plain"/> <formatter type="xml"/> <batchtest todir="${ooxml.reports.test}"> @@ -1006,6 +1010,7 @@ under the License. <syspropertyset refid="junit.properties"/> <jvmarg value="${poi.test.locale}"/> <jvmarg value="-ea"/> + <jvmarg value="-Dadditionaljar=${additionaljar}"/> <formatter type="plain"/> <formatter type="xml"/> <batchtest todir="${ooxml.reports.test}"> @@ -1079,6 +1084,7 @@ under the License. <syspropertyset refid="junit.properties"/> <jvmarg value="${poi.test.locale}"/> <jvmarg value="-ea"/> + <jvmarg value="-Dadditionaljar=${additionaljar}"/> <formatter type="plain"/> <formatter type="xml"/> <batchtest todir="${excelant.reports.test}"> diff --git a/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java b/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java index e7c58eed48..301aea8b93 100644 --- a/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java +++ b/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java @@ -23,10 +23,7 @@ ================================================================= */
package org.apache.poi.poifs.crypt;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
import java.io.File;
import java.io.FileInputStream;
@@ -75,6 +72,7 @@ import org.bouncycastle.asn1.x509.KeyUsage; import org.bouncycastle.cert.ocsp.OCSPResp;
import org.etsi.uri.x01903.v13.DigestAlgAndValueType;
import org.etsi.uri.x01903.v13.QualifyingPropertiesType;
+import org.junit.Assume;
import org.junit.BeforeClass;
import org.junit.Test;
import org.w3.x2000.x09.xmldsig.ReferenceType;
@@ -98,6 +96,13 @@ public class TestSignatureInfo { cal.clear();
cal.setTimeZone(TimeZone.getTimeZone("UTC"));
cal.set(2014, 7, 6, 21, 42, 12);
+
+ // don't run this test when we are using older Xerces as it triggers an XML Parser backwards compatibility issue
+ // in the xmlsec jar file
+ String additionalJar = System.getProperty("additionaljar");
+ //System.out.println("Having: " + additionalJar);
+ Assume.assumeTrue("Not running TestSignatureInfo because we are testing with additionaljar set to " + additionalJar,
+ additionalJar == null || additionalJar.trim().length() == 0);
}
@Test
|