mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 23:21:17 +02:00
Switch off repo sync --jobs, and turn on repo --trace.
repo sync --jobs doesn't check for errors, so we shouldn't use it in automated scripts. repo --trace is needed so that we can diagnose whether git is hanging. BUG=chromium-os:7048, chromium-os:6774 TEST=Ran test suite Change-Id: I9e68cfffe841a231f5fabef951ea2d45b81c1d5e Review URL: http://codereview.chromium.org/3419024
This commit is contained in:
parent
1a6b812cf0
commit
7bf8d2715e
@ -47,13 +47,12 @@ def RepoSync(buildroot, rw_checkout=False, retries=_DEFAULT_RETRIES):
|
||||
retries -- Number of retries to try before failing on the sync.
|
||||
|
||||
"""
|
||||
# Get the number of processors to use with repo sync.
|
||||
num_procs = int(RunCommand('grep -c processor /proc/cpuinfo'.split(),
|
||||
print_cmd=False, redirect_stdout=True))
|
||||
|
||||
while retries > 0:
|
||||
try:
|
||||
RunCommand(['repo', 'sync', '--jobs=%d' % (num_procs)], cwd=buildroot)
|
||||
# The --trace option ensures that repo shows the output from git. This
|
||||
# is needed so that the buildbot can kill us if git is not making
|
||||
# progress.
|
||||
RunCommand(['repo', '--trace', 'sync'], cwd=buildroot)
|
||||
if rw_checkout:
|
||||
# Always re-run in case of new git repos or repo sync
|
||||
# failed in a previous run because of a forced Stop Build.
|
||||
|
Loading…
x
Reference in New Issue
Block a user