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 """Unit tests for gclient.py. | 6 """Unit tests for gclient.py. |
7 | 7 |
8 See gclient_smoketest.py for integration tests. | 8 See gclient_smoketest.py for integration tests. |
9 """ | 9 """ |
10 | 10 |
(...skipping 693 matching lines...) Loading... |
704 os.path.join('tar', 'DEPS'), | 704 os.path.join('tar', 'DEPS'), |
705 'deps = {\n' | 705 'deps = {\n' |
706 ' "taz": "/taz",\n' | 706 ' "taz": "/taz",\n' |
707 '}') | 707 '}') |
708 | 708 |
709 options, _ = gclient.OptionParser().parse_args([]) | 709 options, _ = gclient.OptionParser().parse_args([]) |
710 obj = gclient.GClient.LoadCurrentConfig(options) | 710 obj = gclient.GClient.LoadCurrentConfig(options) |
711 obj.RunOnDeps('None', []) | 711 obj.RunOnDeps('None', []) |
712 self.assertEquals( | 712 self.assertEquals( |
713 [ | 713 [ |
| 714 'svn://example.com/bar', |
714 'svn://example.com/foo', | 715 'svn://example.com/foo', |
715 'svn://example.com/bar', | |
716 'svn://example.com/tar', | |
717 'svn://example.com/foo/bar', | 716 'svn://example.com/foo/bar', |
718 'svn://example.com/foo/bar/baz', | 717 'svn://example.com/foo/bar/baz', |
719 'svn://example.com/foo/bar/baz/fizz', | 718 'svn://example.com/foo/bar/baz/fizz', |
| 719 'svn://example.com/tar', |
720 ], | 720 ], |
721 self._get_processed()) | 721 sorted(self._get_processed())) |
722 | 722 |
723 def testRecursedepsOverrideWithRelativePaths(self): | 723 def testRecursedepsOverrideWithRelativePaths(self): |
724 """Verifies gclient respects |recursedeps| with relative paths.""" | 724 """Verifies gclient respects |recursedeps| with relative paths.""" |
725 | 725 |
726 write( | 726 write( |
727 '.gclient', | 727 '.gclient', |
728 'solutions = [\n' | 728 'solutions = [\n' |
729 ' { "name": "foo", "url": "svn://example.com/foo" },\n' | 729 ' { "name": "foo", "url": "svn://example.com/foo" },\n' |
730 ']') | 730 ']') |
731 write( | 731 write( |
(...skipping 334 matching lines...) Loading... |
1066 sys.stdout = gclient_utils.MakeFileAutoFlush(sys.stdout) | 1066 sys.stdout = gclient_utils.MakeFileAutoFlush(sys.stdout) |
1067 sys.stdout = gclient_utils.MakeFileAnnotated(sys.stdout, include_zero=True) | 1067 sys.stdout = gclient_utils.MakeFileAnnotated(sys.stdout, include_zero=True) |
1068 sys.stderr = gclient_utils.MakeFileAutoFlush(sys.stderr) | 1068 sys.stderr = gclient_utils.MakeFileAutoFlush(sys.stderr) |
1069 sys.stderr = gclient_utils.MakeFileAnnotated(sys.stderr, include_zero=True) | 1069 sys.stderr = gclient_utils.MakeFileAnnotated(sys.stderr, include_zero=True) |
1070 logging.basicConfig( | 1070 logging.basicConfig( |
1071 level=[logging.ERROR, logging.WARNING, logging.INFO, logging.DEBUG][ | 1071 level=[logging.ERROR, logging.WARNING, logging.INFO, logging.DEBUG][ |
1072 min(sys.argv.count('-v'), 3)], | 1072 min(sys.argv.count('-v'), 3)], |
1073 format='%(relativeCreated)4d %(levelname)5s %(module)13s(' | 1073 format='%(relativeCreated)4d %(levelname)5s %(module)13s(' |
1074 '%(lineno)d) %(message)s') | 1074 '%(lineno)d) %(message)s') |
1075 unittest.main() | 1075 unittest.main() |
OLD | NEW |