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

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

Issue 169183004: Move Dartium reference build scripts to dartium_tools/perf (Closed) Base URL: svn://svn.chromium.org/chrome/branches/dart/1750/src
Patch Set: Move files to dart/tools/bots instead. Created 6 years, 10 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 | tools/bots/get_chromium_build.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 #
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
5 # found in the LICENSE file.
6
7 """Fetches an archived chromium build into
8 src/chrome/tools/test/reference_build unless
9 src/chrome/tools/test/reference_build/REQUESTED_REVISION is the same as
10 src/chrome/tools/test/reference_build/CURRENT_REVISION.
11 Must be run from the root of a Dartium or multivm checkout.
12
13 Usage:
14 $ ./src/dart/tools/bots/fetch_reference_build_revision.py
15 """
16
17 import os
18 import subprocess
19 import sys
20
21 def main(argv):
22 dirname = os.path.join('src', 'chrome', 'tools',
23 'test', 'reference_build')
24 request = os.path.join(dirname, 'REQUESTED_REVISION')
25 found = os.path.join(dirname, 'CURRENT_REVISION')
26 if not os.path.exists(request):
27 return
28 with file(request, 'r') as f:
29 request_revision = f.read()
30
31 if os.path.exists(found):
32 with file(found, 'r') as f:
33 found_revision = f.read()
34 if found_revision == request_revision:
35 return
36
37 get_script = os.path.join('src', 'dart', 'tools',
38 'bots', 'get_chromium_build.py')
39 get_script = os.path.abspath(get_script)
40 exit_code = subprocess.call(['python', get_script,
41 '-r', request_revision,
42 '-t', dirname])
43 if exit_code == 0:
44 with file(found, 'w') as f:
45 f.write(request_revision)
46 return exit_code
47
48 if __name__ == '__main__':
49 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | tools/bots/get_chromium_build.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698