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

Side by Side Diff: recipe_modules/git/example.py

Issue 2173823002: git recipe_module: add experimental git-cache support. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: improved Created 4 years, 5 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
« no previous file with comments | « recipe_modules/git/api.py ('k') | recipe_modules/git/example.expected/git-cache-checkout.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium 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 DEPS = [ 5 DEPS = [
6 'git', 6 'git',
7 'recipe_engine/path', 7 'recipe_engine/path',
8 'recipe_engine/platform', 8 'recipe_engine/platform',
9 'recipe_engine/properties', 9 'recipe_engine/properties',
10 'recipe_engine/raw_io', 10 'recipe_engine/raw_io',
(...skipping 18 matching lines...) Expand all
29 retVal = api.git.checkout( 29 retVal = api.git.checkout(
30 url, 30 url,
31 ref=api.properties.get('revision'), 31 ref=api.properties.get('revision'),
32 recursive=True, 32 recursive=True,
33 submodule_update_force=submodule_update_force, 33 submodule_update_force=submodule_update_force,
34 set_got_revision=api.properties.get('set_got_revision'), 34 set_got_revision=api.properties.get('set_got_revision'),
35 curl_trace_file=curl_trace_file, 35 curl_trace_file=curl_trace_file,
36 remote_name=api.properties.get('remote_name'), 36 remote_name=api.properties.get('remote_name'),
37 display_fetch_size=api.properties.get('display_fetch_size'), 37 display_fetch_size=api.properties.get('display_fetch_size'),
38 file_name=api.properties.get('checkout_file_name'), 38 file_name=api.properties.get('checkout_file_name'),
39 submodule_update_recursive=submodule_update_recursive) 39 submodule_update_recursive=submodule_update_recursive,
40 use_git_cache=api.properties.get('use_git_cache'))
40 41
41 assert retVal == "deadbeef", ( 42 assert retVal == "deadbeef", (
42 "expected retVal to be %r but was %r" % ("deadbeef", retVal)) 43 "expected retVal to be %r but was %r" % ("deadbeef", retVal))
43 44
44 # count_objects shows number and size of objects in .git dir. 45 # count_objects shows number and size of objects in .git dir.
45 api.git.count_objects( 46 api.git.count_objects(
46 name='count-objects', 47 name='count-objects',
47 can_fail_build=api.properties.get('count_objects_can_fail_build'), 48 can_fail_build=api.properties.get('count_objects_can_fail_build'),
48 git_config_options={'foo': 'bar'}) 49 git_config_options={'foo': 'bar'})
49 50
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 api.test('count-objects_with_bad_output_fails_build') + 139 api.test('count-objects_with_bad_output_fails_build') +
139 api.step_data( 140 api.step_data(
140 'count-objects', 141 'count-objects',
141 stdout=api.raw_io.output(api.git.count_objects_output('xxx'))) + 142 stdout=api.raw_io.output(api.git.count_objects_output('xxx'))) +
142 api.properties(count_objects_can_fail_build=True)) 143 api.properties(count_objects_can_fail_build=True))
143 yield ( 144 yield (
144 api.test('cat-file_test') + 145 api.test('cat-file_test') +
145 api.step_data('git cat-file abcdef12345:TestFile', 146 api.step_data('git cat-file abcdef12345:TestFile',
146 stdout=api.raw_io.output('TestOutput')) + 147 stdout=api.raw_io.output('TestOutput')) +
147 api.properties(revision='abcdef12345', cat_file='TestFile')) 148 api.properties(revision='abcdef12345', cat_file='TestFile'))
149
150 yield (
151 api.test('git-cache-checkout') +
152 api.properties(use_git_cache=True))
OLDNEW
« no previous file with comments | « recipe_modules/git/api.py ('k') | recipe_modules/git/example.expected/git-cache-checkout.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698