OLD | NEW |
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 Loading... |
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 Loading... |
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)) |
OLD | NEW |