]> source.dussan.org Git - poi.git/commitdiff
* Also adjust build.xml for newer required Ant 1.8.0
authorDominik Stadler <centic@apache.org>
Mon, 20 Oct 2014 13:54:41 +0000 (13:54 +0000)
committerDominik Stadler <centic@apache.org>
Mon, 20 Oct 2014 13:54:41 +0000 (13:54 +0000)
* 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

build.xml
src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java

index cebb06aab67c340bcc2ba2b1a39e0b6ff377dd1b..5f2aaebd8e577a6d40138568f5e5b3b44504052b 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -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}">
index e7c58eed48000fc84038f2792b94cd35e57709ad..301aea8b9317106bc705b2bc3e80c4da2bd3b786 100644 (file)
    ================================================================= */ \r
 package org.apache.poi.poifs.crypt;\r
 \r
-import static org.junit.Assert.assertEquals;\r
-import static org.junit.Assert.assertFalse;\r
-import static org.junit.Assert.assertNotNull;\r
-import static org.junit.Assert.assertTrue;\r
+import static org.junit.Assert.*;\r
 \r
 import java.io.File;\r
 import java.io.FileInputStream;\r
@@ -75,6 +72,7 @@ import org.bouncycastle.asn1.x509.KeyUsage;
 import org.bouncycastle.cert.ocsp.OCSPResp;\r
 import org.etsi.uri.x01903.v13.DigestAlgAndValueType;\r
 import org.etsi.uri.x01903.v13.QualifyingPropertiesType;\r
+import org.junit.Assume;\r
 import org.junit.BeforeClass;\r
 import org.junit.Test;\r
 import org.w3.x2000.x09.xmldsig.ReferenceType;\r
@@ -98,6 +96,13 @@ public class TestSignatureInfo {
         cal.clear();\r
         cal.setTimeZone(TimeZone.getTimeZone("UTC"));\r
         cal.set(2014, 7, 6, 21, 42, 12);\r
+\r
+        // don't run this test when we are using older Xerces as it triggers an XML Parser backwards compatibility issue \r
+        // in the xmlsec jar file\r
+        String additionalJar = System.getProperty("additionaljar");\r
+        //System.out.println("Having: " + additionalJar);\r
+        Assume.assumeTrue("Not running TestSignatureInfo because we are testing with additionaljar set to " + additionalJar, \r
+                additionalJar == null || additionalJar.trim().length() == 0);\r
     }\r
     \r
     @Test\r