| Index: build/android/pylib/instrumentation/instrumentation_test_instance_test.py
|
| diff --git a/build/android/pylib/instrumentation/instrumentation_test_instance_test.py b/build/android/pylib/instrumentation/instrumentation_test_instance_test.py
|
| index 10fe95c738e0cd67431c204a47106b7724582cfe..386f2897540856ce982d594c0145abe09675ed2b 100755
|
| --- a/build/android/pylib/instrumentation/instrumentation_test_instance_test.py
|
| +++ b/build/android/pylib/instrumentation/instrumentation_test_instance_test.py
|
| @@ -44,6 +44,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| {
|
| 'annotations': {'Feature': {'value': ['Foo']}},
|
| 'class': 'org.chromium.test.SampleTest',
|
| + 'superclass': 'java.lang.Object',
|
| 'methods': [
|
| {
|
| 'annotations': {'SmallTest': None},
|
| @@ -58,6 +59,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| {
|
| 'annotations': {'Feature': {'value': ['Bar']}},
|
| 'class': 'org.chromium.test.SampleTest2',
|
| + 'superclass': 'java.lang.Object',
|
| 'methods': [
|
| {
|
| 'annotations': {'SmallTest': None},
|
| @@ -75,6 +77,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| },
|
| 'class': 'org.chromium.test.SampleTest',
|
| 'method': 'testMethod1',
|
| + 'is_junit4': True,
|
| },
|
| {
|
| 'annotations': {
|
| @@ -83,6 +86,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| },
|
| 'class': 'org.chromium.test.SampleTest',
|
| 'method': 'testMethod2',
|
| + 'is_junit4': True,
|
| },
|
| {
|
| 'annotations': {
|
| @@ -91,10 +95,12 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| },
|
| 'class': 'org.chromium.test.SampleTest2',
|
| 'method': 'testMethod1',
|
| + 'is_junit4': True,
|
| },
|
| ]
|
|
|
| o._test_jar = 'path/to/test.jar'
|
| + o._test_runner_junit4 = 'J4Runner'
|
| with mock.patch(_INSTRUMENTATION_TEST_INSTANCE_PATH % '_GetTestsFromPickle',
|
| return_value=raw_tests):
|
| actual_tests = o.GetTests()
|
| @@ -107,6 +113,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| {
|
| 'annotations': {'Feature': {'value': ['Foo']}},
|
| 'class': 'org.chromium.test.SampleTest',
|
| + 'superclass': 'java.lang.Object',
|
| 'methods': [
|
| {
|
| 'annotations': {'SmallTest': None},
|
| @@ -127,12 +134,14 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| 'SmallTest': None,
|
| },
|
| 'class': 'org.chromium.test.SampleTest',
|
| + 'is_junit4': True,
|
| 'method': 'testMethod1',
|
| },
|
| ]
|
|
|
| o._test_filter = 'org.chromium.test.SampleTest.testMethod1'
|
| o._test_jar = 'path/to/test.jar'
|
| + o._test_runner_junit4 = 'J4Runner'
|
| with mock.patch(_INSTRUMENTATION_TEST_INSTANCE_PATH % '_GetTestsFromPickle',
|
| return_value=raw_tests):
|
| actual_tests = o.GetTests()
|
| @@ -145,6 +154,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| {
|
| 'annotations': {'Feature': {'value': ['Foo']}},
|
| 'class': 'org.chromium.test.SampleTest',
|
| + 'superclass': 'java.lang.Object',
|
| 'methods': [
|
| {
|
| 'annotations': {'SmallTest': None},
|
| @@ -159,6 +169,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| {
|
| 'annotations': {'Feature': {'value': ['Bar']}},
|
| 'class': 'org.chromium.test.SampleTest2',
|
| + 'superclass': 'java.lang.Object',
|
| 'methods': [
|
| {
|
| 'annotations': {'SmallTest': None},
|
| @@ -175,12 +186,14 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| 'SmallTest': None,
|
| },
|
| 'class': 'org.chromium.test.SampleTest2',
|
| + 'is_junit4': True,
|
| 'method': 'testMethod1',
|
| },
|
| ]
|
|
|
| o._test_filter = 'org.chromium.test.SampleTest2.*'
|
| o._test_jar = 'path/to/test.jar'
|
| + o._test_runner_junit4 = 'J4Runner'
|
| with mock.patch(_INSTRUMENTATION_TEST_INSTANCE_PATH % '_GetTestsFromPickle',
|
| return_value=raw_tests):
|
| actual_tests = o.GetTests()
|
| @@ -193,6 +206,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| {
|
| 'annotations': {'Feature': {'value': ['Foo']}},
|
| 'class': 'org.chromium.test.SampleTest',
|
| + 'superclass': 'java.lang.Object',
|
| 'methods': [
|
| {
|
| 'annotations': {'SmallTest': None},
|
| @@ -207,6 +221,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| {
|
| 'annotations': {'Feature': {'value': ['Bar']}},
|
| 'class': 'org.chromium.test.SampleTest2',
|
| + 'superclass': 'java.lang.Object',
|
| 'methods': [
|
| {
|
| 'annotations': {'SmallTest': None},
|
| @@ -223,6 +238,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| 'MediumTest': None,
|
| },
|
| 'class': 'org.chromium.test.SampleTest',
|
| + 'is_junit4': True,
|
| 'method': 'testMethod2',
|
| },
|
| {
|
| @@ -231,12 +247,14 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| 'SmallTest': None,
|
| },
|
| 'class': 'org.chromium.test.SampleTest2',
|
| + 'is_junit4': True,
|
| 'method': 'testMethod1',
|
| },
|
| ]
|
|
|
| o._test_filter = '*-org.chromium.test.SampleTest.testMethod1'
|
| o._test_jar = 'path/to/test.jar'
|
| + o._test_runner_junit4 = 'J4Runner'
|
| with mock.patch(_INSTRUMENTATION_TEST_INSTANCE_PATH % '_GetTestsFromPickle',
|
| return_value=raw_tests):
|
| actual_tests = o.GetTests()
|
| @@ -249,6 +267,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| {
|
| 'annotations': {'Feature': {'value': ['Foo']}},
|
| 'class': 'org.chromium.test.SampleTest',
|
| + 'superclass': 'java.lang.Object',
|
| 'methods': [
|
| {
|
| 'annotations': {'SmallTest': None},
|
| @@ -263,6 +282,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| {
|
| 'annotations': {'Feature': {'value': ['Bar']}},
|
| 'class': 'org.chromium.test.SampleTest2',
|
| + 'superclass': 'java.lang.Object',
|
| 'methods': [
|
| {
|
| 'annotations': {'SmallTest': None},
|
| @@ -279,6 +299,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| 'SmallTest': None,
|
| },
|
| 'class': 'org.chromium.test.SampleTest',
|
| + 'is_junit4': True,
|
| 'method': 'testMethod1',
|
| },
|
| {
|
| @@ -287,12 +308,14 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| 'SmallTest': None,
|
| },
|
| 'class': 'org.chromium.test.SampleTest2',
|
| + 'is_junit4': True,
|
| 'method': 'testMethod1',
|
| },
|
| ]
|
|
|
| o._annotations = [('SmallTest', None)]
|
| o._test_jar = 'path/to/test.jar'
|
| + o._test_runner_junit4 = 'J4Runner'
|
| with mock.patch(_INSTRUMENTATION_TEST_INSTANCE_PATH % '_GetTestsFromPickle',
|
| return_value=raw_tests):
|
| actual_tests = o.GetTests()
|
| @@ -305,6 +328,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| {
|
| 'annotations': {'Feature': {'value': ['Foo']}},
|
| 'class': 'org.chromium.test.SampleTest',
|
| + 'superclass': 'junit.framework.TestCase',
|
| 'methods': [
|
| {
|
| 'annotations': {'SmallTest': None},
|
| @@ -319,6 +343,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| {
|
| 'annotations': {'Feature': {'value': ['Bar']}},
|
| 'class': 'org.chromium.test.SampleTest2',
|
| + 'superclass': 'junit.framework.TestCase',
|
| 'methods': [
|
| {
|
| 'annotations': {'SmallTest': None},
|
| @@ -335,12 +360,14 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| 'MediumTest': None,
|
| },
|
| 'class': 'org.chromium.test.SampleTest',
|
| + 'is_junit4': False,
|
| 'method': 'testMethod2',
|
| },
|
| ]
|
|
|
| o._excluded_annotations = [('SmallTest', None)]
|
| o._test_jar = 'path/to/test.jar'
|
| + o._test_runner_junit4 = 'J4Runner'
|
| with mock.patch(_INSTRUMENTATION_TEST_INSTANCE_PATH % '_GetTestsFromPickle',
|
| return_value=raw_tests):
|
| actual_tests = o.GetTests()
|
| @@ -353,6 +380,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| {
|
| 'annotations': {'Feature': {'value': ['Foo']}},
|
| 'class': 'org.chromium.test.SampleTest',
|
| + 'superclass': 'junit.framework.TestCase',
|
| 'methods': [
|
| {
|
| 'annotations': {
|
| @@ -373,6 +401,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| {
|
| 'annotations': {'Feature': {'value': ['Bar']}},
|
| 'class': 'org.chromium.test.SampleTest2',
|
| + 'superclass': 'junit.framework.TestCase',
|
| 'methods': [
|
| {
|
| 'annotations': {
|
| @@ -393,12 +422,14 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| 'TestValue': '1',
|
| },
|
| 'class': 'org.chromium.test.SampleTest',
|
| + 'is_junit4': False,
|
| 'method': 'testMethod1',
|
| },
|
| ]
|
|
|
| o._annotations = [('TestValue', '1')]
|
| o._test_jar = 'path/to/test.jar'
|
| + o._test_runner_junit4 = 'J4Runner'
|
| with mock.patch(_INSTRUMENTATION_TEST_INSTANCE_PATH % '_GetTestsFromPickle',
|
| return_value=raw_tests):
|
| actual_tests = o.GetTests()
|
| @@ -411,6 +442,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| {
|
| 'annotations': {'Feature': {'value': ['Foo']}},
|
| 'class': 'org.chromium.test.SampleTest',
|
| + 'superclass': 'java.lang.Object',
|
| 'methods': [
|
| {
|
| 'annotations': {'SmallTest': None},
|
| @@ -425,6 +457,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| {
|
| 'annotations': {'Feature': {'value': ['Bar']}},
|
| 'class': 'org.chromium.test.SampleTest2',
|
| + 'superclass': 'java.lang.Object',
|
| 'methods': [
|
| {
|
| 'annotations': {'SmallTest': None},
|
| @@ -441,12 +474,14 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| 'SmallTest': None,
|
| },
|
| 'class': 'org.chromium.test.SampleTest2',
|
| + 'is_junit4': True,
|
| 'method': 'testMethod1',
|
| },
|
| ]
|
|
|
| o._annotations = [('Feature', 'Bar')]
|
| o._test_jar = 'path/to/test.jar'
|
| + o._test_runner_junit4 = 'J4Runner'
|
| with mock.patch(_INSTRUMENTATION_TEST_INSTANCE_PATH % '_GetTestsFromPickle',
|
| return_value=raw_tests):
|
| actual_tests = o.GetTests()
|
| @@ -459,6 +494,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| {
|
| 'annotations': {'Feature': {'value': ['Foo']}},
|
| 'class': 'org.chromium.test.SampleTest',
|
| + 'superclass': 'junit.framework.TestCase',
|
| 'methods': [
|
| {
|
| 'annotations': {'SmallTest': None},
|
| @@ -476,6 +512,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| {
|
| 'annotations': {'Feature': {'value': ['Bar']}},
|
| 'class': 'org.chromium.test.SampleTest2',
|
| + 'superclass': 'junit.framework.TestCase',
|
| 'methods': [
|
| {
|
| 'annotations': {'SmallTest': None},
|
| @@ -492,6 +529,7 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| 'MediumTest': None,
|
| },
|
| 'class': 'org.chromium.test.SampleTest',
|
| + 'is_junit4': False,
|
| 'method': 'testMethod2',
|
| },
|
| {
|
| @@ -500,12 +538,14 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
|
| 'SmallTest': None,
|
| },
|
| 'class': 'org.chromium.test.SampleTest2',
|
| + 'is_junit4': False,
|
| 'method': 'testMethod1',
|
| },
|
| ]
|
|
|
| o._annotations = [('Feature', 'Bar'), ('Feature', 'Baz')]
|
| o._test_jar = 'path/to/test.jar'
|
| + o._test_runner_junit4 = 'J4Runner'
|
| with mock.patch(_INSTRUMENTATION_TEST_INSTANCE_PATH % '_GetTestsFromPickle',
|
| return_value=raw_tests):
|
| actual_tests = o.GetTests()
|
|
|