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 logging | 5 import logging |
6 import os | 6 import os |
7 import posixpath | 7 import posixpath |
8 import re | 8 import re |
9 import time | 9 import time |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 TIMEOUT_ANNOTATIONS = [ | 30 TIMEOUT_ANNOTATIONS = [ |
31 ('Manual', 10 * 60 * 60), | 31 ('Manual', 10 * 60 * 60), |
32 ('IntegrationTest', 30 * 60), | 32 ('IntegrationTest', 30 * 60), |
33 ('External', 10 * 60), | 33 ('External', 10 * 60), |
34 ('EnormousTest', 10 * 60), | 34 ('EnormousTest', 10 * 60), |
35 ('LargeTest', 5 * 60), | 35 ('LargeTest', 5 * 60), |
36 ('MediumTest', 3 * 60), | 36 ('MediumTest', 3 * 60), |
37 ('SmallTest', 1 * 60), | 37 ('SmallTest', 1 * 60), |
38 ] | 38 ] |
39 | 39 |
40 LOGCAT_FILTERS = ['*:e', 'chromium:v', 'cr_*:v'] | 40 LOGCAT_FILTERS = ['*:e', 'chromium:v', 'cr_*:v', 'DEBUG:I'] |
41 | 41 |
42 | 42 |
43 # TODO(jbudorick): Make this private once the instrumentation test_runner is | 43 # TODO(jbudorick): Make this private once the instrumentation test_runner is |
44 # deprecated. | 44 # deprecated. |
45 def DidPackageCrashOnDevice(package_name, device): | 45 def DidPackageCrashOnDevice(package_name, device): |
46 # Dismiss any error dialogs. Limit the number in case we have an error | 46 # Dismiss any error dialogs. Limit the number in case we have an error |
47 # loop or we are failing to dismiss. | 47 # loop or we are failing to dismiss. |
48 try: | 48 try: |
49 for _ in xrange(10): | 49 for _ in xrange(10): |
50 package = device.DismissCrashDialogIfNeeded() | 50 package = device.DismissCrashDialogIfNeeded() |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 if k in annotations: | 470 if k in annotations: |
471 timeout = v | 471 timeout = v |
472 break | 472 break |
473 else: | 473 else: |
474 logging.warning('Using default 1 minute timeout for %s', test_name) | 474 logging.warning('Using default 1 minute timeout for %s', test_name) |
475 timeout = 60 | 475 timeout = 60 |
476 | 476 |
477 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) | 477 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) |
478 | 478 |
479 return timeout | 479 return timeout |
OLD | NEW |