| Index: tests/gclient_test.py
|
| diff --git a/tests/gclient_test.py b/tests/gclient_test.py
|
| index 235ca54f574f6a67fb9c4560f33e5ffb1c1a9a3f..b2d04e8797cf3263f601d637c619e34579a55111 100755
|
| --- a/tests/gclient_test.py
|
| +++ b/tests/gclient_test.py
|
| @@ -306,7 +306,50 @@ class GclientTest(trial_dir.TestCase):
|
|
|
| obj = gclient.GClient.LoadCurrentConfig(options)
|
| self.assertEqual(['baz', 'unix'], sorted(obj.enforced_os))
|
| -
|
| +
|
| + def testRecursionOverride(self):
|
| + """Verifies that recursion variable allows gclient to pull additional deps.
|
| +
|
| + We only test the case of recursion override for top-level deps, as that is
|
| + all we support.
|
| + """
|
| + write(
|
| + '.gclient',
|
| + 'solutions = [\n'
|
| + ' { "name": "foo", "url": "svn://example.com/foo" },\n'
|
| + ']')
|
| + write(
|
| + os.path.join('foo', 'DEPS'),
|
| + 'deps = {\n'
|
| + ' "bar": "/bar",\n'
|
| + '}\n'
|
| + 'recursion = 2')
|
| + write(
|
| + os.path.join('bar', 'DEPS'),
|
| + 'deps = {\n'
|
| + ' "baz": "/baz",\n'
|
| + '}')
|
| + write(
|
| + os.path.join('baz', 'DEPS'),
|
| + 'deps = {\n'
|
| + ' "fizz": "/fizz",\n'
|
| + '}')
|
| + write(
|
| + os.path.join('fizz', 'DEPS'),
|
| + 'deps = {\n'
|
| + '}')
|
| +
|
| + options, _ = gclient.Parser().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())
|
| +
|
|
|
| if __name__ == '__main__':
|
| sys.stdout = gclient_utils.MakeFileAutoFlush(sys.stdout)
|
|
|