summaryrefslogtreecommitdiffstats
path: root/xml
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2010-02-18 17:20:15 -0800
committerElliott Hughes <enh@google.com>2010-02-19 10:35:06 -0800
commit7ee3a061452c5a7e5c8e661219a1f08a14171858 (patch)
treef995fb4c053e4c68a86909aa72aee284cb39133a /xml
parent1d1f9244611a8ba3be65795d4ea6e84bcecdb89d (diff)
downloadlibcore-7ee3a061452c5a7e5c8e661219a1f08a14171858.zip
libcore-7ee3a061452c5a7e5c8e661219a1f08a14171858.tar.gz
libcore-7ee3a061452c5a7e5c8e661219a1f08a14171858.tar.bz2
Resync a load of tests with upstream, make our build faster.
I started off with a mission to remove uses of dalvik.annotation.* (stuff like @TestTargetNew and other useless junk that just makes it harder to stay in sync with upstream). I wrote a script to go through tests showing me the diff between what we have and what upstream has, thinking that in cases where upstream has also added tests, I may as well pull them in at the same time... ...but I didn't realize how close we were to having dx fill its 1.5GiB heap. After trying various alternatives, I decided to bite the bullet and break core-tests up into one .jar per module. This adds parallelism back into this, the slowest part of our build. (I can do even better, but I'll do that in a separate patch, preferably after we've merged recent changes from master.) Only a couple of dependencies were problematic: the worthless TestSuiteFactory which already contained a comment suggesting we get rid of it, and the fact that some tests -- most notably the concurrent ones -- also contained main methods that started the JUnit tty-based TestRunner. (In the long run, we want to be running the harmony tests directly from a pristine "svn co" of upstream, using DalvikRunner. But this will be a big help in the meantime, and starts the work of getting our current copy of the tests into a state where we can start to extract any meaningful changes/additions we've made.)
Diffstat (limited to 'xml')
-rw-r--r--xml/src/test/java/org/apache/harmony/xml/AllTests.java2
-rw-r--r--xml/src/test/java/org/apache/harmony/xml/XsltXPathConformanceTestSuite.java3
-rw-r--r--xml/src/test/java/org/kxml2/io/AllTests.java2
-rw-r--r--xml/src/test/java/tests/api/javax/xml/parsers/AllTests.java7
-rw-r--r--xml/src/test/java/tests/api/org/xml/sax/AllTests.java7
-rw-r--r--xml/src/test/java/tests/api/org/xml/sax/ext/AllTests.java7
-rw-r--r--xml/src/test/java/tests/api/org/xml/sax/helpers/AllTests.java7
-rw-r--r--xml/src/test/java/tests/org/w3c/dom/AllTests.java7
-rw-r--r--xml/src/test/java/tests/xml/AllTests.java6
9 files changed, 12 insertions, 36 deletions
diff --git a/xml/src/test/java/org/apache/harmony/xml/AllTests.java b/xml/src/test/java/org/apache/harmony/xml/AllTests.java
index f7fac7c..c04c1b5 100644
--- a/xml/src/test/java/org/apache/harmony/xml/AllTests.java
+++ b/xml/src/test/java/org/apache/harmony/xml/AllTests.java
@@ -21,7 +21,7 @@ import junit.framework.TestSuite;
public class AllTests {
public static Test suite() {
- TestSuite suite = tests.TestSuiteFactory.createTestSuite();
+ TestSuite suite = new TestSuite();
suite.addTestSuite(ExpatParserTest.class);
return suite;
}
diff --git a/xml/src/test/java/org/apache/harmony/xml/XsltXPathConformanceTestSuite.java b/xml/src/test/java/org/apache/harmony/xml/XsltXPathConformanceTestSuite.java
index 7773814..da37c45 100644
--- a/xml/src/test/java/org/apache/harmony/xml/XsltXPathConformanceTestSuite.java
+++ b/xml/src/test/java/org/apache/harmony/xml/XsltXPathConformanceTestSuite.java
@@ -21,7 +21,6 @@ import junit.framework.AssertionFailedError;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
-import junit.textui.TestRunner;
import org.w3c.dom.Attr;
import org.w3c.dom.Comment;
import org.w3c.dom.Document;
@@ -116,7 +115,7 @@ public class XsltXPathConformanceTestSuite {
}
File catalogXml = new File(args[0]);
- TestRunner.run(suite(catalogXml));
+ // TestRunner.run(suite(catalogXml)); android-changed
}
public static Test suite() throws Exception {
diff --git a/xml/src/test/java/org/kxml2/io/AllTests.java b/xml/src/test/java/org/kxml2/io/AllTests.java
index f996d25..4fcc44a 100644
--- a/xml/src/test/java/org/kxml2/io/AllTests.java
+++ b/xml/src/test/java/org/kxml2/io/AllTests.java
@@ -21,7 +21,7 @@ import junit.framework.TestSuite;
public class AllTests {
public static Test suite() {
- TestSuite suite = tests.TestSuiteFactory.createTestSuite();
+ TestSuite suite = new TestSuite();
suite.addTestSuite(KXmlSerializerTest.class);
return suite;
}
diff --git a/xml/src/test/java/tests/api/javax/xml/parsers/AllTests.java b/xml/src/test/java/tests/api/javax/xml/parsers/AllTests.java
index 6a22109..aecc746 100644
--- a/xml/src/test/java/tests/api/javax/xml/parsers/AllTests.java
+++ b/xml/src/test/java/tests/api/javax/xml/parsers/AllTests.java
@@ -25,13 +25,8 @@ import org.apache.harmony.xml.ExpatParserTest;
*/
public class AllTests {
-
- public static void main(String[] args) {
- junit.textui.TestRunner.run(AllTests.suite());
- }
-
public static Test suite() {
- TestSuite suite = tests.TestSuiteFactory.createTestSuite("All tests for package tests.api.javax.xml.parsers;");
+ TestSuite suite = new TestSuite("All tests for package tests.api.javax.xml.parsers;");
// $JUnit-BEGIN$
suite.addTestSuite(DocumentBuilderFactoryTest.class);
diff --git a/xml/src/test/java/tests/api/org/xml/sax/AllTests.java b/xml/src/test/java/tests/api/org/xml/sax/AllTests.java
index 9c29178..f7643e9 100644
--- a/xml/src/test/java/tests/api/org/xml/sax/AllTests.java
+++ b/xml/src/test/java/tests/api/org/xml/sax/AllTests.java
@@ -20,13 +20,8 @@ import junit.framework.Test;
import junit.framework.TestSuite;
public class AllTests {
-
- public static void main(String[] args) {
- junit.textui.TestRunner.run(AllTests.suite());
- }
-
public static Test suite() {
- TestSuite suite = tests.TestSuiteFactory.createTestSuite("Tests for org.xml.sax package");
+ TestSuite suite = new TestSuite("Tests for org.xml.sax package");
// $JUnit-BEGIN$
suite.addTestSuite(HandlerBaseTest.class);
diff --git a/xml/src/test/java/tests/api/org/xml/sax/ext/AllTests.java b/xml/src/test/java/tests/api/org/xml/sax/ext/AllTests.java
index f4b34b8..1334780 100644
--- a/xml/src/test/java/tests/api/org/xml/sax/ext/AllTests.java
+++ b/xml/src/test/java/tests/api/org/xml/sax/ext/AllTests.java
@@ -20,13 +20,8 @@ import junit.framework.Test;
import junit.framework.TestSuite;
public class AllTests {
-
- public static void main(String[] args) {
- junit.textui.TestRunner.run(AllTests.suite());
- }
-
public static Test suite() {
- TestSuite suite = tests.TestSuiteFactory.createTestSuite("Tests for org.xml.sax.ext package");
+ TestSuite suite = new TestSuite("Tests for org.xml.sax.ext package");
// $JUnit-BEGIN$
suite.addTestSuite(Attributes2ImplTest.class);
diff --git a/xml/src/test/java/tests/api/org/xml/sax/helpers/AllTests.java b/xml/src/test/java/tests/api/org/xml/sax/helpers/AllTests.java
index 5bf63bf..135496c 100644
--- a/xml/src/test/java/tests/api/org/xml/sax/helpers/AllTests.java
+++ b/xml/src/test/java/tests/api/org/xml/sax/helpers/AllTests.java
@@ -20,13 +20,8 @@ import junit.framework.Test;
import junit.framework.TestSuite;
public class AllTests {
-
- public static void main(String[] args) {
- junit.textui.TestRunner.run(AllTests.suite());
- }
-
public static Test suite() {
- TestSuite suite = tests.TestSuiteFactory.createTestSuite("Tests for org.xml.sax.helpers package");
+ TestSuite suite = new TestSuite("Tests for org.xml.sax.helpers package");
// $JUnit-BEGIN$
suite.addTestSuite(AttributeListImplTest.class);
diff --git a/xml/src/test/java/tests/org/w3c/dom/AllTests.java b/xml/src/test/java/tests/org/w3c/dom/AllTests.java
index a4299a7..5dba844 100644
--- a/xml/src/test/java/tests/org/w3c/dom/AllTests.java
+++ b/xml/src/test/java/tests/org/w3c/dom/AllTests.java
@@ -24,13 +24,8 @@ import junit.framework.TestSuite;
*/
public class AllTests {
-
- public static void main(String[] args) {
- junit.textui.TestRunner.run(AllTests.suite());
- }
-
public static Test suite() {
- TestSuite suite = tests.TestSuiteFactory.createTestSuite("All tests for package org.w3c.dom;");
+ TestSuite suite = new TestSuite("All tests for package org.w3c.dom;");
// $JUnit-BEGIN$
suite.addTestSuite(AttrGetOwnerElement.class);
diff --git a/xml/src/test/java/tests/xml/AllTests.java b/xml/src/test/java/tests/xml/AllTests.java
index 45ca18e..8a4b4a9 100644
--- a/xml/src/test/java/tests/xml/AllTests.java
+++ b/xml/src/test/java/tests/xml/AllTests.java
@@ -22,7 +22,7 @@ import junit.framework.TestSuite;
public class AllTests {
public static Test suite() {
- TestSuite suite = tests.TestSuiteFactory.createTestSuite();
+ TestSuite suite = new TestSuite();
suite.addTestSuite(SimpleParserTest.class);
suite.addTestSuite(SimpleBuilderTest.class);
@@ -32,7 +32,9 @@ public class AllTests {
suite.addTest(tests.api.javax.xml.parsers.AllTests.suite());
suite.addTest(tests.api.org.xml.sax.AllTests.suite());
- suite.addTest(tests.api.org.w3c.dom.AllTests.suite());
+ // BEGIN android-changed: this is in the dom module!
+ // suite.addTest(tests.api.org.w3c.dom.AllTests.suite());
+ // END android-changed
suite.addTest(tests.org.w3c.dom.AllTests.suite());
suite.addTest(org.apache.harmony.xml.AllTests.suite());
suite.addTest(org.kxml2.io.AllTests.suite());