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

Side by Side Diff: tools/get_archive.py

Issue 204593002: Print a useful message when test scripts cannot update a running dartium. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 (c) 2011, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 6
7 # Gets or updates a content shell (a nearly headless build of chrome). This is 7 # Gets or updates a content shell (a nearly headless build of chrome). This is
8 # used for running browser tests of client applications. 8 # used for running browser tests of client applications.
9 9
10 import json 10 import json
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 (temp_zip, temp_dir, str(out))) 281 (temp_zip, temp_dir, str(out)))
282 unzipped_dir = temp_dir + '/' + os.path.basename(latest)[:-len('.zip')] 282 unzipped_dir = temp_dir + '/' + os.path.basename(latest)[:-len('.zip')]
283 else: 283 else:
284 z = zipfile.ZipFile(temp_zip) 284 z = zipfile.ZipFile(temp_zip)
285 z.extractall(temp_dir) 285 z.extractall(temp_dir)
286 unzipped_dir = os.path.join(temp_dir, 286 unzipped_dir = os.path.join(temp_dir,
287 os.path.basename(latest)[:-len('.zip')]) 287 os.path.basename(latest)[:-len('.zip')])
288 z.close() 288 z.close()
289 if directory == SDK_DIR: 289 if directory == SDK_DIR:
290 unzipped_dir = os.path.join(temp_dir, 'dart-sdk') 290 unzipped_dir = os.path.join(temp_dir, 'dart-sdk')
291 if os.path.exists(directory):
292 raise Exception(
293 'Removal of directory %s failed. Is the executable running?' %
294 directory)
291 shutil.move(unzipped_dir, directory) 295 shutil.move(unzipped_dir, directory)
292 finally: 296 finally:
293 shutil.rmtree(temp_dir) 297 shutil.rmtree(temp_dir)
294 298
295 # create the version stamp 299 # create the version stamp
296 v = open(version_file, 'w') 300 v = open(version_file, 'w')
297 v.write(latest) 301 v.write(latest)
298 v.close() 302 v.close()
299 303
300 print 'Successfully downloaded to %s' % directory 304 print 'Successfully downloaded to %s' % directory
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 GetDartiumRevision('content_shell', bot, DRT_DIR, DRT_VERSION, 351 GetDartiumRevision('content_shell', bot, DRT_DIR, DRT_VERSION,
348 DRT_LATEST_PATTERN, DRT_PERMANENT_PATTERN, 352 DRT_LATEST_PATTERN, DRT_PERMANENT_PATTERN,
349 args.revision) 353 args.revision)
350 CopyDrtFont(DRT_DIR) 354 CopyDrtFont(DRT_DIR)
351 else: 355 else:
352 print ('Please specify the target you wish to download from Google Storage ' 356 print ('Please specify the target you wish to download from Google Storage '
353 '("drt", "dartium", "chromedriver", or "sdk")') 357 '("drt", "dartium", "chromedriver", or "sdk")')
354 358
355 if __name__ == '__main__': 359 if __name__ == '__main__':
356 sys.exit(main()) 360 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698