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

Side by Side Diff: build/android/pylib/instrumentation/instrumentation_test_instance.py

Issue 2237553003: (Reland) Added tombstones in instrumentation tests results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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 | build/android/pylib/instrumentation/test_result.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 collections 5 import collections
6 import copy 6 import copy
7 import logging 7 import logging
8 import os 8 import os
9 import pickle 9 import pickle
10 import re 10 import re
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 self._driver_package = None 386 self._driver_package = None
387 self._driver_name = None 387 self._driver_name = None
388 self._initializeDriverAttributes() 388 self._initializeDriverAttributes()
389 389
390 self._timeout_scale = None 390 self._timeout_scale = None
391 self._initializeTestControlAttributes(args) 391 self._initializeTestControlAttributes(args)
392 392
393 self._coverage_directory = None 393 self._coverage_directory = None
394 self._initializeTestCoverageAttributes(args) 394 self._initializeTestCoverageAttributes(args)
395 395
396 self._store_tombstones = False
397 self._initializeTombstonesAttributes(args)
398
396 def _initializeApkAttributes(self, args, error_func): 399 def _initializeApkAttributes(self, args, error_func):
397 if args.apk_under_test: 400 if args.apk_under_test:
398 apk_under_test_path = args.apk_under_test 401 apk_under_test_path = args.apk_under_test
399 if not args.apk_under_test.endswith('.apk'): 402 if not args.apk_under_test.endswith('.apk'):
400 apk_under_test_path = os.path.join( 403 apk_under_test_path = os.path.join(
401 constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR, 404 constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR,
402 '%s.apk' % args.apk_under_test) 405 '%s.apk' % args.apk_under_test)
403 406
404 if not os.path.exists(apk_under_test_path): 407 if not os.path.exists(apk_under_test_path):
405 error_func('Unable to find APK under test: %s' % apk_under_test_path) 408 error_func('Unable to find APK under test: %s' % apk_under_test_path)
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 else: 533 else:
531 self._driver_apk = None 534 self._driver_apk = None
532 535
533 def _initializeTestControlAttributes(self, args): 536 def _initializeTestControlAttributes(self, args):
534 self._screenshot_dir = args.screenshot_dir 537 self._screenshot_dir = args.screenshot_dir
535 self._timeout_scale = args.timeout_scale or 1 538 self._timeout_scale = args.timeout_scale or 1
536 539
537 def _initializeTestCoverageAttributes(self, args): 540 def _initializeTestCoverageAttributes(self, args):
538 self._coverage_directory = args.coverage_dir 541 self._coverage_directory = args.coverage_dir
539 542
543 def _initializeTombstonesAttributes(self, args):
544 self._store_tombstones = args.store_tombstones
545
540 @property 546 @property
541 def additional_apks(self): 547 def additional_apks(self):
542 return self._additional_apks 548 return self._additional_apks
543 549
544 @property 550 @property
545 def apk_under_test(self): 551 def apk_under_test(self):
546 return self._apk_under_test 552 return self._apk_under_test
547 553
548 @property 554 @property
549 def apk_under_test_incremental_install_script(self): 555 def apk_under_test_incremental_install_script(self):
(...skipping 21 matching lines...) Expand all
571 577
572 @property 578 @property
573 def package_info(self): 579 def package_info(self):
574 return self._package_info 580 return self._package_info
575 581
576 @property 582 @property
577 def screenshot_dir(self): 583 def screenshot_dir(self):
578 return self._screenshot_dir 584 return self._screenshot_dir
579 585
580 @property 586 @property
587 def store_tombstones(self):
588 return self._store_tombstones
589
590 @property
581 def suite(self): 591 def suite(self):
582 return self._suite 592 return self._suite
583 593
584 @property 594 @property
585 def test_apk(self): 595 def test_apk(self):
586 return self._test_apk 596 return self._test_apk
587 597
588 @property 598 @property
589 def test_apk_incremental_install_script(self): 599 def test_apk_incremental_install_script(self):
590 return self._test_apk_incremental_install_script 600 return self._test_apk_incremental_install_script
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 @staticmethod 690 @staticmethod
681 def GenerateTestResults( 691 def GenerateTestResults(
682 result_code, result_bundle, statuses, start_ms, duration_ms): 692 result_code, result_bundle, statuses, start_ms, duration_ms):
683 return GenerateTestResults(result_code, result_bundle, statuses, 693 return GenerateTestResults(result_code, result_bundle, statuses,
684 start_ms, duration_ms) 694 start_ms, duration_ms)
685 695
686 #override 696 #override
687 def TearDown(self): 697 def TearDown(self):
688 if self._isolate_delegate: 698 if self._isolate_delegate:
689 self._isolate_delegate.Clear() 699 self._isolate_delegate.Clear()
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/instrumentation/test_result.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698