diff options
author | Elliott Hughes <enh@google.com> | 2010-02-18 17:20:15 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2010-02-19 10:35:06 -0800 |
commit | 7ee3a061452c5a7e5c8e661219a1f08a14171858 (patch) | |
tree | f995fb4c053e4c68a86909aa72aee284cb39133a /crypto/src | |
parent | 1d1f9244611a8ba3be65795d4ea6e84bcecdb89d (diff) | |
download | libcore-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 'crypto/src')
26 files changed, 5 insertions, 117 deletions
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/AllTests.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/AllTests.java index 5050fc8..aa3240f 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/AllTests.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/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.apache.harmony.crypto.tests.javax.crypto;"); + TestSuite suite = new TestSuite("All tests for package org.apache.harmony.crypto.tests.javax.crypto;"); // $JUnit-BEGIN$ suite.addTestSuite(BadPaddingExceptionTest.class); diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/MacTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/MacTest.java index 750342c..5e2414e 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/MacTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/MacTest.java @@ -1171,11 +1171,6 @@ public class MacTest extends TestCase { public static Test suite() { return new TestSuite(MacTest.class); } - - public static void main(String args[]) { - junit.textui.TestRunner.run(suite()); - - } } /** * Additional class for Mac constructor verification diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/AllTests.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/AllTests.java index 906057b..68b6720 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/AllTests.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/AllTests.java @@ -24,11 +24,6 @@ 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 = new TestSuite("All tests for package org.apache.harmony.crypto.tests.javax.crypto.func;"); // $JUnit-BEGIN$ diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/AllTests.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/AllTests.java index b66a384..b47c23e 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/AllTests.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/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.apache.harmony.crypto.tests.javax.crypto.interfaces;"); + TestSuite suite = new TestSuite("All tests for package org.apache.harmony.crypto.tests.javax.crypto.interfaces;"); // $JUnit-BEGIN$ suite.addTestSuite(DHPrivateKeyTest.class); diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/AllTests.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/AllTests.java index 0be596e..02e0bbb 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/AllTests.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/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.apache.harmony.crypto.tests.javax.crypto.serialization;"); + TestSuite suite = new TestSuite("All tests for package org.apache.harmony.crypto.tests.javax.crypto.serialization;"); // $JUnit-BEGIN$ suite.addTestSuite(BadPaddingExceptionTest.class); diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/BadPaddingExceptionTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/BadPaddingExceptionTest.java index 2f632ae..3992d44 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/BadPaddingExceptionTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/BadPaddingExceptionTest.java @@ -42,8 +42,4 @@ public class BadPaddingExceptionTest extends SerializationTest { return new Object[] { new BadPaddingException(), new BadPaddingException(null), new BadPaddingException(msgs[1]) }; } - - public static void main(String[] args) { - junit.textui.TestRunner.run(BadPaddingExceptionTest.class); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/ExemptionMechanismExceptionTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/ExemptionMechanismExceptionTest.java index 7fd8cd0..33665d0 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/ExemptionMechanismExceptionTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/ExemptionMechanismExceptionTest.java @@ -42,8 +42,4 @@ public class ExemptionMechanismExceptionTest extends SerializationTest { return new Object[] { new ExemptionMechanismException(), new ExemptionMechanismException(null), new ExemptionMechanismException(msgs[1]) }; } - - public static void main(String[] args) { - junit.textui.TestRunner.run(ExemptionMechanismExceptionTest.class); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/IllegalBlockSizeExceptionTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/IllegalBlockSizeExceptionTest.java index 2cc1daa..652c0b0 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/IllegalBlockSizeExceptionTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/IllegalBlockSizeExceptionTest.java @@ -42,8 +42,4 @@ public class IllegalBlockSizeExceptionTest extends SerializationTest { return new Object[] { new IllegalBlockSizeException(), new IllegalBlockSizeException(null), new IllegalBlockSizeException(msgs[1]) }; } - - public static void main(String[] args) { - junit.textui.TestRunner.run(IllegalBlockSizeExceptionTest.class); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/NoSuchPaddingExceptionTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/NoSuchPaddingExceptionTest.java index 475bd2f..12b98fb 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/NoSuchPaddingExceptionTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/NoSuchPaddingExceptionTest.java @@ -42,8 +42,4 @@ public class NoSuchPaddingExceptionTest extends SerializationTest { return new Object[] { new NoSuchPaddingException(), new NoSuchPaddingException(null), new NoSuchPaddingException(msgs[1]) }; } - - public static void main(String[] args) { - junit.textui.TestRunner.run(NoSuchPaddingExceptionTest.class); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/ShortBufferExceptionTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/ShortBufferExceptionTest.java index ab696e8..c42a5cb 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/ShortBufferExceptionTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/serialization/ShortBufferExceptionTest.java @@ -42,8 +42,4 @@ public class ShortBufferExceptionTest extends SerializationTest { return new Object[] { new ShortBufferException(), new ShortBufferException(null), new ShortBufferException(msgs[1]) }; } - - public static void main(String[] args) { - junit.textui.TestRunner.run(ShortBufferExceptionTest.class); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/AllTests.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/AllTests.java index d31dc54..cdd3d51 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/AllTests.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/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.apache.harmony.crypto.tests.javax.crypto.spec;"); + TestSuite suite = new TestSuite("All tests for package org.apache.harmony.crypto.tests.javax.crypto.spec;"); // $JUnit-BEGIN$ suite.addTestSuite(DESKeySpecTest.class); diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DESKeySpecTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DESKeySpecTest.java index 9904eed..9106a87 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DESKeySpecTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DESKeySpecTest.java @@ -324,9 +324,5 @@ public class DESKeySpecTest extends TestCase { public static Test suite() { return new TestSuite(DESKeySpecTest.class); } - - public static void main(String args[]) { - junit.textui.TestRunner.run(suite()); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DESedeKeySpecTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DESedeKeySpecTest.java index 5c312a4..3f8ce0a 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DESedeKeySpecTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DESedeKeySpecTest.java @@ -226,9 +226,5 @@ public class DESedeKeySpecTest extends TestCase { public static Test suite() { return new TestSuite(DESedeKeySpecTest.class); } - - public static void main(String args[]) { - junit.textui.TestRunner.run(suite()); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DHGenParameterSpecTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DHGenParameterSpecTest.java index 7b09cb6..aef1286 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DHGenParameterSpecTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DHGenParameterSpecTest.java @@ -84,9 +84,5 @@ public class DHGenParameterSpecTest extends TestCase { public static Test suite() { return new TestSuite(DHGenParameterSpecTest.class); } - - public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DHParameterSpecTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DHParameterSpecTest.java index 0c0ac3b..65d1a17 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DHParameterSpecTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DHParameterSpecTest.java @@ -111,9 +111,5 @@ public class DHParameterSpecTest extends TestCase { public static Test suite() { return new TestSuite(DHParameterSpecTest.class); } - - public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DHPrivateKeySpecTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DHPrivateKeySpecTest.java index 7181623..327004a 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DHPrivateKeySpecTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DHPrivateKeySpecTest.java @@ -95,9 +95,5 @@ public class DHPrivateKeySpecTest extends TestCase { public static Test suite() { return new TestSuite(DHPrivateKeySpecTest.class); } - - public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DHPublicKeySpecTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DHPublicKeySpecTest.java index 064c713..905d8cd 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DHPublicKeySpecTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/DHPublicKeySpecTest.java @@ -95,9 +95,5 @@ public class DHPublicKeySpecTest extends TestCase { public static Test suite() { return new TestSuite(DHPublicKeySpecTest.class); } - - public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/IvParameterSpecTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/IvParameterSpecTest.java index fda566a..1c27f68 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/IvParameterSpecTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/IvParameterSpecTest.java @@ -160,9 +160,5 @@ public class IvParameterSpecTest extends TestCase { public static Test suite() { return new TestSuite(IvParameterSpecTest.class); } - - public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/OAEPParameterSpecTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/OAEPParameterSpecTest.java index 6b2c673..3fa2d72 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/OAEPParameterSpecTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/OAEPParameterSpecTest.java @@ -194,9 +194,5 @@ public class OAEPParameterSpecTest extends TestCase { public static Test suite() { return new TestSuite(OAEPParameterSpecTest.class); } - - public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/PBEKeySpecTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/PBEKeySpecTest.java index 1cb017e..bbce868 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/PBEKeySpecTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/PBEKeySpecTest.java @@ -356,9 +356,5 @@ public class PBEKeySpecTest extends TestCase { public static Test suite() { return new TestSuite(PBEKeySpecTest.class); } - - public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/PBEParameterSpecTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/PBEParameterSpecTest.java index b294995..6bca15c 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/PBEParameterSpecTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/PBEParameterSpecTest.java @@ -118,9 +118,5 @@ public class PBEParameterSpecTest extends TestCase { public static Test suite() { return new TestSuite(PBEParameterSpecTest.class); } - - public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/PSourceTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/PSourceTest.java index 08e8acd..ac3c5e5 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/PSourceTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/PSourceTest.java @@ -155,8 +155,4 @@ public class PSourceTest extends TestCase { public static Test suite() { return new TestSuite(PSourceTest.class); } - - public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/RC2ParameterSpecTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/RC2ParameterSpecTest.java index cf72d23..6eb636f 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/RC2ParameterSpecTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/RC2ParameterSpecTest.java @@ -254,9 +254,5 @@ public class RC2ParameterSpecTest extends TestCase { public static Test suite() { return new TestSuite(RC2ParameterSpecTest.class); } - - public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/RC5ParameterSpecTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/RC5ParameterSpecTest.java index 6182615..9b7704d 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/RC5ParameterSpecTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/RC5ParameterSpecTest.java @@ -350,9 +350,5 @@ public class RC5ParameterSpecTest extends TestCase { public static Test suite() { return new TestSuite(RC5ParameterSpecTest.class); } - - public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); - } } diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/SecretKeySpecTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/SecretKeySpecTest.java index 5eeb76f..b39bb1d 100644 --- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/SecretKeySpecTest.java +++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/SecretKeySpecTest.java @@ -315,9 +315,5 @@ public class SecretKeySpecTest extends TestCase { public static Test suite() { return new TestSuite(SecretKeySpecTest.class); } - - public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); - } } diff --git a/crypto/src/test/java/tests/crypto/AllTests.java b/crypto/src/test/java/tests/crypto/AllTests.java index 795d0a9..0b53942 100644 --- a/crypto/src/test/java/tests/crypto/AllTests.java +++ b/crypto/src/test/java/tests/crypto/AllTests.java @@ -23,14 +23,8 @@ import junit.framework.TestSuite; * Test suite that includes all tests for the regex project. */ public class AllTests { - - public static void main(String[] args) { - junit.textui.TestRunner.run(AllTests.suite()); -//AllTests.java - } - public static Test suite() { - TestSuite suite = tests.TestSuiteFactory.createTestSuite("All crypto test suites"); + TestSuite suite = new TestSuite("All crypto test suites"); // $JUnit-BEGIN$ suite.addTest(org.apache.harmony.crypto.tests.javax.crypto.interfaces.AllTests.suite()); suite.addTest(org.apache.harmony.crypto.tests.javax.crypto.serialization.AllTests.suite()); |