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 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
832 def setUp(self): | 832 def setUp(self): |
833 super(GClientSmokeGIT, self).setUp() | 833 super(GClientSmokeGIT, self).setUp() |
834 self.enabled = self.FAKE_REPOS.set_up_git() | 834 self.enabled = self.FAKE_REPOS.set_up_git() |
835 | 835 |
836 def testSync(self): | 836 def testSync(self): |
837 if not self.enabled: | 837 if not self.enabled: |
838 return | 838 return |
839 # TODO(maruel): safesync. | 839 # TODO(maruel): safesync. |
840 self.gclient(['config', self.git_base + 'repo_1', '--name', 'src']) | 840 self.gclient(['config', self.git_base + 'repo_1', '--name', 'src']) |
841 # Test unversioned checkout. | 841 # Test unversioned checkout. |
842 self.parseGclient(['sync', '--deps', 'mac', '--jobs', '1'], | 842 self.parseGclient( |
843 ['running', 'running', 'running', 'running', 'running']) | 843 ['sync', '--deps', 'mac', '--jobs', '1'], |
844 ['running', | |
845 # Git checkout. | |
846 ('running', self.root_dir + '/src'), | |
847 'running', | |
848 # Git checkout. | |
849 ('running', self.root_dir + '/src/repo2'), | |
850 'running', | |
851 # Git checkout. | |
852 ('running', self.root_dir + '/src/repo2/repo_renamed'), | |
853 'running', 'running']) | |
iannucci
2013/07/20 01:35:39
wdyt about:
[
'running',
('running', ...), #
Isaac (away)
2013/07/20 01:54:52
I'll remove comments.
| |
844 # TODO(maruel): http://crosbug.com/3582 hooks run even if not matching, must | 854 # TODO(maruel): http://crosbug.com/3582 hooks run even if not matching, must |
845 # add sync parsing to get the list of updated files. | 855 # add sync parsing to get the list of updated files. |
846 tree = self.mangle_git_tree(('repo_1@2', 'src'), | 856 tree = self.mangle_git_tree(('repo_1@2', 'src'), |
847 ('repo_2@1', 'src/repo2'), | 857 ('repo_2@1', 'src/repo2'), |
848 ('repo_3@2', 'src/repo2/repo_renamed')) | 858 ('repo_3@2', 'src/repo2/repo_renamed')) |
849 tree['src/git_hooked1'] = 'git_hooked1' | 859 tree['src/git_hooked1'] = 'git_hooked1' |
850 tree['src/git_hooked2'] = 'git_hooked2' | 860 tree['src/git_hooked2'] = 'git_hooked2' |
851 self.assertTree(tree) | 861 self.assertTree(tree) |
852 | 862 |
853 # Manually remove git_hooked1 before synching to make sure it's not | 863 # Manually remove git_hooked1 before synching to make sure it's not |
854 # recreated. | 864 # recreated. |
855 os.remove(join(self.root_dir, 'src', 'git_hooked1')) | 865 os.remove(join(self.root_dir, 'src', 'git_hooked1')) |
856 | 866 |
857 # Test incremental versioned sync: sync backward. | 867 # Test incremental versioned sync: sync backward. |
858 diffdir = os.path.join(self.root_dir, 'src', 'repo2', 'repo_renamed') | 868 diffdir = os.path.join(self.root_dir, 'src', 'repo2', 'repo_renamed') |
859 self.parseGclient(['sync', '--jobs', '1', '--revision', | 869 self.parseGclient( |
860 'src@' + self.githash('repo_1', 1), | 870 ['sync', '--jobs', '1', '--revision', |
861 '--deps', 'mac', '--delete_unversioned_trees'], | 871 'src@' + self.githash('repo_1', 1), |
862 ['running', 'running', ('running', diffdir), 'deleting']) | 872 '--deps', 'mac', '--delete_unversioned_trees'], |
873 ['running', | |
874 # Git checkout. | |
875 ('running', self.root_dir + '/src/repo2/repo3'), | |
876 'running', | |
877 # Git checkout. | |
878 ('running', self.root_dir + '/src/repo4'), | |
879 ('running', diffdir), 'deleting']) | |
863 tree = self.mangle_git_tree(('repo_1@1', 'src'), | 880 tree = self.mangle_git_tree(('repo_1@1', 'src'), |
864 ('repo_2@2', 'src/repo2'), | 881 ('repo_2@2', 'src/repo2'), |
865 ('repo_3@1', 'src/repo2/repo3'), | 882 ('repo_3@1', 'src/repo2/repo3'), |
866 ('repo_4@2', 'src/repo4')) | 883 ('repo_4@2', 'src/repo4')) |
867 tree['src/git_hooked2'] = 'git_hooked2' | 884 tree['src/git_hooked2'] = 'git_hooked2' |
868 self.assertTree(tree) | 885 self.assertTree(tree) |
869 # Test incremental sync: delete-unversioned_trees isn't there. | 886 # Test incremental sync: delete-unversioned_trees isn't there. |
870 expect3 = ('running', os.path.join(self.root_dir, 'src', 'repo2', 'repo3')) | 887 expect3 = ('running', os.path.join(self.root_dir, 'src', 'repo2', 'repo3')) |
871 expect4 = ('running', os.path.join(self.root_dir, 'src', 'repo4')) | 888 expect4 = ('running', os.path.join(self.root_dir, 'src', 'repo4')) |
872 self.parseGclient(['sync', '--deps', 'mac', '--jobs', '1'], | 889 self.parseGclient( |
873 ['running', 'running', 'running', expect3, expect4]) | 890 ['sync', '--deps', 'mac', '--jobs', '1'], |
891 ['running', | |
892 # Git checkout. | |
893 ('running', self.root_dir + '/src/repo2/repo_renamed'), | |
894 'running', 'running', expect3, expect4]) | |
874 tree = self.mangle_git_tree(('repo_1@2', 'src'), | 895 tree = self.mangle_git_tree(('repo_1@2', 'src'), |
875 ('repo_2@1', 'src/repo2'), | 896 ('repo_2@1', 'src/repo2'), |
876 ('repo_3@1', 'src/repo2/repo3'), | 897 ('repo_3@1', 'src/repo2/repo3'), |
877 ('repo_3@2', 'src/repo2/repo_renamed'), | 898 ('repo_3@2', 'src/repo2/repo_renamed'), |
878 ('repo_4@2', 'src/repo4')) | 899 ('repo_4@2', 'src/repo4')) |
879 tree['src/git_hooked1'] = 'git_hooked1' | 900 tree['src/git_hooked1'] = 'git_hooked1' |
880 tree['src/git_hooked2'] = 'git_hooked2' | 901 tree['src/git_hooked2'] = 'git_hooked2' |
881 self.assertTree(tree) | 902 self.assertTree(tree) |
882 | 903 |
883 def testSyncIgnoredSolutionName(self): | 904 def testSyncIgnoredSolutionName(self): |
884 """TODO(maruel): This will become an error soon.""" | 905 """TODO(maruel): This will become an error soon.""" |
885 if not self.enabled: | 906 if not self.enabled: |
886 return | 907 return |
887 self.gclient(['config', self.git_base + 'repo_1', '--name', 'src']) | 908 self.gclient(['config', self.git_base + 'repo_1', '--name', 'src']) |
888 self.parseGclient( | 909 self.parseGclient( |
889 ['sync', '--deps', 'mac', '--jobs', '1', | 910 ['sync', '--deps', 'mac', '--jobs', '1', |
890 '--revision', 'invalid@' + self.githash('repo_1', 1)], | 911 '--revision', 'invalid@' + self.githash('repo_1', 1)], |
891 ['running', 'running', 'running', 'running', 'running'], | 912 ['running', |
913 # Git checkout. | |
914 ('running', self.root_dir + '/src'), | |
915 'running', | |
916 # Git checkout. | |
917 ('running', self.root_dir + '/src/repo2'), | |
918 'running', | |
919 # Git checkout. | |
920 ('running', self.root_dir + '/src/repo2/repo_renamed'), | |
921 'running', 'running'], | |
892 'Please fix your script, having invalid --revision flags ' | 922 'Please fix your script, having invalid --revision flags ' |
893 'will soon considered an error.\n') | 923 'will soon considered an error.\n') |
894 tree = self.mangle_git_tree(('repo_1@2', 'src'), | 924 tree = self.mangle_git_tree(('repo_1@2', 'src'), |
895 ('repo_2@1', 'src/repo2'), | 925 ('repo_2@1', 'src/repo2'), |
896 ('repo_3@2', 'src/repo2/repo_renamed')) | 926 ('repo_3@2', 'src/repo2/repo_renamed')) |
897 tree['src/git_hooked1'] = 'git_hooked1' | 927 tree['src/git_hooked1'] = 'git_hooked1' |
898 tree['src/git_hooked2'] = 'git_hooked2' | 928 tree['src/git_hooked2'] = 'git_hooked2' |
899 self.assertTree(tree) | 929 self.assertTree(tree) |
900 | 930 |
901 def testSyncNoSolutionName(self): | 931 def testSyncNoSolutionName(self): |
902 if not self.enabled: | 932 if not self.enabled: |
903 return | 933 return |
904 # When no solution name is provided, gclient uses the first solution listed. | 934 # When no solution name is provided, gclient uses the first solution listed. |
905 self.gclient(['config', self.git_base + 'repo_1', '--name', 'src']) | 935 self.gclient(['config', self.git_base + 'repo_1', '--name', 'src']) |
906 self.parseGclient(['sync', '--deps', 'mac', '--jobs', '1', | 936 self.parseGclient( |
907 '--revision', self.githash('repo_1', 1)], | 937 ['sync', '--deps', 'mac', '--jobs', '1', |
908 ['running', 'running', 'running', 'running']) | 938 '--revision', self.githash('repo_1', 1)], |
939 ['running', | |
940 # Git checkout. | |
941 ('running', self.root_dir + '/src'), | |
942 'running', | |
943 # Git checkout. | |
944 ('running', self.root_dir + '/src/repo2'), | |
945 'running', | |
946 # Git checkout. | |
947 ('running', self.root_dir + '/src/repo2/repo3'), | |
948 'running', | |
949 # Git checkout. | |
950 ('running', self.root_dir + '/src/repo4'),]) | |
909 tree = self.mangle_git_tree(('repo_1@1', 'src'), | 951 tree = self.mangle_git_tree(('repo_1@1', 'src'), |
910 ('repo_2@2', 'src/repo2'), | 952 ('repo_2@2', 'src/repo2'), |
911 ('repo_3@1', 'src/repo2/repo3'), | 953 ('repo_3@1', 'src/repo2/repo3'), |
912 ('repo_4@2', 'src/repo4')) | 954 ('repo_4@2', 'src/repo4')) |
913 self.assertTree(tree) | 955 self.assertTree(tree) |
914 | 956 |
915 def testSyncJobs(self): | 957 def testSyncJobs(self): |
916 if not self.enabled: | 958 if not self.enabled: |
917 return | 959 return |
918 # TODO(maruel): safesync. | 960 # TODO(maruel): safesync. |
919 self.gclient(['config', self.git_base + 'repo_1', '--name', 'src']) | 961 self.gclient(['config', self.git_base + 'repo_1', '--name', 'src']) |
920 # Test unversioned checkout. | 962 # Test unversioned checkout. |
921 self.parseGclient(['sync', '--deps', 'mac', '--jobs', '8'], | 963 self.parseGclient( |
922 ['running', 'running', 'running', 'running', 'running'], | 964 ['sync', '--deps', 'mac', '--jobs', '8'], |
923 untangle=True) | 965 ['running', |
966 # Git checkout. | |
967 ('running', self.root_dir + '/src'), | |
968 'running', | |
969 # Git checkout. | |
970 ('running', self.root_dir + '/src/repo2'), | |
971 'running', | |
972 # Git checkout. | |
973 ('running', self.root_dir + '/src/repo2/repo_renamed'), | |
974 'running', 'running'], | |
975 untangle=True) | |
924 # TODO(maruel): http://crosbug.com/3582 hooks run even if not matching, must | 976 # TODO(maruel): http://crosbug.com/3582 hooks run even if not matching, must |
925 # add sync parsing to get the list of updated files. | 977 # add sync parsing to get the list of updated files. |
926 tree = self.mangle_git_tree(('repo_1@2', 'src'), | 978 tree = self.mangle_git_tree(('repo_1@2', 'src'), |
927 ('repo_2@1', 'src/repo2'), | 979 ('repo_2@1', 'src/repo2'), |
928 ('repo_3@2', 'src/repo2/repo_renamed')) | 980 ('repo_3@2', 'src/repo2/repo_renamed')) |
929 tree['src/git_hooked1'] = 'git_hooked1' | 981 tree['src/git_hooked1'] = 'git_hooked1' |
930 tree['src/git_hooked2'] = 'git_hooked2' | 982 tree['src/git_hooked2'] = 'git_hooked2' |
931 self.assertTree(tree) | 983 self.assertTree(tree) |
932 | 984 |
933 # Manually remove git_hooked1 before synching to make sure it's not | 985 # Manually remove git_hooked1 before synching to make sure it's not |
934 # recreated. | 986 # recreated. |
935 os.remove(join(self.root_dir, 'src', 'git_hooked1')) | 987 os.remove(join(self.root_dir, 'src', 'git_hooked1')) |
936 | 988 |
937 # Test incremental versioned sync: sync backward. | 989 # Test incremental versioned sync: sync backward. |
938 expect3 = ('running', | 990 expect3 = ('running', |
939 os.path.join(self.root_dir, 'src', 'repo2', 'repo_renamed')) | 991 os.path.join(self.root_dir, 'src', 'repo2', 'repo_renamed')) |
940 self.parseGclient( | 992 self.parseGclient( |
941 ['sync', '--revision', 'src@' + self.githash('repo_1', 1), | 993 ['sync', '--revision', 'src@' + self.githash('repo_1', 1), |
942 '--deps', 'mac', '--delete_unversioned_trees', '--jobs', '8'], | 994 '--deps', 'mac', '--delete_unversioned_trees', '--jobs', '8'], |
943 ['running', 'running', expect3, 'deleting'], | 995 ['running', |
996 # Git checkout. | |
997 ('running', self.root_dir + '/src/repo4'), | |
998 'running', | |
999 # Git checkout. | |
1000 ('running', self.root_dir + '/src/repo2/repo3'), | |
1001 expect3, 'deleting'], | |
944 untangle=True) | 1002 untangle=True) |
945 tree = self.mangle_git_tree(('repo_1@1', 'src'), | 1003 tree = self.mangle_git_tree(('repo_1@1', 'src'), |
946 ('repo_2@2', 'src/repo2'), | 1004 ('repo_2@2', 'src/repo2'), |
947 ('repo_3@1', 'src/repo2/repo3'), | 1005 ('repo_3@1', 'src/repo2/repo3'), |
948 ('repo_4@2', 'src/repo4')) | 1006 ('repo_4@2', 'src/repo4')) |
949 tree['src/git_hooked2'] = 'git_hooked2' | 1007 tree['src/git_hooked2'] = 'git_hooked2' |
950 self.assertTree(tree) | 1008 self.assertTree(tree) |
951 # Test incremental sync: delete-unversioned_trees isn't there. | 1009 # Test incremental sync: delete-unversioned_trees isn't there. |
952 expect4 = os.path.join(self.root_dir, 'src', 'repo2', 'repo3') | 1010 expect4 = os.path.join(self.root_dir, 'src', 'repo2', 'repo3') |
953 expect5 = os.path.join(self.root_dir, 'src', 'repo4') | 1011 expect5 = os.path.join(self.root_dir, 'src', 'repo4') |
954 self.parseGclient(['sync', '--deps', 'mac', '--jobs', '8'], | 1012 self.parseGclient( |
955 ['running', 'running', 'running', | 1013 ['sync', '--deps', 'mac', '--jobs', '8'], |
956 ('running', expect4), | 1014 ['running', |
957 ('running', expect5)], | 1015 # Git checkout. |
958 untangle=True) | 1016 ('running', self.root_dir + '/src/repo2/repo_renamed'), |
1017 'running', 'running', | |
1018 ('running', expect4), | |
1019 ('running', expect5)], | |
1020 untangle=True) | |
959 tree = self.mangle_git_tree(('repo_1@2', 'src'), | 1021 tree = self.mangle_git_tree(('repo_1@2', 'src'), |
960 ('repo_2@1', 'src/repo2'), | 1022 ('repo_2@1', 'src/repo2'), |
961 ('repo_3@1', 'src/repo2/repo3'), | 1023 ('repo_3@1', 'src/repo2/repo3'), |
962 ('repo_3@2', 'src/repo2/repo_renamed'), | 1024 ('repo_3@2', 'src/repo2/repo_renamed'), |
963 ('repo_4@2', 'src/repo4')) | 1025 ('repo_4@2', 'src/repo4')) |
964 tree['src/git_hooked1'] = 'git_hooked1' | 1026 tree['src/git_hooked1'] = 'git_hooked1' |
965 tree['src/git_hooked2'] = 'git_hooked2' | 1027 tree['src/git_hooked2'] = 'git_hooked2' |
966 self.assertTree(tree) | 1028 self.assertTree(tree) |
967 | 1029 |
968 def testRevertAndStatus(self): | 1030 def testRevertAndStatus(self): |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1067 def testMultiSolutions(self): | 1129 def testMultiSolutions(self): |
1068 if not self.enabled: | 1130 if not self.enabled: |
1069 return | 1131 return |
1070 self.gclient(['config', '--spec', | 1132 self.gclient(['config', '--spec', |
1071 'solutions=[' | 1133 'solutions=[' |
1072 '{"name": "src",' | 1134 '{"name": "src",' |
1073 ' "url": "' + self.svn_base + 'trunk/src/"},' | 1135 ' "url": "' + self.svn_base + 'trunk/src/"},' |
1074 '{"name": "src-git",' | 1136 '{"name": "src-git",' |
1075 '"url": "' + self.git_base + 'repo_1"}]']) | 1137 '"url": "' + self.git_base + 'repo_1"}]']) |
1076 self.parseGclient(['sync', '--deps', 'mac', '--jobs', '1'], | 1138 self.parseGclient(['sync', '--deps', 'mac', '--jobs', '1'], |
1077 ['running', 'running', 'running', | 1139 ['running', 'running', |
1140 # Git checkout. | |
1141 ('running', self.root_dir + '/src-git'), | |
1142 'running', | |
1078 # This is due to the way svn update is called for a single | 1143 # This is due to the way svn update is called for a single |
1079 # file when File() is used in a DEPS file. | 1144 # file when File() is used in a DEPS file. |
1080 ('running', self.root_dir + '/src/file/other'), | 1145 ('running', self.root_dir + '/src/file/other'), |
1081 'running', 'running', 'running', 'running', 'running', 'running', | 1146 'running', 'running', 'running', 'running', |
1147 # Git checkout. | |
1148 ('running', self.root_dir + '/src/repo2'), | |
1149 'running', | |
1150 # Git checkout. | |
1151 ('running', self.root_dir + '/src/repo2/repo_renamed'), | |
1152 'running', | |
1082 'running', 'running']) | 1153 'running', 'running']) |
1083 tree = self.mangle_git_tree(('repo_1@2', 'src-git'), | 1154 tree = self.mangle_git_tree(('repo_1@2', 'src-git'), |
1084 ('repo_2@1', 'src/repo2'), | 1155 ('repo_2@1', 'src/repo2'), |
1085 ('repo_3@2', 'src/repo2/repo_renamed')) | 1156 ('repo_3@2', 'src/repo2/repo_renamed')) |
1086 tree.update(self.mangle_svn_tree( | 1157 tree.update(self.mangle_svn_tree( |
1087 ('trunk/src@2', 'src'), | 1158 ('trunk/src@2', 'src'), |
1088 ('trunk/third_party/foo@1', 'src/third_party/foo'), | 1159 ('trunk/third_party/foo@1', 'src/third_party/foo'), |
1089 ('trunk/other@2', 'src/other'))) | 1160 ('trunk/other@2', 'src/other'))) |
1090 tree['src/file/other/DEPS'] = ( | 1161 tree['src/file/other/DEPS'] = ( |
1091 self.FAKE_REPOS.svn_revs[2]['trunk/other/DEPS']) | 1162 self.FAKE_REPOS.svn_revs[2]['trunk/other/DEPS']) |
(...skipping 11 matching lines...) Expand all Loading... | |
1103 ' "url": "' + self.svn_base + 'trunk/src/"},' | 1174 ' "url": "' + self.svn_base + 'trunk/src/"},' |
1104 '{"name": "src-git",' | 1175 '{"name": "src-git",' |
1105 '"url": "' + self.git_base + 'repo_1"}]']) | 1176 '"url": "' + self.git_base + 'repo_1"}]']) |
1106 # There is no guarantee that the ordering will be consistent. | 1177 # There is no guarantee that the ordering will be consistent. |
1107 (stdout, stderr, returncode) = self.gclient( | 1178 (stdout, stderr, returncode) = self.gclient( |
1108 ['sync', '--deps', 'mac', '--jobs', '8']) | 1179 ['sync', '--deps', 'mac', '--jobs', '8']) |
1109 stdout = self.untangle(stdout) | 1180 stdout = self.untangle(stdout) |
1110 self.checkString('', stderr) | 1181 self.checkString('', stderr) |
1111 self.assertEquals(0, returncode) | 1182 self.assertEquals(0, returncode) |
1112 results = self.splitBlock(stdout) | 1183 results = self.splitBlock(stdout) |
1113 self.assertEquals(12, len(results)) | 1184 self.assertEquals(15, len(results)) |
1114 tree = self.mangle_git_tree(('repo_1@2', 'src-git'), | 1185 tree = self.mangle_git_tree(('repo_1@2', 'src-git'), |
1115 ('repo_2@1', 'src/repo2'), | 1186 ('repo_2@1', 'src/repo2'), |
1116 ('repo_3@2', 'src/repo2/repo_renamed')) | 1187 ('repo_3@2', 'src/repo2/repo_renamed')) |
1117 tree.update(self.mangle_svn_tree( | 1188 tree.update(self.mangle_svn_tree( |
1118 ('trunk/src@2', 'src'), | 1189 ('trunk/src@2', 'src'), |
1119 ('trunk/third_party/foo@1', 'src/third_party/foo'), | 1190 ('trunk/third_party/foo@1', 'src/third_party/foo'), |
1120 ('trunk/other@2', 'src/other'))) | 1191 ('trunk/other@2', 'src/other'))) |
1121 tree['src/file/other/DEPS'] = ( | 1192 tree['src/file/other/DEPS'] = ( |
1122 self.FAKE_REPOS.svn_revs[2]['trunk/other/DEPS']) | 1193 self.FAKE_REPOS.svn_revs[2]['trunk/other/DEPS']) |
1123 tree['src/git_hooked1'] = 'git_hooked1' | 1194 tree['src/git_hooked1'] = 'git_hooked1' |
1124 tree['src/git_hooked2'] = 'git_hooked2' | 1195 tree['src/git_hooked2'] = 'git_hooked2' |
1125 tree['src/svn_hooked1'] = 'svn_hooked1' | 1196 tree['src/svn_hooked1'] = 'svn_hooked1' |
1126 self.assertTree(tree) | 1197 self.assertTree(tree) |
1127 | 1198 |
1128 def testMultiSolutionsMultiRev(self): | 1199 def testMultiSolutionsMultiRev(self): |
1129 if not self.enabled: | 1200 if not self.enabled: |
1130 return | 1201 return |
1131 self.gclient(['config', '--spec', | 1202 self.gclient(['config', '--spec', |
1132 'solutions=[' | 1203 'solutions=[' |
1133 '{"name": "src",' | 1204 '{"name": "src",' |
1134 ' "url": "' + self.svn_base + 'trunk/src/"},' | 1205 ' "url": "' + self.svn_base + 'trunk/src/"},' |
1135 '{"name": "src-git",' | 1206 '{"name": "src-git",' |
1136 '"url": "' + self.git_base + 'repo_1"}]']) | 1207 '"url": "' + self.git_base + 'repo_1"}]']) |
1137 self.parseGclient( | 1208 self.parseGclient( |
1138 ['sync', '--deps', 'mac', '--jobs', '1', '--revision', '1', | 1209 ['sync', '--deps', 'mac', '--jobs', '1', '--revision', '1', |
1139 '-r', 'src-git@' + self.githash('repo_1', 1)], | 1210 '-r', 'src-git@' + self.githash('repo_1', 1)], |
1140 ['running', 'running', 'running', 'running', | 1211 ['running', 'running', |
1141 'running', 'running', 'running', 'running'], | 1212 # Git checkout. |
1213 ('running', self.root_dir + '/src-git'), | |
1214 'running', 'running', | |
1215 'running', 'running', | |
1216 # Git checkout. | |
1217 ('running', self.root_dir + '/src/repo2'), | |
1218 'running', | |
1219 # Git checkout. | |
1220 ('running', self.root_dir + '/src/repo2/repo3'), | |
1221 'running', | |
1222 # Git checkout. | |
1223 ('running', self.root_dir + '/src/repo4'),], | |
1142 expected_stderr= | 1224 expected_stderr= |
1143 'You must specify the full solution name like --revision src@1\n' | 1225 'You must specify the full solution name like --revision src@1\n' |
1144 'when you have multiple solutions setup in your .gclient file.\n' | 1226 'when you have multiple solutions setup in your .gclient file.\n' |
1145 'Other solutions present are: src-git.\n') | 1227 'Other solutions present are: src-git.\n') |
1146 tree = self.mangle_git_tree(('repo_1@1', 'src-git'), | 1228 tree = self.mangle_git_tree(('repo_1@1', 'src-git'), |
1147 ('repo_2@2', 'src/repo2'), | 1229 ('repo_2@2', 'src/repo2'), |
1148 ('repo_3@1', 'src/repo2/repo3'), | 1230 ('repo_3@1', 'src/repo2/repo3'), |
1149 ('repo_4@2', 'src/repo4')) | 1231 ('repo_4@2', 'src/repo4')) |
1150 tree.update(self.mangle_svn_tree( | 1232 tree.update(self.mangle_svn_tree( |
1151 ('trunk/src@1', 'src'), | 1233 ('trunk/src@1', 'src'), |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1325 | 1407 |
1326 if '-c' in sys.argv: | 1408 if '-c' in sys.argv: |
1327 COVERAGE = True | 1409 COVERAGE = True |
1328 sys.argv.remove('-c') | 1410 sys.argv.remove('-c') |
1329 if os.path.exists('.coverage'): | 1411 if os.path.exists('.coverage'): |
1330 os.remove('.coverage') | 1412 os.remove('.coverage') |
1331 os.environ['COVERAGE_FILE'] = os.path.join( | 1413 os.environ['COVERAGE_FILE'] = os.path.join( |
1332 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), | 1414 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), |
1333 '.coverage') | 1415 '.coverage') |
1334 unittest.main() | 1416 unittest.main() |
OLD | NEW |