OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 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 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 # TODO(maruel): To be added after the refactor. | 863 # TODO(maruel): To be added after the refactor. |
864 #results = self.gclient(['revinfo', '--snapshot']) | 864 #results = self.gclient(['revinfo', '--snapshot']) |
865 #expected = ( | 865 #expected = ( |
866 # './: None\nfoo/bar: svn://127.0.0.1/svn/trunk/third_party/foo@1\n', | 866 # './: None\nfoo/bar: svn://127.0.0.1/svn/trunk/third_party/foo@1\n', |
867 # '', 0) | 867 # '', 0) |
868 #self.check(expected, results) | 868 #self.check(expected, results) |
869 | 869 |
870 def testRest(self): | 870 def testRest(self): |
871 self.gclient(['sync']) | 871 self.gclient(['sync']) |
872 # TODO(maruel): This is incorrect, it should run on ./ too. | 872 # TODO(maruel): This is incorrect, it should run on ./ too. |
873 out = self.parseGclient(['cleanup', '--deps', 'mac'], | 873 out = self.parseGclient(['cleanup', '--deps', 'mac', '--verbose'], |
874 [('running', join(self.root_dir, 'foo', 'bar'))]) | 874 [('running', join(self.root_dir, 'foo', 'bar'))]) |
875 out = self.parseGclient(['diff', '--deps', 'mac'], | 875 out = self.parseGclient(['diff', '--deps', 'mac', '--verbose'], |
876 [('running', join(self.root_dir, 'foo', 'bar'))]) | 876 [('running', join(self.root_dir, 'foo', 'bar'))]) |
877 | 877 |
878 | 878 |
879 if __name__ == '__main__': | 879 if __name__ == '__main__': |
880 if '-c' in sys.argv: | 880 if '-c' in sys.argv: |
881 COVERAGE = True | 881 COVERAGE = True |
882 sys.argv.remove('-c') | 882 sys.argv.remove('-c') |
883 if os.path.exists('.coverage'): | 883 if os.path.exists('.coverage'): |
884 os.remove('.coverage') | 884 os.remove('.coverage') |
885 os.environ['COVERAGE_FILE'] = os.path.join( | 885 os.environ['COVERAGE_FILE'] = os.path.join( |
886 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), | 886 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), |
887 '.coverage') | 887 '.coverage') |
888 unittest.main() | 888 unittest.main() |
OLD | NEW |