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

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

Issue 2581553004: Store tombstones url, not the actual tombstones, inside test result. (Closed)
Patch Set: small fixes Created 4 years 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
OLDNEW
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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 resolved_tombstones = 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 resolved_tombstones:
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_%s' % (
352 result.GetName(),
353 time.strftime('%Y%m%dT%H%M%S', time.localtime()),
354 device.serial)
355 tombstones_url = tombstones.LogdogTombstones(resolved_tombstones,
356 stream_name)
357 result.SetTombstonesUrl(tombstones_url)
352 return results, None 358 return results, None
353 359
354 #override 360 #override
355 def _ShouldRetry(self, test): 361 def _ShouldRetry(self, test):
356 if 'RetryOnFailure' in test.get('annotations', {}): 362 if 'RetryOnFailure' in test.get('annotations', {}):
357 return True 363 return True
358 364
359 # TODO(jbudorick): Remove this log message once @RetryOnFailure has been 365 # TODO(jbudorick): Remove this log message once @RetryOnFailure has been
360 # enabled for a while. See crbug.com/619055 for more details. 366 # enabled for a while. See crbug.com/619055 for more details.
361 logging.error('Default retries are being phased out. crbug.com/619055') 367 logging.error('Default retries are being phased out. crbug.com/619055')
(...skipping 18 matching lines...) Expand all
380 timeout = v 386 timeout = v
381 break 387 break
382 else: 388 else:
383 logging.warning('Using default 1 minute timeout for %s', test_name) 389 logging.warning('Using default 1 minute timeout for %s', test_name)
384 timeout = 60 390 timeout = 60
385 391
386 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) 392 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations)
387 393
388 return timeout 394 return timeout
389 395
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698