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

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

Issue 1927403003: Avoid computing patch_root in get_files_affected_by_patch. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 7 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
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 'gclient', 6 'gclient',
7 'recipe_engine/path', 7 'recipe_engine/path',
8 'recipe_engine/properties', 8 'recipe_engine/properties',
9 'recipe_engine/platform',
9 ] 10 ]
10 11
11 12
12 TEST_CONFIGS = [ 13 TEST_CONFIGS = [
13 'android', 14 'android',
14 'android_bare', 15 'android_bare',
15 'blink', 16 'blink',
16 'blink_or_chromium', 17 'blink_or_chromium',
17 'boringssl', 18 'boringssl',
18 'build_internal', 19 'build_internal',
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 api.gclient.make_config(config_name) 60 api.gclient.make_config(config_name)
60 61
61 src_cfg = api.gclient.make_config(GIT_MODE=True, CACHE_DIR='[ROOT]/git_cache') 62 src_cfg = api.gclient.make_config(GIT_MODE=True, CACHE_DIR='[ROOT]/git_cache')
62 soln = src_cfg.solutions.add() 63 soln = src_cfg.solutions.add()
63 soln.name = 'src' 64 soln.name = 'src'
64 soln.url = 'https://chromium.googlesource.com/chromium/src.git' 65 soln.url = 'https://chromium.googlesource.com/chromium/src.git'
65 soln.revision = api.properties.get('revision') 66 soln.revision = api.properties.get('revision')
66 src_cfg.parent_got_revision_mapping['parent_got_revision'] = 'got_revision' 67 src_cfg.parent_got_revision_mapping['parent_got_revision'] = 'got_revision'
67 api.gclient.c = src_cfg 68 api.gclient.c = src_cfg
68 api.gclient.checkout() 69 api.gclient.checkout()
70 api.gclient.get_files_affected_by_patch(
71 patch_project=api.properties.get('patch_project'))
69 72
70 api.gclient.spec_alias = 'WebKit' 73 api.gclient.spec_alias = 'WebKit'
71 bl_cfg = api.gclient.make_config() 74 bl_cfg = api.gclient.make_config()
72 soln = bl_cfg.solutions.add() 75 soln = bl_cfg.solutions.add()
73 soln.name = 'WebKit' 76 soln.name = 'WebKit'
74 soln.url = 'svn://svn.chromium.org/blink/trunk' 77 soln.url = 'svn://svn.chromium.org/blink/trunk'
75 bl_cfg.revisions['third_party/WebKit'] = '123' 78 bl_cfg.revisions['third_party/WebKit'] = '123'
76 79
77 # Use safesync url for lkgr. 80 # Use safesync url for lkgr.
78 soln.safesync_url = 'https://blink-status.appspot.com/lkgr' 81 soln.safesync_url = 'https://blink-status.appspot.com/lkgr'
79 82
80 bl_cfg.got_revision_mapping['src/blatley'] = 'got_blatley_revision' 83 bl_cfg.got_revision_mapping['src/blatley'] = 'got_blatley_revision'
81 api.gclient.checkout( 84 api.gclient.checkout(
82 gclient_config=bl_cfg, 85 gclient_config=bl_cfg,
83 with_branch_heads=True, 86 with_branch_heads=True,
84 cwd=api.path['slave_build'].join('src', 'third_party')) 87 cwd=api.path['slave_build'].join('src', 'third_party'))
85 88
86 api.gclient.break_locks() 89 api.gclient.break_locks()
87 90
88 del api.gclient.spec_alias 91 del api.gclient.spec_alias
89 92
90 api.gclient.runhooks() 93 api.gclient.runhooks()
91 94
92 assert not api.gclient.is_blink_mode 95 assert not api.gclient.is_blink_mode
93 96
94 97
98
95 def GenTests(api): 99 def GenTests(api):
96 yield api.test('basic') 100 yield api.test('basic')
97 101
98 yield api.test('revision') + api.properties(revision='abc') 102 yield api.test('revision') + api.properties(revision='abc')
99 103
100 yield api.test('tryserver') + api.properties.tryserver() 104 yield api.test('tryserver') + api.properties.tryserver()
105 yield (api.test('tryserver_win') + api.properties.tryserver() +
106 api.platform('win', 64))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698