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

Unified Diff: tests/gclient_test.py

Issue 1919103003: Add ability to override DEPS file in recursedeps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 4 years, 8 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
« gclient.py ('K') | « gclient.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gclient_test.py
diff --git a/tests/gclient_test.py b/tests/gclient_test.py
index 0374ed091832a0c2bbf9df80fb2c0d2faa08f3ac..a7c31e2689e23ddaca74695b6be1c4bfdeaf3d37 100755
--- a/tests/gclient_test.py
+++ b/tests/gclient_test.py
@@ -847,6 +847,42 @@ class GclientTest(trial_dir.TestCase):
],
self._get_processed())
+ def testRecursedepsAltfile(self):
+ """Verifies gclient respects the |recursedeps| var syntax with overridden
+ target DEPS file.
+
+ This is what we mean to check here:
+ - Naming an alternate DEPS file in recursedeps pulls from that one.
+ """
+ write(
+ '.gclient',
+ 'solutions = [\n'
+ ' { "name": "foo", "url": "svn://example.com/foo" },\n'
+ ']')
+ write(
+ os.path.join('foo', 'DEPS'),
+ 'deps = {\n'
+ ' "bar": "/bar",\n'
+ '}\n'
+ 'recursedeps = [("bar", "DEPS.alt")]')
+ write(os.path.join('bar', 'DEPS'), 'ERROR ERROR ERROR')
iannucci 2016/04/27 01:21:55 This test would fail before this change, because i
+ write(
+ os.path.join('bar', 'DEPS.alt'),
+ 'deps = {\n'
+ ' "baz": "/baz",\n'
+ '}')
+
+ options, _ = gclient.OptionParser().parse_args([])
+ obj = gclient.GClient.LoadCurrentConfig(options)
+ obj.RunOnDeps('None', [])
+ self.assertEquals(
+ [
+ 'svn://example.com/foo',
+ 'svn://example.com/foo/bar',
+ 'svn://example.com/foo/bar/baz',
+ ],
+ self._get_processed())
+
def testGitDeps(self):
"""Verifies gclient respects a .DEPS.git deps file.
« gclient.py ('K') | « gclient.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698