Author: centic
Date: Mon Oct 20 13:54:41 2014
New Revision: 1633156
URL: http://svn.apache.org/r1633156
Log:
* 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)
Modified:
poi/trunk/build.xml
poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java
Modified: poi/trunk/build.xml
URL:
http://svn.apache.org/viewvc/poi/trunk/build.xml?rev=1633156&r1=1633155&r2=1633156&view=diff
==============================================================================
--- poi/trunk/build.xml (original)
+++ poi/trunk/build.xml Mon Oct 20 13:54:41 2014
@@ -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}">
Modified:
poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java?rev=1633156&r1=1633155&r2=1633156&view=diff
==============================================================================
---
poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java
(original)
+++
poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java
Mon Oct 20 13:54:41 2014
@@ -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.KeyUsa
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]