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

Unified Diff: tests/gclient_smoketest.py

Issue 7062029: Add a --deps-file flag to gclient to allow using a deps file other than DEPS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 9 years, 7 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
« gclient.py ('K') | « tests/fake_repos.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gclient_smoketest.py
===================================================================
--- tests/gclient_smoketest.py (revision 86896)
+++ tests/gclient_smoketest.py (working copy)
@@ -199,6 +199,7 @@
('solutions = [\n'
' { "name" : "src",\n'
' "url" : "%strunk/src",\n'
+ ' "deps_file" : "DEPS",\n'
' "custom_deps" : {\n'
' },\n'
' "safesync_url": "",\n'
@@ -209,6 +210,7 @@
('solutions = [\n'
' { "name" : "src",\n'
' "url" : "%srepo_1",\n'
+ ' "deps_file" : "DEPS",\n'
' "custom_deps" : {\n'
' },\n'
' "safesync_url": "",\n'
@@ -219,12 +221,24 @@
'solutions = [\n'
' { "name" : "foo",\n'
' "url" : "foo",\n'
+ ' "deps_file" : "DEPS",\n'
' "custom_deps" : {\n'
' },\n'
' "safesync_url": "faa",\n'
' },\n'
']\n')
+ test(['config', 'foo', '--deps', 'blah'],
+ 'solutions = [\n'
+ ' { "name" : "foo",\n'
+ ' "url" : "foo",\n'
+ ' "deps_file" : "blah",\n'
+ ' "custom_deps" : {\n'
+ ' },\n'
+ ' "safesync_url": "",\n'
+ ' },\n'
+ ']\n')
+
test(['config', '--spec', '["blah blah"]'], '["blah blah"]')
os.remove(p)
@@ -672,6 +686,7 @@
'solutions = [\n'
' { "name" : "src",\n'
' "url" : "%(base)s/src",\n'
+ ' "deps_file" : "DEPS",\n'
' "custom_deps" : {\n'
' "foo/bar": None,\n'
' "invalid": None,\n'
@@ -686,6 +701,28 @@
{ 'base': self.svn_base + 'trunk' })
self.check((out, '', 0), results)
+ def testRevInfoAltDeps(self):
+ if not self.enabled:
+ return
+ self.gclient(['config', self.svn_base + 'trunk/src/', '--deps-file',
+ 'DEPS.alt'])
+ self.gclient(['sync'])
+ results = self.gclient(['revinfo', '--snapshot'])
+ out = ('# Snapshot generated with gclient revinfo --snapshot\n'
+ 'solutions = [\n'
+ ' { "name" : "src",\n'
+ ' "url" : "%(base)s/src",\n'
+ ' "deps_file" : "DEPS.alt",\n'
+ ' "custom_deps" : {\n'
+ ' "src/other2": \'%(base)s/other@2\',\n'
+ ' },\n'
+ ' "safesync_url": "",\n'
+ ' },\n'
+ ']\n\n' %
+ { 'base': self.svn_base + 'trunk' })
+ self.check((out, '', 0), results)
+
+
def testWrongDirectory(self):
# Check that we're not using a .gclient configuration which only talks
# about a subdirectory src when we're in a different subdirectory src-other.
« gclient.py ('K') | « tests/fake_repos.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698