Skip to content

Commit

Permalink
Enable more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsteiner1984 committed Jul 18, 2024
1 parent ccfb34f commit 6badfff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ private boolean xmlEqual(byte[] data) throws ParserConfigurationException, IOExc
return false;
}
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
dbf.setNamespaceAware(true);
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc1 = db.parse(new ByteArrayInputStream(ref));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Licensed to the Apache Software Foundation (ASF) under one or more
*/
package org.apache.batik.test.xml;

import org.apache.commons.io.FileUtils;

import org.apache.batik.script.rhino.RhinoClassShutter;
import org.apache.batik.test.DefaultTestSuite;
import org.apache.batik.test.Test;
Expand Down Expand Up @@ -69,6 +71,15 @@ public static Collection<Test[]> data() throws ParserConfigurationException, SAX
}

private static Collection<Test[]> getTests() throws ParserConfigurationException, IOException, SAXException, TestException {
new File("test-references/org/apache/batik/ext/awt/geom/candidate").mkdir();
new File("test-references/org/apache/batik/ext/awt/geom/variation").mkdir();
for (File file : FileUtils.listFiles(new File("test-references"), new String[]{"png"}, true)) {
file = file.getParentFile();
if (!file.getName().contains("candidate")) {
new File(file, "candidate-variation").mkdir();
new File(file, "candidate-reference").mkdir();
}
}
File uriStr = new File("test-resources/org/apache/batik/test/regard.xml");
URL url = uriStr.toURI().toURL();
DocumentBuilder docBuilder
Expand Down Expand Up @@ -142,23 +153,8 @@ public void test() throws ParserConfigurationException, SAXException, TestExcept
}

private static List<String> EXCLUDE = Arrays.asList(
//fail on CI
"ShowSVG",
"ATransform.defaultContextGeneration",
"Bug4945.defaultContextGeneration",
"Bug6535.defaultContextGeneration",
"Bug17965.defaultContextGeneration",
"Color1.defaultContextGeneration",
"Color2.defaultContextGeneration",
"Gradient.defaultContextGeneration",
"IdentityTest.defaultContextGeneration",
"NegativeLengths.defaultContextGeneration",
"ShearTest.defaultContextGeneration",
"TextSpacePreserve.defaultContextGeneration",
"BasicShapes.defaultContextGeneration",
"TransformCollapse.defaultContextGeneration",
"BasicShapes2.defaultContextGeneration",
"BStroke.defaultContextGeneration",
"org.apache.batik.svggen.SVGAccuracyTestValidator$SameAsReferenceImage",
"Color1.renderingCheck",
"Lookup.renderingCheck",
"Rescale.renderingCheck",
Expand Down Expand Up @@ -600,19 +596,6 @@ public void test() throws ParserConfigurationException, SAXException, TestExcept
"jarCheckLoadSameAsDocument(scripts=application/java-archive)(scriptOrigin=document)(secure=true)",
"jarCheckLoadSameAsDocument(scripts=application/java-archive)(scriptOrigin=document)(secure=false)",
"jarCheckPermissionsGranted",
// exclude additional failures appearing under JDK 1.8.0_152 on MacOS
"Bug4389.renderingCheck",
"Bug4389.ContextrenderingCheck",
"Bug6535.ContextrenderingCheck",
"Bug17965.renderingCheck",
"Bug17965.ContextrenderingCheck",
"IdentityTest.renderingCheck",
"IdentityTest.ContextrenderingCheck",
"rlm.sort",
"rlm.containsall",
"rlm.removeall",
"rlm.retainall",
"rlm.merge",
"rlm.subtract"
"Bug6535.ContextrenderingCheck"
);
}

0 comments on commit 6badfff

Please sign in to comment.