aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins/com.android.ide.eclipse.adt/src
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2014-04-22 14:17:11 -0700
committerSiva Velusamy <vsiva@google.com>2014-04-22 14:24:19 -0700
commit0b6a13faa7db9de24b3e93aa627ff2886c723be5 (patch)
tree21d9f5ae73efe49dff0a5594e8d25e305dabdf86 /eclipse/plugins/com.android.ide.eclipse.adt/src
parent326b951d7e963873aa82065a47bd8ea150f2d225 (diff)
downloadsdk-0b6a13faa7db9de24b3e93aa627ff2886c723be5.zip
sdk-0b6a13faa7db9de24b3e93aa627ff2886c723be5.tar.gz
sdk-0b6a13faa7db9de24b3e93aa627ff2886c723be5.tar.bz2
Relax requirement for instrumentation test runners.
Currently ADT checks that a specified instrumentation test runner is actually a subclass of android.test.InstrumentationTestRunner. This doesn't work for Google Instrumentation Test Runner since it is a subclass of Google Instrumentation. This CL relaxes the requirement that a runner has to implement InstrumentationTestRunner: now it only has to implement Instrumentation. Fixes https://code.google.com/p/android/issues/detail?id=68575 Change-Id: I4500016941137bb98b90b5407c3e17d705ec2af9
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.adt/src')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/InstrumentationRunnerValidator.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/InstrumentationRunnerValidator.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/InstrumentationRunnerValidator.java
index b494f62..54fd207 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/InstrumentationRunnerValidator.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/InstrumentationRunnerValidator.java
@@ -134,13 +134,15 @@ class InstrumentationRunnerValidator {
}
// check if this instrumentation is the standard test runner
if (!instrumentation.equals(SdkConstants.CLASS_INSTRUMENTATION_RUNNER)) {
- // check if it extends the standard test runner
+ // Ideally, we'd check if the class extends instrumentation test runner.
+ // However, the Google Instrumentation Test Runner extends Google Instrumentation, and not a test runner,
+ // so we just check that the super class is Instrumentation.
String result = BaseProjectHelper.testClassForManifest(mJavaProject,
- instrumentation, SdkConstants.CLASS_INSTRUMENTATION_RUNNER, true);
+ instrumentation, SdkConstants.CLASS_INSTRUMENTATION, true);
if (result != BaseProjectHelper.TEST_CLASS_OK) {
return String.format(
LaunchMessages.InstrValidator_WrongRunnerTypeMsg_s,
- SdkConstants.CLASS_INSTRUMENTATION_RUNNER);
+ SdkConstants.CLASS_INSTRUMENTATION);
}
}
return INSTRUMENTATION_OK;