Chromium Code Reviews| 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 |
| 11 from devil.android import device_errors | 11 from devil.android import device_errors |
| 12 from devil.android import flag_changer | 12 from devil.android import flag_changer |
| 13 from devil.utils import reraiser_thread | 13 from devil.utils import reraiser_thread |
| 14 from pylib import valgrind_tools | 14 from pylib import valgrind_tools |
| 15 from pylib.base import base_test_result | 15 from pylib.base import base_test_result |
| 16 from pylib.local.device import local_device_test_run | 16 from pylib.local.device import local_device_test_run |
| 17 | 17 |
| 18 | 18 |
| 19 TIMEOUT_ANNOTATIONS = [ | 19 TIMEOUT_ANNOTATIONS = [ |
| 20 ('Manual', 10 * 60 * 60), | 20 ('Manual', 10 * 60 * 60), |
| 21 ('IntegrationTest', 30 * 60), | 21 ('IntegrationTest', 30 * 60), |
| 22 ('External', 10 * 60), | 22 ('External', 10 * 60), |
| 23 ('EnormousTest', 10 * 60), | 23 ('EnormousTest', 10 * 60), |
| 24 ('LargeTest', 5 * 60), | 24 ('LargeTest', 5 * 60), |
| 25 ('MediumTest', 3 * 60), | 25 ('MediumTest', 3 * 60), |
| 26 ('RenderTest', 3 * 60), | |
|
jbudorick
2016/07/01 15:34:21
I don't think RenderTest should have its own timeo
PEConn
2016/07/01 16:46:13
Done.
| |
| 26 ('SmallTest', 1 * 60), | 27 ('SmallTest', 1 * 60), |
| 27 ] | 28 ] |
| 28 | 29 |
| 29 | 30 |
| 30 # TODO(jbudorick): Make this private once the instrumentation test_runner is | 31 # TODO(jbudorick): Make this private once the instrumentation test_runner is |
| 31 # deprecated. | 32 # deprecated. |
| 32 def DidPackageCrashOnDevice(package_name, device): | 33 def DidPackageCrashOnDevice(package_name, device): |
| 33 # Dismiss any error dialogs. Limit the number in case we have an error | 34 # Dismiss any error dialogs. Limit the number in case we have an error |
| 34 # loop or we are failing to dismiss. | 35 # loop or we are failing to dismiss. |
| 35 try: | 36 try: |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 349 timeout = v | 350 timeout = v |
| 350 break | 351 break |
| 351 else: | 352 else: |
| 352 logging.warning('Using default 1 minute timeout for %s', test_name) | 353 logging.warning('Using default 1 minute timeout for %s', test_name) |
| 353 timeout = 60 | 354 timeout = 60 |
| 354 | 355 |
| 355 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) | 356 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) |
| 356 | 357 |
| 357 return timeout | 358 return timeout |
| 358 | 359 |
| OLD | NEW |