|
|
|
@ -840,6 +840,43 @@ class GclientTest(trial_dir.TestCase):
|
|
|
|
],
|
|
|
|
],
|
|
|
|
self._get_processed())
|
|
|
|
self._get_processed())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def testRecursedepsCustomdepsOverride(self):
|
|
|
|
|
|
|
|
"""Verifies gclient overrides deps within recursedeps using custom deps"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
write(
|
|
|
|
|
|
|
|
'.gclient',
|
|
|
|
|
|
|
|
'solutions = [\n'
|
|
|
|
|
|
|
|
' { "name": "foo",\n'
|
|
|
|
|
|
|
|
' "url": "svn://example.com/foo",\n'
|
|
|
|
|
|
|
|
' "custom_deps": {\n'
|
|
|
|
|
|
|
|
' "foo/bar": "svn://example.com/override",\n'
|
|
|
|
|
|
|
|
' },\n'
|
|
|
|
|
|
|
|
' },]\n')
|
|
|
|
|
|
|
|
write(
|
|
|
|
|
|
|
|
os.path.join('foo', 'DEPS'),
|
|
|
|
|
|
|
|
'use_relative_paths = True\n'
|
|
|
|
|
|
|
|
'deps = {\n'
|
|
|
|
|
|
|
|
' "bar": "/bar",\n'
|
|
|
|
|
|
|
|
'}\n'
|
|
|
|
|
|
|
|
'recursedeps = ["bar"]')
|
|
|
|
|
|
|
|
write(
|
|
|
|
|
|
|
|
os.path.join('foo', 'bar', 'DEPS'),
|
|
|
|
|
|
|
|
'deps = {\n'
|
|
|
|
|
|
|
|
' "baz": "/baz",\n'
|
|
|
|
|
|
|
|
'}')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
options, _ = gclient.OptionParser().parse_args([])
|
|
|
|
|
|
|
|
obj = gclient.GClient.LoadCurrentConfig(options)
|
|
|
|
|
|
|
|
obj.RunOnDeps('None', [])
|
|
|
|
|
|
|
|
self.assertEqual(
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
('foo', 'svn://example.com/foo'),
|
|
|
|
|
|
|
|
(os.path.join('foo', 'bar'), 'svn://example.com/override'),
|
|
|
|
|
|
|
|
(os.path.join('foo', 'foo', 'bar'), 'svn://example.com/override'),
|
|
|
|
|
|
|
|
(os.path.join('foo', 'baz'), 'svn://example.com/baz'),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
self._get_processed())
|
|
|
|
|
|
|
|
|
|
|
|
def testRelativeRecursion(self):
|
|
|
|
def testRelativeRecursion(self):
|
|
|
|
"""Verifies that nested use_relative_paths is always respected."""
|
|
|
|
"""Verifies that nested use_relative_paths is always respected."""
|
|
|
|
write(
|
|
|
|
write(
|
|
|
|
|