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

Side by Side Diff: tools/dartium/fetch_reference_build.py

Issue 244643006: Migrate dartium_tools from chrome branch to dart repo (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | « tools/dartium/buildbot_annotated_steps.py ('k') | tools/dartium/generate_dart_vm_version.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 (c) 2014 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2014 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 """Fetches an archived chromium build into 7 """Fetches an archived chromium build into
8 src/chrome/tools/test/reference_build unless 8 src/chrome/tools/test/reference_build unless
9 src/chrome/tools/test/reference_build/REQUESTED_REVISION is the same as 9 src/chrome/tools/test/reference_build/REQUESTED_REVISION is the same as
10 src/chrome/tools/test/reference_build/CURRENT_REVISION. 10 src/chrome/tools/test/reference_build/CURRENT_REVISION.
11 Must be run from the root of a Dartium or multivm checkout. 11 Must be run from the root of a Dartium or multivm checkout.
12 12
13 Usage: 13 Usage:
14 $ ./src/dart/tools/bots/fetch_reference_build_revision.py 14 $ ./src/dart/tools/dartium/fetch_reference_build_revision.py
15 """ 15 """
16 16
17 import os 17 import os
18 import subprocess 18 import subprocess
19 import sys 19 import sys
20 20
21 def main(argv): 21 def main(argv):
22 dirname = os.path.join('src', 'chrome', 'tools', 22 dirname = os.path.join('src', 'chrome', 'tools',
23 'test', 'reference_build') 23 'test', 'reference_build')
24 request = os.path.join(dirname, 'REQUESTED_REVISION') 24 request = os.path.join(dirname, 'REQUESTED_REVISION')
25 found = os.path.join(dirname, 'CURRENT_REVISION') 25 found = os.path.join(dirname, 'CURRENT_REVISION')
26 if not os.path.exists(request): 26 if not os.path.exists(request):
27 return 27 return
28 with file(request, 'r') as f: 28 with file(request, 'r') as f:
29 request_revision = f.read() 29 request_revision = f.read()
30 30
31 if os.path.exists(found): 31 if os.path.exists(found):
32 with file(found, 'r') as f: 32 with file(found, 'r') as f:
33 found_revision = f.read() 33 found_revision = f.read()
34 if found_revision == request_revision: 34 if found_revision == request_revision:
35 return 35 return
36 36
37 get_script = os.path.join('src', 'dart', 'tools', 37 get_script = os.path.join('src', 'dart', 'tools',
38 'bots', 'get_chromium_build.py') 38 'dartium', 'get_chromium_build.py')
39 get_script = os.path.abspath(get_script) 39 get_script = os.path.abspath(get_script)
40 exit_code = subprocess.call(['python', get_script, 40 exit_code = subprocess.call(['python', get_script,
41 '-r', request_revision, 41 '-r', request_revision,
42 '-t', dirname]) 42 '-t', dirname])
43 if exit_code == 0: 43 if exit_code == 0:
44 with file(found, 'w') as f: 44 with file(found, 'w') as f:
45 f.write(request_revision) 45 f.write(request_revision)
46 return exit_code 46 return exit_code
47 47
48 if __name__ == '__main__': 48 if __name__ == '__main__':
49 sys.exit(main(sys.argv)) 49 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « tools/dartium/buildbot_annotated_steps.py ('k') | tools/dartium/generate_dart_vm_version.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698