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

Unified Diff: tests/gclient_smoketest.py

Issue 4215001: Add a new regression test for custom_deps in .gclient files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 10 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gclient_smoketest.py
diff --git a/tests/gclient_smoketest.py b/tests/gclient_smoketest.py
index 189b06451c104aa656d95de65075029449e0c52e..17269b547bece287267f2d1bc7a91a107392bc9a 100755
--- a/tests/gclient_smoketest.py
+++ b/tests/gclient_smoketest.py
@@ -262,11 +262,11 @@ class GClientSmokeSVN(GClientSmokeBase):
self.gclient(['config', self.svn_base + 'trunk/src/'])
# Test unversioned checkout.
self.parseGclient(['sync', '--deps', 'mac', '--jobs', '1'],
- ['running', 'running',
- # This is due to the way svn update is called for a
- # single file when File() is used in a DEPS file.
- ('running', os.path.join(self.root_dir, 'src', 'file', 'other')),
- 'running', 'running', 'running', 'running'])
+ ['running', 'running',
+ # This is due to the way svn update is called for a
+ # single file when File() is used in a DEPS file.
+ ('running', os.path.join(self.root_dir, 'src', 'file', 'other')),
+ 'running', 'running', 'running', 'running'])
tree = self.mangle_svn_tree(
('trunk/src@2', 'src'),
('trunk/third_party/foo@1', 'src/third_party/foo'),
@@ -402,6 +402,38 @@ class GClientSmokeSVN(GClientSmokeBase):
tree['src/svn_hooked1'] = 'svn_hooked1'
self.assertTree(tree)
+ def testSyncCustomDeps(self):
+ if not self.enabled:
+ return
+ out = (
+ 'solutions = [\n'
+ ' { "name" : "src",\n'
+ ' "url" : "%(base)s/src",\n'
+ ' "custom_deps" : {\n'
+ # Remove 2 deps, change 1, add 1.
+ ' "src/other": None,\n'
+ ' "src/third_party/foo": \'%(base)s/third_party/prout\',\n'
+ ' "src/file/other": None,\n'
+ ' "new_deps": "/trunk/src/third_party",\n'
+ ' },\n'
+ ' "safesync_url": "",\n'
+ ' },\n'
+ ']\n\n' %
+ { 'base': self.svn_base + 'trunk' })
+ fileobj = open(os.path.join(self.root_dir, '.gclient'), 'w')
+ fileobj.write(out)
+ fileobj.close()
+ self.parseGclient(
+ ['sync', '--deps', 'mac', '--jobs', '1'],
+ ['running', 'running', 'running', 'running'],
+ untangle=True)
+ tree = self.mangle_svn_tree(
+ ('trunk/src@2', 'src'),
+ ('trunk/third_party/prout@2', 'src/third_party/foo'),
+ ('trunk/src/third_party@2', 'new_deps'))
+ tree['src/svn_hooked1'] = 'svn_hooked1'
+ self.assertTree(tree)
+
def testRevertAndStatus(self):
if not self.enabled:
return
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698