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

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

Issue 2201833002: Added tombstones in instrumentation tests results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fixes 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
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._initializeStoreTombstonesAttributes(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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 else: 531 else:
529 self._driver_apk = None 532 self._driver_apk = None
530 533
531 def _initializeTestControlAttributes(self, args): 534 def _initializeTestControlAttributes(self, args):
532 self._screenshot_dir = args.screenshot_dir 535 self._screenshot_dir = args.screenshot_dir
533 self._timeout_scale = args.timeout_scale or 1 536 self._timeout_scale = args.timeout_scale or 1
534 537
535 def _initializeTestCoverageAttributes(self, args): 538 def _initializeTestCoverageAttributes(self, args):
536 self._coverage_directory = args.coverage_dir 539 self._coverage_directory = args.coverage_dir
537 540
541 def _initializeStoreTombstonesAttributes(self, args):
mikecase (-- gone --) 2016/08/02 17:27:29 nit: this should be named _initializeTombstonesAtt
BigBossZhiling 2016/08/02 21:01:56 Done.
542 self._store_tombstones = args.store_tombstones
543
538 @property 544 @property
539 def additional_apks(self): 545 def additional_apks(self):
540 return self._additional_apks 546 return self._additional_apks
541 547
542 @property 548 @property
543 def apk_under_test(self): 549 def apk_under_test(self):
544 return self._apk_under_test 550 return self._apk_under_test
545 551
546 @property 552 @property
547 def apk_under_test_incremental_install_script(self): 553 def apk_under_test_incremental_install_script(self):
(...skipping 21 matching lines...) Expand all
569 575
570 @property 576 @property
571 def package_info(self): 577 def package_info(self):
572 return self._package_info 578 return self._package_info
573 579
574 @property 580 @property
575 def screenshot_dir(self): 581 def screenshot_dir(self):
576 return self._screenshot_dir 582 return self._screenshot_dir
577 583
578 @property 584 @property
585 def store_tombstones(self):
586 return self._store_tombstones
587
588 @property
579 def suite(self): 589 def suite(self):
580 return self._suite 590 return self._suite
581 591
582 @property 592 @property
583 def test_apk(self): 593 def test_apk(self):
584 return self._test_apk 594 return self._test_apk
585 595
586 @property 596 @property
587 def test_apk_incremental_install_script(self): 597 def test_apk_incremental_install_script(self):
588 return self._test_apk_incremental_install_script 598 return self._test_apk_incremental_install_script
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 @staticmethod 688 @staticmethod
679 def GenerateTestResults( 689 def GenerateTestResults(
680 result_code, result_bundle, statuses, start_ms, duration_ms): 690 result_code, result_bundle, statuses, start_ms, duration_ms):
681 return GenerateTestResults(result_code, result_bundle, statuses, 691 return GenerateTestResults(result_code, result_bundle, statuses,
682 start_ms, duration_ms) 692 start_ms, duration_ms)
683 693
684 #override 694 #override
685 def TearDown(self): 695 def TearDown(self):
686 if self._isolate_delegate: 696 if self._isolate_delegate:
687 self._isolate_delegate.Clear() 697 self._isolate_delegate.Clear()
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/instrumentation/test_result.py » ('j') | build/android/pylib/instrumentation/test_result.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698