| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 else: | 332 else: |
| 333 logging.debug('raw output from %s:', test_display_name) | 333 logging.debug('raw output from %s:', test_display_name) |
| 334 for l in output: | 334 for l in output: |
| 335 logging.debug(' %s', l) | 335 logging.debug(' %s', l) |
| 336 if self._test_instance.coverage_directory: | 336 if self._test_instance.coverage_directory: |
| 337 device.PullFile(coverage_directory, | 337 device.PullFile(coverage_directory, |
| 338 self._test_instance.coverage_directory) | 338 self._test_instance.coverage_directory) |
| 339 device.RunShellCommand('rm -f %s' % os.path.join(coverage_directory, | 339 device.RunShellCommand('rm -f %s' % os.path.join(coverage_directory, |
| 340 '*')) | 340 '*')) |
| 341 if self._test_instance.store_tombstones: | 341 if self._test_instance.store_tombstones: |
| 342 resolved_tombstones = None | 342 tombstones_url = None |
| 343 for result in results: | 343 for result in results: |
| 344 if result.GetType() == base_test_result.ResultType.CRASH: | 344 if result.GetType() == base_test_result.ResultType.CRASH: |
| 345 if not resolved_tombstones: | 345 if not tombstones_url: |
| 346 resolved_tombstones = '\n'.join(tombstones.ResolveTombstones( | 346 resolved_tombstones = tombstones.ResolveTombstones( |
| 347 device, | 347 device, |
| 348 resolve_all_tombstones=True, | 348 resolve_all_tombstones=True, |
| 349 include_stack_symbols=False, | 349 include_stack_symbols=False, |
| 350 wipe_tombstones=True)) | 350 wipe_tombstones=True) |
| 351 result.SetTombstones(resolved_tombstones) | 351 stream_name = 'tombstones_%s_%s' % ( |
| 352 time.strftime('%Y%m%dT%H%M%S', time.localtime()), |
| 353 device.serial) |
| 354 tombstones_url = tombstones.LogdogTombstones(resolved_tombstones, |
| 355 stream_name) |
| 356 result.SetTombstonesUrl(tombstones_url) |
| 352 return results, None | 357 return results, None |
| 353 | 358 |
| 354 #override | 359 #override |
| 355 def _ShouldRetry(self, test): | 360 def _ShouldRetry(self, test): |
| 356 if 'RetryOnFailure' in test.get('annotations', {}): | 361 if 'RetryOnFailure' in test.get('annotations', {}): |
| 357 return True | 362 return True |
| 358 | 363 |
| 359 # TODO(jbudorick): Remove this log message once @RetryOnFailure has been | 364 # TODO(jbudorick): Remove this log message once @RetryOnFailure has been |
| 360 # enabled for a while. See crbug.com/619055 for more details. | 365 # enabled for a while. See crbug.com/619055 for more details. |
| 361 logging.error('Default retries are being phased out. crbug.com/619055') | 366 logging.error('Default retries are being phased out. crbug.com/619055') |
| (...skipping 18 matching lines...) Expand all Loading... |
| 380 timeout = v | 385 timeout = v |
| 381 break | 386 break |
| 382 else: | 387 else: |
| 383 logging.warning('Using default 1 minute timeout for %s', test_name) | 388 logging.warning('Using default 1 minute timeout for %s', test_name) |
| 384 timeout = 60 | 389 timeout = 60 |
| 385 | 390 |
| 386 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) | 391 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) |
| 387 | 392 |
| 388 return timeout | 393 return timeout |
| 389 | 394 |
| OLD | NEW |