summaryrefslogtreecommitdiffstats
path: root/test-runner
diff options
context:
space:
mode:
authorJesse Wilson <jessewilson@google.com>2010-12-21 08:21:48 -0800
committerJesse Wilson <jessewilson@google.com>2010-12-21 10:23:28 -0800
commitbd1c5da28dab9c3fb7e19bdadb22d7ad960fa3c3 (patch)
treea929e584ab215ff780f695710a004cb393ef3a93 /test-runner
parent41e7e6f9339cd9181df26ca96f0ac133371bc524 (diff)
downloadframeworks_base-bd1c5da28dab9c3fb7e19bdadb22d7ad960fa3c3.zip
frameworks_base-bd1c5da28dab9c3fb7e19bdadb22d7ad960fa3c3.tar.gz
frameworks_base-bd1c5da28dab9c3fb7e19bdadb22d7ad960fa3c3.tar.bz2
Remove unused performance tests.
Change-Id: I5a252e314831716f99ce5fbb32d983c7473ee787
Diffstat (limited to 'test-runner')
-rw-r--r--test-runner/src/android/test/InstrumentationTestRunner.java7
-rw-r--r--test-runner/src/android/test/PerformanceTestBase.java33
-rw-r--r--test-runner/src/android/test/suitebuilder/TestPredicates.java3
-rw-r--r--test-runner/src/android/test/suitebuilder/TestSuiteBuilder.java11
-rw-r--r--test-runner/src/android/test/suitebuilder/UnitTestSuiteBuilder.java3
5 files changed, 6 insertions, 51 deletions
diff --git a/test-runner/src/android/test/InstrumentationTestRunner.java b/test-runner/src/android/test/InstrumentationTestRunner.java
index 5ce3efc..ed0bf34 100644
--- a/test-runner/src/android/test/InstrumentationTestRunner.java
+++ b/test-runner/src/android/test/InstrumentationTestRunner.java
@@ -172,8 +172,6 @@ public class InstrumentationTestRunner extends Instrumentation implements TestSu
/** @hide */
public static final String ARGUMENT_TEST_SIZE_PREDICATE = "size";
/** @hide */
- public static final String ARGUMENT_INCLUDE_PERF = "perf";
- /** @hide */
public static final String ARGUMENT_DELAY_MSEC = "delay_msec";
private static final String SMALL_SUITE = "small";
@@ -305,7 +303,6 @@ public class InstrumentationTestRunner extends Instrumentation implements TestSu
Predicate<TestMethod> testSizePredicate = null;
Predicate<TestMethod> testAnnotationPredicate = null;
Predicate<TestMethod> testNotAnnotationPredicate = null;
- boolean includePerformance = false;
String testClassesArg = null;
boolean logOnly = false;
@@ -323,7 +320,6 @@ public class InstrumentationTestRunner extends Instrumentation implements TestSu
testNotAnnotationPredicate = getNotAnnotationPredicate(
arguments.getString(ARGUMENT_NOT_ANNOTATION));
- includePerformance = getBooleanArgument(arguments, ARGUMENT_INCLUDE_PERF);
logOnly = getBooleanArgument(arguments, ARGUMENT_LOG_ONLY);
mCoverage = getBooleanArgument(arguments, "coverage");
mCoverageFilePath = arguments.getString("coverageFile");
@@ -348,9 +344,6 @@ public class InstrumentationTestRunner extends Instrumentation implements TestSu
if (testNotAnnotationPredicate != null) {
testSuiteBuilder.addRequirements(testNotAnnotationPredicate);
}
- if (!includePerformance) {
- testSuiteBuilder.addRequirements(REJECT_PERFORMANCE);
- }
if (testClassesArg == null) {
if (mPackageOfTests != null) {
diff --git a/test-runner/src/android/test/PerformanceTestBase.java b/test-runner/src/android/test/PerformanceTestBase.java
deleted file mode 100644
index 4a0a589..0000000
--- a/test-runner/src/android/test/PerformanceTestBase.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.test;
-
-import junit.framework.TestCase;
-
-/**
- * {@hide} Not needed for SDK.
- */
-public class PerformanceTestBase extends TestCase implements PerformanceTestCase {
-
- public int startPerformance(PerformanceTestCase.Intermediates intermediates) {
- return 0;
- }
-
- public boolean isPerformanceOnly() {
- return true;
- }
-}
diff --git a/test-runner/src/android/test/suitebuilder/TestPredicates.java b/test-runner/src/android/test/suitebuilder/TestPredicates.java
index d814e0b..47aca55 100644
--- a/test-runner/src/android/test/suitebuilder/TestPredicates.java
+++ b/test-runner/src/android/test/suitebuilder/TestPredicates.java
@@ -17,7 +17,6 @@
package android.test.suitebuilder;
import android.test.InstrumentationTestCase;
-import android.test.PerformanceTestBase;
import android.test.suitebuilder.annotation.HasAnnotation;
import android.test.suitebuilder.annotation.Suppress;
import android.test.suitebuilder.annotation.LargeTest;
@@ -43,7 +42,5 @@ public class TestPredicates {
public static final Predicate<TestMethod> SELECT_LARGE = new HasAnnotation(LargeTest.class);
public static final Predicate<TestMethod> REJECT_SUPPRESSED =
Predicates.not(new HasAnnotation(Suppress.class));
- public static final Predicate<TestMethod> REJECT_PERFORMANCE =
- Predicates.not(new AssignableFrom(PerformanceTestBase.class));
}
diff --git a/test-runner/src/android/test/suitebuilder/TestSuiteBuilder.java b/test-runner/src/android/test/suitebuilder/TestSuiteBuilder.java
index 428905e..28f7216 100644
--- a/test-runner/src/android/test/suitebuilder/TestSuiteBuilder.java
+++ b/test-runner/src/android/test/suitebuilder/TestSuiteBuilder.java
@@ -24,7 +24,6 @@ import com.android.internal.util.Predicate;
import com.google.android.collect.Lists;
import static android.test.suitebuilder.TestGrouping.SORT_BY_FULLY_QUALIFIED_NAME;
import static android.test.suitebuilder.TestPredicates.REJECT_SUPPRESSED;
-import static android.test.suitebuilder.TestPredicates.REJECT_PERFORMANCE;
import junit.framework.Test;
import junit.framework.TestCase;
@@ -71,9 +70,9 @@ public class TestSuiteBuilder {
this.testCases = Lists.newArrayList();
addRequirements(REJECT_SUPPRESSED);
}
-
+
/** @hide pending API Council approval */
- public TestSuiteBuilder addTestClassByName(String testClassName, String testMethodName,
+ public TestSuiteBuilder addTestClassByName(String testClassName, String testMethodName,
Context context) {
AndroidTestRunner atr = new AndroidTestRunner();
@@ -83,7 +82,7 @@ public class TestSuiteBuilder {
this.testCases.addAll(atr.getTestCases());
return this;
}
-
+
/** @hide pending API Council approval */
public TestSuiteBuilder addTestSuite(TestSuite testSuite) {
for (TestCase testCase : (List<TestCase>) TestCaseUtil.getTests(testSuite, true)) {
@@ -242,7 +241,7 @@ public class TestSuiteBuilder {
/**
* @return the test package that represents the packages that were included for our test suite.
- *
+ *
* {@hide} Not needed for 1.0 SDK.
*/
protected TestGrouping getTestGrouping() {
@@ -262,7 +261,7 @@ public class TestSuiteBuilder {
addSuiteIfNecessary(testMethod.getEnclosingClassname());
suiteForCurrentClass.addTest(testMethod.createTest());
}
-
+
private void addTest(Test test) {
addSuiteIfNecessary(test.getClass().getName());
suiteForCurrentClass.addTest(test);
diff --git a/test-runner/src/android/test/suitebuilder/UnitTestSuiteBuilder.java b/test-runner/src/android/test/suitebuilder/UnitTestSuiteBuilder.java
index 8cf4c86..a746b35 100644
--- a/test-runner/src/android/test/suitebuilder/UnitTestSuiteBuilder.java
+++ b/test-runner/src/android/test/suitebuilder/UnitTestSuiteBuilder.java
@@ -18,7 +18,7 @@ package android.test.suitebuilder;
/**
* A suite builder that finds unit tests.
- *
+ *
* {@hide} Not needed for 1.0 SDK.
*/
public class UnitTestSuiteBuilder extends TestSuiteBuilder {
@@ -31,6 +31,5 @@ public class UnitTestSuiteBuilder extends TestSuiteBuilder {
public UnitTestSuiteBuilder(String name, ClassLoader classLoader) {
super(name, classLoader);
addRequirements(TestPredicates.REJECT_INSTRUMENTATION);
- addRequirements(TestPredicates.REJECT_PERFORMANCE);
}
}