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

Side by Side Diff: tests/gclient_smoketest.py

Issue 9560010: Rework gclient 'recurse' command to use a WorkQueue. (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Style nit. Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gclient.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Smoke tests for gclient.py. 6 """Smoke tests for gclient.py.
7 7
8 Shell out 'gclient' and run basic conformance tests. 8 Shell out 'gclient' and run basic conformance tests.
9 9
10 This test assumes GClientSmokeBase.URL_BASE is valid. 10 This test assumes GClientSmokeBase.URL_BASE is valid.
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 def testRecurse(self): 1152 def testRecurse(self):
1153 if not self.enabled: 1153 if not self.enabled:
1154 return 1154 return
1155 self.gclient(['config', '--spec', 1155 self.gclient(['config', '--spec',
1156 'solutions=[' 1156 'solutions=['
1157 '{"name": "src",' 1157 '{"name": "src",'
1158 ' "url": "' + self.svn_base + 'trunk/src/"},' 1158 ' "url": "' + self.svn_base + 'trunk/src/"},'
1159 '{"name": "src-git",' 1159 '{"name": "src-git",'
1160 '"url": "' + self.git_base + 'repo_1"}]']) 1160 '"url": "' + self.git_base + 'repo_1"}]'])
1161 self.gclient(['sync', '--deps', 'mac']) 1161 self.gclient(['sync', '--deps', 'mac'])
1162 results = self.gclient(['recurse', 'sh', '-c', 1162 results = self.gclient(['recurse', '-j1', 'sh', '-c',
1163 'echo $GCLIENT_SCM,$GCLIENT_URL,`pwd`']) 1163 'echo $GCLIENT_SCM,$GCLIENT_URL,`pwd`'])
1164 1164
1165 entries = [tuple(line.split(',')) 1165 entries = [tuple(line.split(','))
1166 for line in results[0].strip().split('\n')] 1166 for line in results[0].strip().split('\n')]
1167 logging.debug(entries) 1167 logging.debug(entries)
1168 1168
1169 bases = {'svn': self.svn_base, 'git': self.git_base} 1169 bases = {'svn': self.svn_base, 'git': self.git_base}
1170 expected_source = [ 1170 expected_source = [
1171 ('svn', 'trunk/src/', 'src'), 1171 ('svn', 'trunk/src/', 'src'),
1172 ('git', 'repo_1', 'src-git'), 1172 ('git', 'repo_1', 'src-git'),
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 1281
1282 if '-c' in sys.argv: 1282 if '-c' in sys.argv:
1283 COVERAGE = True 1283 COVERAGE = True
1284 sys.argv.remove('-c') 1284 sys.argv.remove('-c')
1285 if os.path.exists('.coverage'): 1285 if os.path.exists('.coverage'):
1286 os.remove('.coverage') 1286 os.remove('.coverage')
1287 os.environ['COVERAGE_FILE'] = os.path.join( 1287 os.environ['COVERAGE_FILE'] = os.path.join(
1288 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 1288 os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
1289 '.coverage') 1289 '.coverage')
1290 unittest.main() 1290 unittest.main()
OLDNEW
« 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