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

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

Issue 2933993002: Add local results details pages.
Patch Set: Fix some of Johns comments. Created 3 years, 3 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 copy 5 import copy
6 import logging 6 import logging
7 import os 7 import os
8 import pickle 8 import pickle
9 import re 9 import re
10 10
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 self._initializeTestControlAttributes(args) 491 self._initializeTestControlAttributes(args)
492 492
493 self._coverage_directory = None 493 self._coverage_directory = None
494 self._initializeTestCoverageAttributes(args) 494 self._initializeTestCoverageAttributes(args)
495 495
496 self._store_tombstones = False 496 self._store_tombstones = False
497 self._symbolizer = None 497 self._symbolizer = None
498 self._initializeTombstonesAttributes(args) 498 self._initializeTombstonesAttributes(args)
499 499
500 self._gs_results_bucket = None 500 self._gs_results_bucket = None
501 self._should_save_logcat = None
502 self._initializeLogAttributes(args) 501 self._initializeLogAttributes(args)
503 502
504 self._edit_shared_prefs = [] 503 self._edit_shared_prefs = []
505 self._initializeEditPrefsAttributes(args) 504 self._initializeEditPrefsAttributes(args)
506 505
507 self._replace_system_package = None 506 self._replace_system_package = None
508 self._initializeReplaceSystemPackageAttributes(args) 507 self._initializeReplaceSystemPackageAttributes(args)
509 508
510 self._external_shard_index = args.test_launcher_shard_index 509 self._external_shard_index = args.test_launcher_shard_index
511 self._total_external_shards = args.test_launcher_total_shards 510 self._total_external_shards = args.test_launcher_total_shards
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 self._coverage_directory = args.coverage_dir 676 self._coverage_directory = args.coverage_dir
678 677
679 def _initializeTombstonesAttributes(self, args): 678 def _initializeTombstonesAttributes(self, args):
680 self._store_tombstones = args.store_tombstones 679 self._store_tombstones = args.store_tombstones
681 self._symbolizer = stack_symbolizer.Symbolizer( 680 self._symbolizer = stack_symbolizer.Symbolizer(
682 self.apk_under_test.path if self.apk_under_test else None, 681 self.apk_under_test.path if self.apk_under_test else None,
683 args.enable_relocation_packing) 682 args.enable_relocation_packing)
684 683
685 def _initializeLogAttributes(self, args): 684 def _initializeLogAttributes(self, args):
686 self._gs_results_bucket = args.gs_results_bucket 685 self._gs_results_bucket = args.gs_results_bucket
687 self._should_save_logcat = bool(args.json_results_file)
688 686
689 def _initializeEditPrefsAttributes(self, args): 687 def _initializeEditPrefsAttributes(self, args):
690 if not hasattr(args, 'shared_prefs_file') or not args.shared_prefs_file: 688 if not hasattr(args, 'shared_prefs_file') or not args.shared_prefs_file:
691 return 689 return
692 if not isinstance(args.shared_prefs_file, str): 690 if not isinstance(args.shared_prefs_file, str):
693 logging.warning("Given non-string for a filepath") 691 logging.warning("Given non-string for a filepath")
694 return 692 return
695 self._edit_shared_prefs = shared_preference_utils.ExtractSettingsFromJson( 693 self._edit_shared_prefs = shared_preference_utils.ExtractSettingsFromJson(
696 args.shared_prefs_file) 694 args.shared_prefs_file)
697 695
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 745
748 @property 746 @property
749 def junit3_runner_class(self): 747 def junit3_runner_class(self):
750 return self._junit3_runner_class 748 return self._junit3_runner_class
751 749
752 @property 750 @property
753 def junit4_runner_class(self): 751 def junit4_runner_class(self):
754 return self._junit4_runner_class 752 return self._junit4_runner_class
755 753
756 @property 754 @property
757 def should_save_logcat(self):
758 return self._should_save_logcat
759
760 @property
761 def package_info(self): 755 def package_info(self):
762 return self._package_info 756 return self._package_info
763 757
764 @property 758 @property
765 def render_results_dir(self): 759 def render_results_dir(self):
766 return self._render_results_dir 760 return self._render_results_dir
767 761
768 @property 762 @property
769 def replace_system_package(self): 763 def replace_system_package(self):
770 return self._replace_system_package 764 return self._replace_system_package
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 @staticmethod 900 @staticmethod
907 def GenerateTestResults( 901 def GenerateTestResults(
908 result_code, result_bundle, statuses, start_ms, duration_ms, 902 result_code, result_bundle, statuses, start_ms, duration_ms,
909 device_abi, symbolizer): 903 device_abi, symbolizer):
910 return GenerateTestResults(result_code, result_bundle, statuses, 904 return GenerateTestResults(result_code, result_bundle, statuses,
911 start_ms, duration_ms, device_abi, symbolizer) 905 start_ms, duration_ms, device_abi, symbolizer)
912 906
913 #override 907 #override
914 def TearDown(self): 908 def TearDown(self):
915 self.symbolizer.CleanUp() 909 self.symbolizer.CleanUp()
OLDNEW
« no previous file with comments | « build/android/pylib/base/output_manager_factory.py ('k') | build/android/pylib/local/device/local_device_environment.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698