Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: build/android/pylib/local/device/local_device_gtest_run.py

Issue 2799673002: [Android] Fix tombstone streaming to logdog. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698