OLD | NEW |
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 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 self.gclient(['config', '--spec', | 1086 self.gclient(['config', '--spec', |
1087 'solutions=[' | 1087 'solutions=[' |
1088 '{"name": "src",' | 1088 '{"name": "src",' |
1089 ' "url": "' + self.svn_base + 'trunk/src/"},' | 1089 ' "url": "' + self.svn_base + 'trunk/src/"},' |
1090 '{"name": "src-git",' | 1090 '{"name": "src-git",' |
1091 '"url": "' + self.git_base + 'repo_1"}]']) | 1091 '"url": "' + self.git_base + 'repo_1"}]']) |
1092 self.parseGclient( | 1092 self.parseGclient( |
1093 ['sync', '--deps', 'mac', '--jobs', '1', '--revision', '1', | 1093 ['sync', '--deps', 'mac', '--jobs', '1', '--revision', '1', |
1094 '-r', 'src-git@' + self.githash('repo_1', 1)], | 1094 '-r', 'src-git@' + self.githash('repo_1', 1)], |
1095 ['running', 'running', 'running', 'running', | 1095 ['running', 'running', 'running', 'running', |
1096 'running', 'running', 'running', 'running']) | 1096 'running', 'running', 'running', 'running'], |
| 1097 expected_stderr= |
| 1098 'You must specify the full solution name like --revision src@1\n' |
| 1099 'when you have multiple solutions setup in your .gclient file.\n' |
| 1100 'Other solutions present are: src-git.\n') |
1097 tree = self.mangle_git_tree(('repo_1@1', 'src-git'), | 1101 tree = self.mangle_git_tree(('repo_1@1', 'src-git'), |
1098 ('repo_2@2', 'src/repo2'), | 1102 ('repo_2@2', 'src/repo2'), |
1099 ('repo_3@1', 'src/repo2/repo3'), | 1103 ('repo_3@1', 'src/repo2/repo3'), |
1100 ('repo_4@2', 'src/repo4')) | 1104 ('repo_4@2', 'src/repo4')) |
1101 tree.update(self.mangle_svn_tree( | 1105 tree.update(self.mangle_svn_tree( |
1102 ('trunk/src@1', 'src'), | 1106 ('trunk/src@1', 'src'), |
1103 ('trunk/third_party/foo@2', 'src/third_party/fpp'), | 1107 ('trunk/third_party/foo@2', 'src/third_party/fpp'), |
1104 ('trunk/other@1', 'src/other'), | 1108 ('trunk/other@1', 'src/other'), |
1105 ('trunk/third_party/foo@2', 'src/third_party/prout'))) | 1109 ('trunk/third_party/foo@2', 'src/third_party/prout'))) |
1106 self.assertTree(tree) | 1110 self.assertTree(tree) |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1276 | 1280 |
1277 if '-c' in sys.argv: | 1281 if '-c' in sys.argv: |
1278 COVERAGE = True | 1282 COVERAGE = True |
1279 sys.argv.remove('-c') | 1283 sys.argv.remove('-c') |
1280 if os.path.exists('.coverage'): | 1284 if os.path.exists('.coverage'): |
1281 os.remove('.coverage') | 1285 os.remove('.coverage') |
1282 os.environ['COVERAGE_FILE'] = os.path.join( | 1286 os.environ['COVERAGE_FILE'] = os.path.join( |
1283 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), | 1287 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), |
1284 '.coverage') | 1288 '.coverage') |
1285 unittest.main() | 1289 unittest.main() |
OLD | NEW |