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

Side by Side Diff: tests/gclient_smoketest.py

Issue 1152443004: Add quotes around command line in subproccess error message (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « subprocess2.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) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 self.assertTree(tree) 510 self.assertTree(tree)
511 511
512 def testPreDepsHooksError(self): 512 def testPreDepsHooksError(self):
513 if not self.enabled: 513 if not self.enabled:
514 return 514 return
515 self.gclient(['config', self.git_base + 'repo_5', '--name', 'src']) 515 self.gclient(['config', self.git_base + 'repo_5', '--name', 'src'])
516 expectated_stdout = [ 516 expectated_stdout = [
517 ('running', self.root_dir), # pre-deps hook 517 ('running', self.root_dir), # pre-deps hook
518 ('running', self.root_dir), # pre-deps hook (fails) 518 ('running', self.root_dir), # pre-deps hook (fails)
519 ] 519 ]
520 expected_stderr = ('Error: Command /usr/bin/python -c import sys; ' 520 expected_stderr = ("Error: Command '/usr/bin/python -c import sys; "
521 'sys.exit(1) returned non-zero exit status 1 in %s\n' 521 "sys.exit(1)' returned non-zero exit status 1 in %s\n"
522 % self.root_dir) 522 % self.root_dir)
523 stdout, stderr, retcode = self.gclient(['sync', '--deps', 'mac', '--jobs=1', 523 stdout, stderr, retcode = self.gclient(['sync', '--deps', 'mac', '--jobs=1',
524 '--revision', 524 '--revision',
525 'src@' + self.githash('repo_5', 3)]) 525 'src@' + self.githash('repo_5', 3)])
526 self.assertEquals(stderr, expected_stderr) 526 self.assertEquals(stderr, expected_stderr)
527 self.assertEquals(2, retcode) 527 self.assertEquals(2, retcode)
528 self.checkBlock(stdout, expectated_stdout) 528 self.checkBlock(stdout, expectated_stdout)
529 529
530 def testRevInfo(self): 530 def testRevInfo(self):
531 if not self.enabled: 531 if not self.enabled:
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 906
907 if '-c' in sys.argv: 907 if '-c' in sys.argv:
908 COVERAGE = True 908 COVERAGE = True
909 sys.argv.remove('-c') 909 sys.argv.remove('-c')
910 if os.path.exists('.coverage'): 910 if os.path.exists('.coverage'):
911 os.remove('.coverage') 911 os.remove('.coverage')
912 os.environ['COVERAGE_FILE'] = os.path.join( 912 os.environ['COVERAGE_FILE'] = os.path.join(
913 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 913 os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
914 '.coverage') 914 '.coverage')
915 unittest.main() 915 unittest.main()
OLDNEW
« no previous file with comments | « subprocess2.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698