| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import collections | 5 import collections |
| 6 import copy | 6 import copy |
| 7 import logging | 7 import logging |
| 8 import os | 8 import os |
| 9 import pickle | 9 import pickle |
| 10 import re | 10 import re |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TestListFile') | 41 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TestListFile') |
| 42 _EXTRA_DRIVER_TARGET_PACKAGE = ( | 42 _EXTRA_DRIVER_TARGET_PACKAGE = ( |
| 43 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TargetPackage') | 43 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TargetPackage') |
| 44 _EXTRA_DRIVER_TARGET_CLASS = ( | 44 _EXTRA_DRIVER_TARGET_CLASS = ( |
| 45 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TargetClass') | 45 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TargetClass') |
| 46 _EXTRA_TIMEOUT_SCALE = ( | 46 _EXTRA_TIMEOUT_SCALE = ( |
| 47 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TimeoutScale') | 47 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TimeoutScale') |
| 48 | 48 |
| 49 _PARAMETERIZED_TEST_ANNOTATION = 'ParameterizedTest' | 49 _PARAMETERIZED_TEST_ANNOTATION = 'ParameterizedTest' |
| 50 _PARAMETERIZED_TEST_SET_ANNOTATION = 'ParameterizedTest$Set' | 50 _PARAMETERIZED_TEST_SET_ANNOTATION = 'ParameterizedTest$Set' |
| 51 _NATIVE_CRASH_RE = re.compile('native crash', re.IGNORECASE) | 51 _NATIVE_CRASH_RE = re.compile('(process|native) crash', re.IGNORECASE) |
| 52 _PICKLE_FORMAT_VERSION = 10 | 52 _PICKLE_FORMAT_VERSION = 10 |
| 53 | 53 |
| 54 | 54 |
| 55 class MissingSizeAnnotationError(Exception): | 55 class MissingSizeAnnotationError(Exception): |
| 56 def __init__(self, class_name): | 56 def __init__(self, class_name): |
| 57 super(MissingSizeAnnotationError, self).__init__(class_name + | 57 super(MissingSizeAnnotationError, self).__init__(class_name + |
| 58 ': Test method is missing required size annotation. Add one of: ' + | 58 ': Test method is missing required size annotation. Add one of: ' + |
| 59 ', '.join('@' + a for a in _VALID_ANNOTATIONS)) | 59 ', '.join('@' + a for a in _VALID_ANNOTATIONS)) |
| 60 | 60 |
| 61 | 61 |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 @staticmethod | 678 @staticmethod |
| 679 def GenerateTestResults( | 679 def GenerateTestResults( |
| 680 result_code, result_bundle, statuses, start_ms, duration_ms): | 680 result_code, result_bundle, statuses, start_ms, duration_ms): |
| 681 return GenerateTestResults(result_code, result_bundle, statuses, | 681 return GenerateTestResults(result_code, result_bundle, statuses, |
| 682 start_ms, duration_ms) | 682 start_ms, duration_ms) |
| 683 | 683 |
| 684 #override | 684 #override |
| 685 def TearDown(self): | 685 def TearDown(self): |
| 686 if self._isolate_delegate: | 686 if self._isolate_delegate: |
| 687 self._isolate_delegate.Clear() | 687 self._isolate_delegate.Clear() |
| OLD | NEW |