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 symbolizer = self._test_instance.symbolizer | |
jbudorick
2017/07/20 15:58:03
nit: just use this in the call; no need to assign
BigBossZhiling
2017/07/20 23:11:37
Done.
| |
536 resolved_tombstones = tombstones.ResolveTombstones( | 537 resolved_tombstones = tombstones.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, |
542 tombstone_symbolizer=symbolizer) | |
541 stream_name = 'tombstones_%s_%s' % ( | 543 stream_name = 'tombstones_%s_%s' % ( |
542 time.strftime('%Y%m%dT%H%M%S-UTC', time.gmtime()), | 544 time.strftime('%Y%m%dT%H%M%S-UTC', time.gmtime()), |
543 device.serial) | 545 device.serial) |
546 with open('/tmp/tmp_tombstones.txt', 'w') as f: | |
jbudorick
2017/07/20 15:58:03
Leftover from debugging?
BigBossZhiling
2017/07/20 23:11:37
Done.
| |
547 f.write('\n'.join(resolved_tombstones)) | |
544 tombstones_url = logdog_helper.text( | 548 tombstones_url = logdog_helper.text( |
545 stream_name, '\n'.join(resolved_tombstones)) | 549 stream_name, '\n'.join(resolved_tombstones)) |
546 result.SetLink('tombstones', tombstones_url) | 550 result.SetLink('tombstones', tombstones_url) |
547 | 551 |
548 if self._env.concurrent_adb: | 552 if self._env.concurrent_adb: |
549 post_test_step_thread_group.JoinAll() | 553 post_test_step_thread_group.JoinAll() |
550 return results, None | 554 return results, None |
551 | 555 |
552 def _SaveScreenshot(self, device, screenshot_host_dir, screenshot_device_file, | 556 def _SaveScreenshot(self, device, screenshot_host_dir, screenshot_device_file, |
553 test_name, results): | 557 test_name, results): |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
711 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) | 715 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) |
712 | 716 |
713 return timeout | 717 return timeout |
714 | 718 |
715 def _IsRenderTest(test): | 719 def _IsRenderTest(test): |
716 """Determines if a test or list of tests has a RenderTest amongst them.""" | 720 """Determines if a test or list of tests has a RenderTest amongst them.""" |
717 if not isinstance(test, list): | 721 if not isinstance(test, list): |
718 test = [test] | 722 test = [test] |
719 return any([RENDER_TEST_FEATURE_ANNOTATION in t['annotations'].get( | 723 return any([RENDER_TEST_FEATURE_ANNOTATION in t['annotations'].get( |
720 FEATURE_ANNOTATION, {}).get('value', ()) for t in test]) | 724 FEATURE_ANNOTATION, {}).get('value', ()) for t in test]) |
OLD | NEW |