Make sync_chromium use the git-cache when on the bots.

This should help bootstrapping speed, as well as allow better clobbering
support.

R=agable@chromium.org
TBR=agable@chromium.org, kjellander@webrtc.org, szager@chromium.org
BUG=2863, chromium:339647

Review URL: https://webrtc-codereview.appspot.com/17179004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6943 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
iannucci@chromium.org 2014-08-20 23:53:59 +00:00
parent 8dcf61f946
commit 98d92d63e2

View File

@ -53,11 +53,29 @@ def main():
env['GYP_CHROMIUM_NO_ACTION'] = '1'
gclient_cmd = 'gclient.bat' if sys.platform.startswith('win') else 'gclient'
args = [
gclient_cmd, 'sync', '--no-history', '--force', '--revision',
'src@'+opts.target_revision]
gclient_cmd, 'sync', '--force', '--revision', 'src@'+opts.target_revision
]
if os.environ.get('CHROME_HEADLESS') == '1':
args.append('-vvv')
if sys.platform.startswith('win'):
cache_path = os.path.join(os.path.splitdrive(ROOT_DIR)[0],
'b', 'git-cache')
else:
cache_path = '/b/git-cache'
with open(os.path.join(opts.chromium_dir, '.gclient'), 'rb') as spec:
spec = spec.read().splitlines()
spec[-1] = 'cache_dir = %r' % (cache_path,)
args.append('--spec')
args.append('\n'.join(spec))
args.append('--delete_unversioned_trees')
args.append('--reset')
args.append('--upstream')
else:
args.append('--no-history')
target_os_list = get_target_os_list()
if target_os_list:
args += ['--deps=' + target_os_list]