AI 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/... Automated import of CL 143918
This commit is contained in:
committed by
The Android Open Source Project
parent
37747492ad
commit
47eccd8c05
@@ -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/>
|
||||
|
||||
Reference in New Issue
Block a user