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

Side by Side Diff: tools/get_archive.py

Issue 178223008: Replace run_selenium.py with Dart script that uses the browser controller for performance tests. (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
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 25 matching lines...) Expand all
36 DRT_PERMANENT_PATTERN = ('gs://dartium-archive/drt-%(osname)s-%(bot)s/drt-' 36 DRT_PERMANENT_PATTERN = ('gs://dartium-archive/drt-%(osname)s-%(bot)s/drt-'
37 '%(osname)s-%(bot)s-%(num1)s.%(num2)s.zip') 37 '%(osname)s-%(bot)s-%(num1)s.%(num2)s.zip')
38 38
39 DARTIUM_DIR = os.path.join('client', 'tests', 'dartium') 39 DARTIUM_DIR = os.path.join('client', 'tests', 'dartium')
40 DARTIUM_VERSION = os.path.join(DARTIUM_DIR, 'LAST_VERSION') 40 DARTIUM_VERSION = os.path.join(DARTIUM_DIR, 'LAST_VERSION')
41 DARTIUM_LATEST_PATTERN = ( 41 DARTIUM_LATEST_PATTERN = (
42 'gs://dartium-archive/latest/dartium-%(osname)s-%(bot)s-*.zip') 42 'gs://dartium-archive/latest/dartium-%(osname)s-%(bot)s-*.zip')
43 DARTIUM_PERMANENT_PATTERN = ('gs://dartium-archive/dartium-%(osname)s-%(bot)s/' 43 DARTIUM_PERMANENT_PATTERN = ('gs://dartium-archive/dartium-%(osname)s-%(bot)s/'
44 'dartium-%(osname)s-%(bot)s-%(num1)s.%(num2)s.zip') 44 'dartium-%(osname)s-%(bot)s-%(num1)s.%(num2)s.zip')
45 45
46 CHROMEDRIVER_DIR = os.path.join('tools', 'testing', 'dartium-chromedriver')
47 CHROMEDRIVER_VERSION = os.path.join(CHROMEDRIVER_DIR, 'LAST_VERSION')
48 CHROMEDRIVER_LATEST_PATTERN = (
49 'gs://dartium-archive/latest/chromedriver-%(osname)s-%(bot)s-*.zip')
50 CHROMEDRIVER_PERMANENT_PATTERN = ('gs://dartium-archive/chromedriver-%(osname)s'
51 '-%(bot)s/chromedriver-%(osname)s-%(bot)s-%(nu m1)s.'
52 '%(num2)s.zip')
53
54 SDK_DIR = os.path.join(utils.GetBuildRoot(utils.GuessOS(), 'release', 'ia32'), 46 SDK_DIR = os.path.join(utils.GetBuildRoot(utils.GuessOS(), 'release', 'ia32'),
55 'dart-sdk') 47 'dart-sdk')
56 SDK_VERSION = os.path.join(SDK_DIR, 'LAST_VERSION') 48 SDK_VERSION = os.path.join(SDK_DIR, 'LAST_VERSION')
57 SDK_LATEST_PATTERN = 'gs://dart-editor-archive-continuous/latest/VERSION' 49 SDK_LATEST_PATTERN = 'gs://dart-archive/channels/dev/raw/latest/VERSION'
58 # TODO(efortuna): Once the x64 VM also is optimized, select the version 50 # TODO(efortuna): Once the x64 VM also is optimized, select the version
59 # based on whether we are running on a 32-bit or 64-bit system. 51 # based on whether we are running on a 32-bit or 64-bit system.
60 SDK_PERMANENT = ('gs://dart-editor-archive-continuous/%(version_num)s/' + 52 SDK_PERMANENT = ('gs://dart-archive/channels/dev/raw/%(version_num)s/sdk/' +
61 'dartsdk-%(osname)s-32.zip') 53 'dartsdk-%(osname)s-ia32-release.zip')
62 54
63 # Dictionary storing the earliest revision of each download we have stored. 55 # Dictionary storing the earliest revision of each download we have stored.
64 LAST_VALID = {'dartium': 4285, 'chromedriver': 7823, 'sdk': 9761, 'drt': 5342} 56 LAST_VALID = {'dartium': 4285, 'chromedriver': 7823, 'sdk': 9761, 'drt': 5342}
65 57
66 sys.path.append(os.path.join(GSUTIL_DIR, 'boto')) 58 sys.path.append(os.path.join(GSUTIL_DIR, 'boto'))
67 import boto 59 import boto
68 60
69 61
70 def ExecuteCommand(*cmd): 62 def ExecuteCommand(*cmd):
71 """Execute a command in a subprocess.""" 63 """Execute a command in a subprocess."""
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 # Use the incremental release bot ('dartium-*-inc-be') by default. 333 # Use the incremental release bot ('dartium-*-inc-be') by default.
342 # Issue 13399 Quick fix, update with channel support. 334 # Issue 13399 Quick fix, update with channel support.
343 bot = 'inc-be' 335 bot = 'inc-be'
344 if args.debug: 336 if args.debug:
345 bot = 'debug-be' 337 bot = 'debug-be'
346 338
347 if positional[0] == 'dartium': 339 if positional[0] == 'dartium':
348 GetDartiumRevision('Dartium', bot, DARTIUM_DIR, DARTIUM_VERSION, 340 GetDartiumRevision('Dartium', bot, DARTIUM_DIR, DARTIUM_VERSION,
349 DARTIUM_LATEST_PATTERN, DARTIUM_PERMANENT_PATTERN, 341 DARTIUM_LATEST_PATTERN, DARTIUM_PERMANENT_PATTERN,
350 args.revision) 342 args.revision)
351 elif positional[0] == 'chromedriver':
352 GetDartiumRevision('chromedriver', bot, CHROMEDRIVER_DIR, CHROMEDRIVER_VERSI ON,
353 CHROMEDRIVER_LATEST_PATTERN,
354 CHROMEDRIVER_PERMANENT_PATTERN, args.revision)
355 elif positional[0] == 'sdk': 343 elif positional[0] == 'sdk':
356 GetSdkRevision('sdk', SDK_DIR, SDK_VERSION, SDK_LATEST_PATTERN, 344 GetSdkRevision('sdk', SDK_DIR, SDK_VERSION, SDK_LATEST_PATTERN,
357 SDK_PERMANENT, args.revision) 345 SDK_PERMANENT, args.revision)
358 elif positional[0] == 'drt': 346 elif positional[0] == 'drt':
359 GetDartiumRevision('content_shell', bot, DRT_DIR, DRT_VERSION, 347 GetDartiumRevision('content_shell', bot, DRT_DIR, DRT_VERSION,
360 DRT_LATEST_PATTERN, DRT_PERMANENT_PATTERN, 348 DRT_LATEST_PATTERN, DRT_PERMANENT_PATTERN,
361 args.revision) 349 args.revision)
362 CopyDrtFont(DRT_DIR) 350 CopyDrtFont(DRT_DIR)
363 else: 351 else:
364 print ('Please specify the target you wish to download from Google Storage ' 352 print ('Please specify the target you wish to download from Google Storage '
365 '("drt", "dartium", "chromedriver", or "sdk")') 353 '("drt", "dartium", "chromedriver", or "sdk")')
366 354
367 if __name__ == '__main__': 355 if __name__ == '__main__':
368 sys.exit(main()) 356 sys.exit(main())
OLDNEW
« no previous file with comments | « tests/standalone/io/test_harness_analyzer_test.dart ('k') | tools/testing/dart/browser_controller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698