OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 collections | 5 import collections |
6 import itertools | 6 import itertools |
7 import logging | 7 import logging |
8 import os | 8 import os |
9 import posixpath | 9 import posixpath |
10 import time | 10 import time |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 if not tombstones_url: | 439 if not tombstones_url: |
440 resolved_tombstones = tombstones.ResolveTombstones( | 440 resolved_tombstones = tombstones.ResolveTombstones( |
441 device, | 441 device, |
442 resolve_all_tombstones=True, | 442 resolve_all_tombstones=True, |
443 include_stack_symbols=False, | 443 include_stack_symbols=False, |
444 wipe_tombstones=True) | 444 wipe_tombstones=True) |
445 stream_name = 'tombstones_%s_%s' % ( | 445 stream_name = 'tombstones_%s_%s' % ( |
446 time.strftime('%Y%m%dT%H%M%S', time.localtime()), | 446 time.strftime('%Y%m%dT%H%M%S', time.localtime()), |
447 device.serial) | 447 device.serial) |
448 tombstones_url = logdog_helper.text( | 448 tombstones_url = logdog_helper.text( |
449 stream_name, resolved_tombstones) | 449 stream_name, '\n'.join(resolved_tombstones)) |
450 result.SetLink('tombstones', tombstones_url) | 450 result.SetLink('tombstones', tombstones_url) |
451 | 451 |
452 tests_stripped_disabled_prefix = set() | 452 tests_stripped_disabled_prefix = set() |
453 for t in test: | 453 for t in test: |
454 tests_stripped_disabled_prefix.add( | 454 tests_stripped_disabled_prefix.add( |
455 gtest_test_instance.TestNameWithoutDisabledPrefix(t)) | 455 gtest_test_instance.TestNameWithoutDisabledPrefix(t)) |
456 not_run_tests = tests_stripped_disabled_prefix.difference( | 456 not_run_tests = tests_stripped_disabled_prefix.difference( |
457 set(r.GetName() for r in results)) | 457 set(r.GetName() for r in results)) |
458 return results, list(not_run_tests) if results else None | 458 return results, list(not_run_tests) if results else None |
459 | 459 |
460 #override | 460 #override |
461 def TearDown(self): | 461 def TearDown(self): |
462 @local_device_environment.handle_shard_failures | 462 @local_device_environment.handle_shard_failures |
463 @trace_event.traced | 463 @trace_event.traced |
464 def individual_device_tear_down(dev): | 464 def individual_device_tear_down(dev): |
465 for s in self._servers.get(str(dev), []): | 465 for s in self._servers.get(str(dev), []): |
466 s.TearDown() | 466 s.TearDown() |
467 | 467 |
468 tool = self.GetTool(dev) | 468 tool = self.GetTool(dev) |
469 tool.CleanUpEnvironment() | 469 tool.CleanUpEnvironment() |
470 | 470 |
471 self._env.parallel_devices.pMap(individual_device_tear_down) | 471 self._env.parallel_devices.pMap(individual_device_tear_down) |
OLD | NEW |