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

Side by Side Diff: buildbot/cbuildbot_commands.py

Issue 6771036: Change RepoSync to use -j4 option. Add tests to check for retries. (Closed) Base URL: http://git.chromium.org/git/chromite.git@master
Patch Set: Add custom-retry-pass test and comments. Fix line length. Created 9 years, 8 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 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Module containing the various individual commands a builder can run.""" 5 """Module containing the various individual commands a builder can run."""
6 6
7 import os 7 import os
8 import re 8 import re
9 import shutil 9 import shutil
10 import sys 10 import sys
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 47
48 def _RepoSync(buildroot, retries=_DEFAULT_RETRIES): 48 def _RepoSync(buildroot, retries=_DEFAULT_RETRIES):
49 """Uses repo to checkout the source code. 49 """Uses repo to checkout the source code.
50 50
51 Keyword arguments: 51 Keyword arguments:
52 retries -- Number of retries to try before failing on the sync. 52 retries -- Number of retries to try before failing on the sync.
53 """ 53 """
54 while retries > 0: 54 while retries > 0:
55 try: 55 try:
56 cros_lib.OldRunCommand(['repo', 'sync', '-q'], cwd=buildroot) 56 cros_lib.OldRunCommand(['repo', 'sync', '-q', '-j', '4'], cwd=buildroot)
sosa 2011/04/01 20:23:41 can you change these short names to use long names
rcui1 2011/04/01 20:44:08 Done.
57 cros_lib.OldRunCommand( 57 cros_lib.OldRunCommand(
58 ['repo', 58 ['repo',
59 'forall', 59 'forall',
60 '-c', 60 '-c',
61 'git', 61 'git',
62 'config', 62 'config',
63 'url.ssh://git@gitrw.chromium.org:9222.insteadof', 63 'url.ssh://git@gitrw.chromium.org:9222.insteadof',
64 'http://git.chromium.org/git' 64 'http://git.chromium.org/git'
65 ], cwd=buildroot) 65 ], cwd=buildroot)
66 retries = 0 66 retries = 0
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 444
445 archive_url = None 445 archive_url = None
446 key_re = re.compile('^%s=(.*)$' % _CROS_ARCHIVE_URL) 446 key_re = re.compile('^%s=(.*)$' % _CROS_ARCHIVE_URL)
447 for line in result.output.splitlines(): 447 for line in result.output.splitlines():
448 line_match = key_re.match(line) 448 line_match = key_re.match(line)
449 if line_match: 449 if line_match:
450 archive_url = line_match.group(1) 450 archive_url = line_match.group(1)
451 451
452 assert archive_url, 'Archive Build Failed to Provide Archive URL' 452 assert archive_url, 'Archive Build Failed to Provide Archive URL'
453 return archive_url 453 return archive_url
OLDNEW
« no previous file with comments | « no previous file | buildbot/cbuildbot_commands_unittest.py » ('j') | buildbot/cbuildbot_commands_unittest.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698