| OLD | NEW |
| 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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 'DEPS.alt']) | 698 'DEPS.alt']) |
| 699 self.gclient(['sync']) | 699 self.gclient(['sync']) |
| 700 results = self.gclient(['revinfo', '--snapshot']) | 700 results = self.gclient(['revinfo', '--snapshot']) |
| 701 out = ('# Snapshot generated with gclient revinfo --snapshot\n' | 701 out = ('# Snapshot generated with gclient revinfo --snapshot\n' |
| 702 'solutions = [\n' | 702 'solutions = [\n' |
| 703 ' { "name" : "src",\n' | 703 ' { "name" : "src",\n' |
| 704 ' "url" : "%(base)s/src",\n' | 704 ' "url" : "%(base)s/src",\n' |
| 705 ' "deps_file" : "DEPS.alt",\n' | 705 ' "deps_file" : "DEPS.alt",\n' |
| 706 ' "managed" : True,\n' | 706 ' "managed" : True,\n' |
| 707 ' "custom_deps" : {\n' | 707 ' "custom_deps" : {\n' |
| 708 ' "foo/bar": None,\n' |
| 709 ' "invalid": None,\n' |
| 708 ' "src/other2": \'%(base)s/other@2\',\n' | 710 ' "src/other2": \'%(base)s/other@2\',\n' |
| 709 ' },\n' | 711 ' },\n' |
| 710 ' "safesync_url": "",\n' | 712 ' "safesync_url": "",\n' |
| 711 ' },\n' | 713 ' },\n' |
| 712 ']\n\n' % | 714 ']\n\n' % |
| 713 { 'base': self.svn_base + 'trunk' }) | 715 { 'base': self.svn_base + 'trunk' }) |
| 714 self.check((out, '', 0), results) | 716 self.check((out, '', 0), results) |
| 715 | 717 |
| 716 | 718 |
| 717 def testWrongDirectory(self): | 719 def testWrongDirectory(self): |
| (...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1595 | 1597 |
| 1596 if '-c' in sys.argv: | 1598 if '-c' in sys.argv: |
| 1597 COVERAGE = True | 1599 COVERAGE = True |
| 1598 sys.argv.remove('-c') | 1600 sys.argv.remove('-c') |
| 1599 if os.path.exists('.coverage'): | 1601 if os.path.exists('.coverage'): |
| 1600 os.remove('.coverage') | 1602 os.remove('.coverage') |
| 1601 os.environ['COVERAGE_FILE'] = os.path.join( | 1603 os.environ['COVERAGE_FILE'] = os.path.join( |
| 1602 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), | 1604 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), |
| 1603 '.coverage') | 1605 '.coverage') |
| 1604 unittest.main() | 1606 unittest.main() |
| OLD | NEW |