AI 143919: am: CL 143918 am: CL 143917 ADT Android JUnit: Change logic to provide an explicit project or package to run to the device InstrumentationTestRunner, instead of providing the potentially huge list of test classes. Discontinue support for running all tests in a source folder.

Original author: brettchabot
  Merged from: //branches/cupcake/...
  Original author: android-build
  Merged from: //branches/donutburger/...

Automated import of CL 143919
This commit is contained in:
Brett Chabot
2009-03-31 19:16:14 -07:00
committed by The Android Open Source Project
parent 99a0b5c4a2
commit ac2a8469f2
10 changed files with 404 additions and 80 deletions

View File

@@ -49,6 +49,7 @@ public class RemoteAndroidTestRunner {
private static final String LOG_ARG_NAME = "log";
private static final String DEBUG_ARG_NAME = "debug";
private static final String COVERAGE_ARG_NAME = "coverage";
private static final String PACKAGE_ARG_NAME = "package";
/**
* Creates a remote Android test runner.
@@ -145,6 +146,16 @@ public class RemoteAndroidTestRunner {
setClassName(className + METHOD_SEPARATOR + testName);
}
/**
* Sets to run all tests in specified package
* Must be called before 'run'.
*
* @param packageName fully qualified package name (eg x.y.z)
*/
public void setTestPackageName(String packageName) {
addInstrumentationArg(PACKAGE_ARG_NAME, packageName);
}
/**
* Adds a argument to include in instrumentation command.
* <p/>