Chromium Code Reviews| 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. |