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

Unified Diff: tests/gclient_smoketest.py

Issue 2862039: Add gclient recurse (Closed)
Patch Set: address review comments 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 | « gclient.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 ebe647acd42adf079e4450119c3fa1a3839ceda9..73f7f3d810344a7c2416e344a239d8a4f29f4cc1 100755
--- a/tests/gclient_smoketest.py
+++ b/tests/gclient_smoketest.py
@@ -660,6 +660,37 @@ class GClientSmokeBoth(GClientSmokeBase):
}
self.check((out, '', 0), results)
+ def testRecurse(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(['recurse', 'sh', '-c',
+ 'echo $GCLIENT_SCM,$GCLIENT_URL,`pwd`'])
+
+ entries = [tuple(line.split(','))
+ for line in results[0].strip().split('\n')]
+ logging.debug(entries)
+
+ bases = {'svn': self.svn_base, 'git': self.git_base}
+ expected_source = [
+ ('svn', 'trunk/src/', 'src'),
+ ('git', 'repo_1', 'src-git'),
+ ('svn', 'trunk/other', 'src/other'),
+ ('git', 'repo_2@' + self.githash('repo_2', 1)[:7], 'src/repo2'),
+ ('git', 'repo_3', 'src/repo2/repo_renamed'),
+ ('svn', 'trunk/third_party/foo@1', 'src/third_party/foo'),
+ ]
+ expected = [(scm, bases[scm] + url, os.path.join(self.root_dir, path))
+ for (scm, url, path) in expected_source]
+
+ self.assertEquals(sorted(entries), sorted(expected))
+
if __name__ == '__main__':
if '-c' in sys.argv:
« no previous file with comments | « gclient.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698