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

Side by Side Diff: build/android/play_services/update_test.py

Issue 1469913002: Cleanup gms update/preprocess scripts, roll android_tools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 5 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
« no previous file with comments | « build/android/play_services/update.py ('k') | build/android/play_services/utils.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 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 '''Unittests for update.py. 6 '''Unittests for update.py.
7 7
8 They set up a temporary directory that is used to mock a bucket, the directory 8 They set up a temporary directory that is used to mock a bucket, the directory
9 containing the configuration files and the android sdk directory. 9 containing the configuration files and the android sdk directory.
10 10
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 _MakeDirs(self.paths.bucket) 294 _MakeDirs(self.paths.bucket)
295 295
296 # is not configured via argument. 296 # is not configured via argument.
297 update.SHA1_DIRECTORY = self.paths.config_dir 297 update.SHA1_DIRECTORY = self.paths.config_dir
298 298
299 os.environ['CHROME_HEADLESS'] = '1' if bot_env else '' 299 os.environ['CHROME_HEADLESS'] = '1' if bot_env else ''
300 300
301 if config_version: 301 if config_version:
302 _MakeDirs(os.path.dirname(self.paths.config_file)) 302 _MakeDirs(os.path.dirname(self.paths.config_file))
303 with open(self.paths.config_file, 'w') as stream: 303 with open(self.paths.config_file, 'w') as stream:
304 stream.write('{"version_number":%d}\n' % config_version) 304 stream.write(('{"version_number":%d,'
305 '"version_xml_path": "res/values/version.xml"}'
306 '\n') % config_version)
305 307
306 if existing_license: 308 if existing_license:
307 _MakeDirs(self.paths.gms_root) 309 _MakeDirs(self.paths.gms_root)
308 with open(self.paths.gms_root_license, 'w') as stream: 310 with open(self.paths.gms_root_license, 'w') as stream:
309 stream.write(existing_license) 311 stream.write(existing_license)
310 312
311 if existing_zip_sha1: 313 if existing_zip_sha1:
312 _MakeDirs(self.paths.gms_root) 314 _MakeDirs(self.paths.gms_root)
313 with open(self.paths.gms_root_sha1, 'w') as stream: 315 with open(self.paths.gms_root_sha1, 'w') as stream:
314 stream.write(existing_zip_sha1) 316 stream.write(existing_zip_sha1)
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 try: 407 try:
406 original_raw_input = __builtins__.raw_input 408 original_raw_input = __builtins__.raw_input
407 __builtins__.raw_input = lambda _: typed_string 409 __builtins__.raw_input = lambda _: typed_string
408 yield 410 yield
409 finally: 411 finally:
410 __builtins__.raw_input = original_raw_input 412 __builtins__.raw_input = original_raw_input
411 413
412 414
413 if __name__ == '__main__': 415 if __name__ == '__main__':
414 unittest.main() 416 unittest.main()
OLDNEW
« no previous file with comments | « build/android/play_services/update.py ('k') | build/android/play_services/utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698