| Index: tests/gclient_test.py
|
| diff --git a/tests/gclient_test.py b/tests/gclient_test.py
|
| index fb6577913e248408e84a689219b4cc2fd4ba35c8..eef4c9f94488c042626320741c3f0ba877cdcc6b 100755
|
| --- a/tests/gclient_test.py
|
| +++ b/tests/gclient_test.py
|
| @@ -809,6 +809,56 @@ class GclientTest(trial_dir.TestCase):
|
| ],
|
| self._get_processed())
|
|
|
| + def testGitDeps(self):
|
| + """Verifies gclient respects a .DEPS.git deps file."""
|
| + write(
|
| + '.gclient',
|
| + 'solutions = [\n'
|
| + ' { "name": "foo", "url": "svn://example.com/foo",\n'
|
| + ' "deps_file" : ".DEPS.git",\n'
|
| + ' },\n'
|
| + ']')
|
| + write(
|
| + os.path.join('foo', '.DEPS.git'),
|
| + 'deps = {\n'
|
| + ' "bar": "/bar",\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',
|
| + ],
|
| + self._get_processed())
|
| +
|
| + def testGitDepsFallback(self):
|
| + """Verifies gclient respects fallback to DEPS upon missing deps file."""
|
| + write(
|
| + '.gclient',
|
| + 'solutions = [\n'
|
| + ' { "name": "foo", "url": "svn://example.com/foo",\n'
|
| + ' "deps_file" : ".DEPS.git",\n'
|
| + ' },\n'
|
| + ']')
|
| + write(
|
| + os.path.join('foo', 'DEPS'),
|
| + 'deps = {\n'
|
| + ' "bar": "/bar",\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',
|
| + ],
|
| + self._get_processed())
|
| +
|
|
|
| if __name__ == '__main__':
|
| sys.stdout = gclient_utils.MakeFileAutoFlush(sys.stdout)
|
|
|