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

Unified Diff: tests/gclient_smoketest.py

Issue 2839008: Make the DEPS parsing saner. (Closed)
Patch Set: Take 3. fixes issue with double-parsed DEPS Created 10 years, 6 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
« no previous file with comments | « 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
diff --git a/tests/gclient_smoketest.py b/tests/gclient_smoketest.py
index 713d7ff30485777f271923c7323865a48c09824a..ebe647acd42adf079e4450119c3fa1a3839ceda9 100755
--- a/tests/gclient_smoketest.py
+++ b/tests/gclient_smoketest.py
@@ -283,6 +283,8 @@ class GClientSmokeSVN(GClientSmokeBase):
# matching.
results = self.gclient(['revert', '--deps', 'mac'])
out = self.splitBlock(results[0])
+ # src, src/other is missing, src/other, src/third_party/foo is missing,
+ # src/third_party/foo, 2 svn hooks.
self.assertEquals(7, len(out))
self.checkString('', results[1])
self.assertEquals(0, results[2])
@@ -375,7 +377,6 @@ class GClientSmokeSVN(GClientSmokeBase):
self.assertEquals([], out)
def testRevInfo(self):
- # TODO(maruel): Test multiple solutions.
self.gclient(['config', self.svn_base + 'trunk/src/'])
self.gclient(['sync', '--deps', 'mac'])
results = self.gclient(['revinfo', '--deps', 'mac'])
@@ -586,6 +587,7 @@ class GClientSmokeBoth(GClientSmokeBase):
'{"name": "src-git",'
'"url": "' + self.git_base + 'repo_1"}]'])
results = self.gclient(['sync', '--deps', 'mac'])
+ # 3x svn checkout, 3x run hooks
self.checkBlock(results[0],
['running', 'running', 'running', 'running', 'running',
'running', 'running'])
@@ -633,6 +635,31 @@ class GClientSmokeBoth(GClientSmokeBase):
('trunk/third_party/foo@2', 'src/third_party/prout')))
self.assertTree(tree)
+ def testRevInfo(self):
+ if not self.enabled:
+ return
+ self.gclient(['config', '--spec',
+ 'solutions=['
+ '{"name": "src",'
+ ' "url": "' + self.svn_base + 'trunk/src/"},'
+ '{"name": "src-git",'
+ '"url": "' + self.git_base + 'repo_1"}]'])
+ self.gclient(['sync', '--deps', 'mac'])
+ results = self.gclient(['revinfo', '--deps', 'mac'])
+ out = ('src: %(svn_base)s/src/@2;\n'
+ 'src-git: %(git_base)srepo_1@%(hash1)s;\n'
+ 'src/other: %(svn_base)s/other@2;\n'
+ 'src/repo2: %(git_base)srepo_2@%(hash2)s;\n'
+ 'src/repo2/repo_renamed: %(git_base)srepo_3@%(hash3)s;\n'
+ 'src/third_party/foo: %(svn_base)s/third_party/foo@1\n') % {
+ 'svn_base': self.svn_base + 'trunk',
+ 'git_base': self.git_base,
+ 'hash1': self.githash('repo_1', 2),
+ 'hash2': self.githash('repo_2', 1),
+ 'hash3': self.githash('repo_3', 2),
+ }
+ self.check((out, '', 0), results)
+
if __name__ == '__main__':
if '-c' in sys.argv:
« no previous file with comments | « tests/fake_repos.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698