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

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

Issue 2548503002: Revert of (Reland) Insert logcat as part of test result for android instrumentation tests. (Closed)
Patch Set: 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 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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 435
436 self._timeout_scale = None 436 self._timeout_scale = None
437 self._initializeTestControlAttributes(args) 437 self._initializeTestControlAttributes(args)
438 438
439 self._coverage_directory = None 439 self._coverage_directory = None
440 self._initializeTestCoverageAttributes(args) 440 self._initializeTestCoverageAttributes(args)
441 441
442 self._store_tombstones = False 442 self._store_tombstones = False
443 self._initializeTombstonesAttributes(args) 443 self._initializeTombstonesAttributes(args)
444 444
445 self._should_save_logcat = None
446 self._initializeLogAttributes(args)
447
448 def _initializeApkAttributes(self, args, error_func): 445 def _initializeApkAttributes(self, args, error_func):
449 if args.apk_under_test: 446 if args.apk_under_test:
450 apk_under_test_path = args.apk_under_test 447 apk_under_test_path = args.apk_under_test
451 if not args.apk_under_test.endswith('.apk'): 448 if not args.apk_under_test.endswith('.apk'):
452 apk_under_test_path = os.path.join( 449 apk_under_test_path = os.path.join(
453 constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR, 450 constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR,
454 '%s.apk' % args.apk_under_test) 451 '%s.apk' % args.apk_under_test)
455 452
456 # TODO(jbudorick): Move the realpath up to the argument parser once 453 # TODO(jbudorick): Move the realpath up to the argument parser once
457 # APK-by-name is no longer supported. 454 # APK-by-name is no longer supported.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 def _initializeTestControlAttributes(self, args): 587 def _initializeTestControlAttributes(self, args):
591 self._screenshot_dir = args.screenshot_dir 588 self._screenshot_dir = args.screenshot_dir
592 self._timeout_scale = args.timeout_scale or 1 589 self._timeout_scale = args.timeout_scale or 1
593 590
594 def _initializeTestCoverageAttributes(self, args): 591 def _initializeTestCoverageAttributes(self, args):
595 self._coverage_directory = args.coverage_dir 592 self._coverage_directory = args.coverage_dir
596 593
597 def _initializeTombstonesAttributes(self, args): 594 def _initializeTombstonesAttributes(self, args):
598 self._store_tombstones = args.store_tombstones 595 self._store_tombstones = args.store_tombstones
599 596
600 def _initializeLogAttributes(self, args):
601 self._should_save_logcat = bool(args.json_results_file)
602
603 @property 597 @property
604 def additional_apks(self): 598 def additional_apks(self):
605 return self._additional_apks 599 return self._additional_apks
606 600
607 @property 601 @property
608 def apk_under_test(self): 602 def apk_under_test(self):
609 return self._apk_under_test 603 return self._apk_under_test
610 604
611 @property 605 @property
612 def apk_under_test_incremental_install_script(self): 606 def apk_under_test_incremental_install_script(self):
(...skipping 13 matching lines...) Expand all
626 620
627 @property 621 @property
628 def driver_name(self): 622 def driver_name(self):
629 return self._driver_name 623 return self._driver_name
630 624
631 @property 625 @property
632 def flags(self): 626 def flags(self):
633 return self._flags 627 return self._flags
634 628
635 @property 629 @property
636 def should_save_logcat(self):
637 return self._should_save_logcat
638
639 @property
640 def package_info(self): 630 def package_info(self):
641 return self._package_info 631 return self._package_info
642 632
643 @property 633 @property
644 def screenshot_dir(self): 634 def screenshot_dir(self):
645 return self._screenshot_dir 635 return self._screenshot_dir
646 636
647 @property 637 @property
648 def store_tombstones(self): 638 def store_tombstones(self):
649 return self._store_tombstones 639 return self._store_tombstones
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 743
754 @staticmethod 744 @staticmethod
755 def GenerateTestResults( 745 def GenerateTestResults(
756 result_code, result_bundle, statuses, start_ms, duration_ms): 746 result_code, result_bundle, statuses, start_ms, duration_ms):
757 return GenerateTestResults(result_code, result_bundle, statuses, 747 return GenerateTestResults(result_code, result_bundle, statuses,
758 start_ms, duration_ms) 748 start_ms, duration_ms)
759 749
760 #override 750 #override
761 def TearDown(self): 751 def TearDown(self):
762 pass 752 pass
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698