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

Unified Diff: tests/gclient_test.py

Issue 385123008: Update recursedeps to support use_relative_path. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: update comment Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « 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 aff9174e167757c896be49855bf630e432c6ecfc..e6185956fe9dcd28d776967b90a4838d0080ac53 100755
--- a/tests/gclient_test.py
+++ b/tests/gclient_test.py
@@ -720,6 +720,44 @@ class GclientTest(trial_dir.TestCase):
],
self._get_processed())
+ def testRecursedepsOverrideWithRelativePaths(self):
+ """Verifies gclient respects |recursedeps| with relative paths."""
+
+ write(
+ '.gclient',
+ 'solutions = [\n'
+ ' { "name": "foo", "url": "svn://example.com/foo" },\n'
+ ']')
+ write(
+ os.path.join('foo', 'DEPS'),
+ 'use_relative_paths = True\n'
+ 'deps = {\n'
+ ' "bar": "/bar",\n'
+ '}\n'
+ 'recursedeps = {"bar"}')
+ write(
+ os.path.join('bar', 'DEPS'),
+ 'deps = {\n'
+ ' "baz": "/baz",\n'
+ '}')
+ write(
+ os.path.join('baz', 'DEPS'),
+ 'deps = {\n'
+ ' "fizz": "/fizz",\n'
+ '}')
+
+ options, _ = gclient.OptionParser().parse_args([])
+ obj = gclient.GClient.LoadCurrentConfig(options)
+ obj.RunOnDeps('None', [])
+ self.assertEquals(
+ [
+ 'svn://example.com/foo',
+ # use_relative_paths means the following dep evaluates with 'foo'
+ # prepended.
+ 'svn://example.com/foo/bar',
+ ],
+ self._get_processed())
+
def testRecursionOverridesRecursedeps(self):
"""Verifies gclient respects |recursion| over |recursedeps|.
« no previous file with comments | « gclient.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698