Add "annotation" and "not-annotation" args to runtest.
Bug 2239240 Change-Id: I49bbee4b74e8b0a51b6e6144818a7e9c08b1b5c2
This commit is contained in:
@@ -120,6 +120,12 @@ class TestRunner(object):
|
|||||||
help="Restrict test to a specific java package")
|
help="Restrict test to a specific java package")
|
||||||
parser.add_option("-z", "--size", dest="test_size",
|
parser.add_option("-z", "--size", dest="test_size",
|
||||||
help="Restrict test to a specific test size")
|
help="Restrict test to a specific test size")
|
||||||
|
parser.add_option("--annotation", dest="test_annotation",
|
||||||
|
help="Include only those tests tagged with a specific"
|
||||||
|
" annotation")
|
||||||
|
parser.add_option("--not-annotation", dest="test_not_annotation",
|
||||||
|
help="Excludes any tests tagged with a specific"
|
||||||
|
" annotation")
|
||||||
parser.add_option("-u", "--user-tests-file", dest="user_tests_file",
|
parser.add_option("-u", "--user-tests-file", dest="user_tests_file",
|
||||||
metavar="FILE", default=user_test_default,
|
metavar="FILE", default=user_test_default,
|
||||||
help="Alternate source of user test definitions")
|
help="Alternate source of user test definitions")
|
||||||
|
|||||||
@@ -131,6 +131,10 @@ class InstrumentationTestSuite(test_suite.AbstractTestSuite):
|
|||||||
instrumentation_args["suiteAssignment"] = "true"
|
instrumentation_args["suiteAssignment"] = "true"
|
||||||
if options.coverage:
|
if options.coverage:
|
||||||
instrumentation_args["coverage"] = "true"
|
instrumentation_args["coverage"] = "true"
|
||||||
|
if options.test_annotation:
|
||||||
|
instrumentation_args["annotation"] = options.test_annotation
|
||||||
|
if options.test_not_annotation:
|
||||||
|
instrumentation_args["notAnnotation"] = options.test_not_annotation
|
||||||
if options.preview:
|
if options.preview:
|
||||||
adb_cmd = adb.PreviewInstrumentationCommand(
|
adb_cmd = adb.PreviewInstrumentationCommand(
|
||||||
package_name=self.GetPackageName(),
|
package_name=self.GetPackageName(),
|
||||||
|
|||||||
Reference in New Issue
Block a user