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

Side by Side Diff: build/android/update_verification.py

Issue 1331213004: [Android] Don't use a device blacklist if one isn't provided. (RELAND 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: + adb_install_apk.py blacklist Created 5 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
« no previous file with comments | « build/android/tombstones.py ('k') | testing/scripts/host_info.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Runs semi-automated update testing on a non-rooted device. 7 """Runs semi-automated update testing on a non-rooted device.
8 8
9 This script will help verify that app data is preserved during an update. 9 This script will help verify that app data is preserved during an update.
10 To use this script first run it with the create_app_data option. 10 To use this script first run it with the create_app_data option.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 subparser.add_argument('--new-apk', required=True, 80 subparser.add_argument('--new-apk', required=True,
81 help='Path to apk to update to.') 81 help='Path to apk to update to.')
82 subparser.add_argument('--app-data', required=True, 82 subparser.add_argument('--app-data', required=True,
83 help='Path to where the app data backup is saved.') 83 help='Path to where the app data backup is saved.')
84 subparser.add_argument('--package-name', 84 subparser.add_argument('--package-name',
85 help='Chrome apk package name.') 85 help='Chrome apk package name.')
86 86
87 args = parser.parse_args() 87 args = parser.parse_args()
88 run_tests_helper.SetLogLevel(args.verbose) 88 run_tests_helper.SetLogLevel(args.verbose)
89 89
90 if args.blacklist_file: 90 blacklist = (device_blacklist.Blacklist(args.blacklist_file)
91 blacklist = device_blacklist.Blacklist(args.blacklist_file) 91 if args.blacklist_file
92 else: 92 else None)
93 blacklist = None
94 93
95 devices = device_utils.DeviceUtils.HealthyDevices(blacklist) 94 devices = device_utils.DeviceUtils.HealthyDevices(blacklist)
96 if not devices: 95 if not devices:
97 raise device_errors.NoDevicesError() 96 raise device_errors.NoDevicesError()
98 device = devices[0] 97 device = devices[0]
99 logging.info('Using device %s for testing.', str(device)) 98 logging.info('Using device %s for testing.', str(device))
100 99
101 package_name = (args.package_name if args.package_name 100 package_name = (args.package_name if args.package_name
102 else apk_helper.GetPackageName(args.old_apk)) 101 else apk_helper.GetPackageName(args.old_apk))
103 if args.command == 'create_app_data': 102 if args.command == 'create_app_data':
104 CreateAppData(device, args.old_apk, args.app_data, package_name) 103 CreateAppData(device, args.old_apk, args.app_data, package_name)
105 elif args.command == 'test_update': 104 elif args.command == 'test_update':
106 TestUpdate( 105 TestUpdate(
107 device, args.old_apk, args.new_apk, args.app_data, package_name) 106 device, args.old_apk, args.new_apk, args.app_data, package_name)
108 else: 107 else:
109 raise Exception('Unknown test command: %s' % args.command) 108 raise Exception('Unknown test command: %s' % args.command)
110 109
111 if __name__ == '__main__': 110 if __name__ == '__main__':
112 sys.exit(main()) 111 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/tombstones.py ('k') | testing/scripts/host_info.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698