| 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 contextlib | 5 import contextlib |
| 6 import logging | 6 import logging |
| 7 import os | 7 import os |
| 8 import posixpath | 8 import posixpath |
| 9 import re | 9 import re |
| 10 import sys | 10 import sys |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 permissions=permissions) | 526 permissions=permissions) |
| 527 else: | 527 else: |
| 528 logging.debug('raw output from %s:', test_display_name) | 528 logging.debug('raw output from %s:', test_display_name) |
| 529 for l in output: | 529 for l in output: |
| 530 logging.debug(' %s', l) | 530 logging.debug(' %s', l) |
| 531 if self._test_instance.store_tombstones: | 531 if self._test_instance.store_tombstones: |
| 532 tombstones_url = None | 532 tombstones_url = None |
| 533 for result in results: | 533 for result in results: |
| 534 if result.GetType() == base_test_result.ResultType.CRASH: | 534 if result.GetType() == base_test_result.ResultType.CRASH: |
| 535 if not tombstones_url: | 535 if not tombstones_url: |
| 536 resolved_tombstones = tombstones.ResolveTombstones( | 536 tombstones_helper = self._test_instance.tombstones_helper |
| 537 resolved_tombstones = tombstones_helper.ResolveTombstones( |
| 537 device, | 538 device, |
| 538 resolve_all_tombstones=True, | 539 resolve_all_tombstones=True, |
| 539 include_stack_symbols=False, | 540 include_stack_symbols=False, |
| 540 wipe_tombstones=True) | 541 wipe_tombstones=True) |
| 541 stream_name = 'tombstones_%s_%s' % ( | 542 stream_name = 'tombstones_%s_%s' % ( |
| 542 time.strftime('%Y%m%dT%H%M%S-UTC', time.gmtime()), | 543 time.strftime('%Y%m%dT%H%M%S-UTC', time.gmtime()), |
| 543 device.serial) | 544 device.serial) |
| 544 tombstones_url = logdog_helper.text( | 545 tombstones_url = logdog_helper.text( |
| 545 stream_name, '\n'.join(resolved_tombstones)) | 546 stream_name, '\n'.join(resolved_tombstones)) |
| 546 result.SetLink('tombstones', tombstones_url) | 547 result.SetLink('tombstones', tombstones_url) |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) | 712 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) |
| 712 | 713 |
| 713 return timeout | 714 return timeout |
| 714 | 715 |
| 715 def _IsRenderTest(test): | 716 def _IsRenderTest(test): |
| 716 """Determines if a test or list of tests has a RenderTest amongst them.""" | 717 """Determines if a test or list of tests has a RenderTest amongst them.""" |
| 717 if not isinstance(test, list): | 718 if not isinstance(test, list): |
| 718 test = [test] | 719 test = [test] |
| 719 return any([RENDER_TEST_FEATURE_ANNOTATION in t['annotations'].get( | 720 return any([RENDER_TEST_FEATURE_ANNOTATION in t['annotations'].get( |
| 720 FEATURE_ANNOTATION, {}).get('value', ()) for t in test]) | 721 FEATURE_ANNOTATION, {}).get('value', ()) for t in test]) |
| OLD | NEW |