| 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 re | 6 import re |
| 7 import time | 7 import time |
| 8 | 8 |
| 9 from devil.android import device_errors |
| 10 from devil.android.sdk import keyevent |
| 9 from pylib import flag_changer | 11 from pylib import flag_changer |
| 10 from pylib.base import base_test_result | 12 from pylib.base import base_test_result |
| 11 from pylib.base import test_run | 13 from pylib.base import test_run |
| 12 from pylib.constants import keyevent | |
| 13 from pylib.device import device_errors | |
| 14 from pylib.local.device import local_device_test_run | 14 from pylib.local.device import local_device_test_run |
| 15 | 15 |
| 16 | 16 |
| 17 TIMEOUT_ANNOTATIONS = [ | 17 TIMEOUT_ANNOTATIONS = [ |
| 18 ('Manual', 10 * 60 * 60), | 18 ('Manual', 10 * 60 * 60), |
| 19 ('IntegrationTest', 30 * 60), | 19 ('IntegrationTest', 30 * 60), |
| 20 ('External', 10 * 60), | 20 ('External', 10 * 60), |
| 21 ('EnormousTest', 10 * 60), | 21 ('EnormousTest', 10 * 60), |
| 22 ('LargeTest', 5 * 60), | 22 ('LargeTest', 5 * 60), |
| 23 ('MediumTest', 3 * 60), | 23 ('MediumTest', 3 * 60), |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 182 |
| 183 try: | 183 try: |
| 184 scale = int(annotations.get('TimeoutScale', 1)) | 184 scale = int(annotations.get('TimeoutScale', 1)) |
| 185 except ValueError as e: | 185 except ValueError as e: |
| 186 logging.warning("Non-integer value of TimeoutScale ignored. (%s)", str(e)) | 186 logging.warning("Non-integer value of TimeoutScale ignored. (%s)", str(e)) |
| 187 scale = 1 | 187 scale = 1 |
| 188 timeout *= scale | 188 timeout *= scale |
| 189 | 189 |
| 190 return timeout | 190 return timeout |
| 191 | 191 |
| OLD | NEW |