| OLD | NEW |
| 1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 | 868 |
| 869 def test_missing_baselines(self): | 869 def test_missing_baselines(self): |
| 870 self.command.execute(MockOptions(suffixes='png,txt', missing=True, platf
orm=None), ['passes/text.html'], self.tool) | 870 self.command.execute(MockOptions(suffixes='png,txt', missing=True, platf
orm=None), ['passes/text.html'], self.tool) |
| 871 self.assertEqual(self.lines, | 871 self.assertEqual(self.lines, |
| 872 ['passes/text-expected.png: (no baselines found)', | 872 ['passes/text-expected.png: (no baselines found)', |
| 873 'passes/text-expected.txt:', | 873 'passes/text-expected.txt:', |
| 874 ' (generic): 123456']) | 874 ' (generic): 123456']) |
| 875 | 875 |
| 876 | 876 |
| 877 class TestAutoRebaseline(_BaseTestCase): | 877 class TestAutoRebaseline(_BaseTestCase): |
| 878 SVN_REMOTE_CMD = ['git', 'config', '--local', '--get-regexp', '^svn-remote\\
.'] |
| 878 command_constructor = AutoRebaseline | 879 command_constructor = AutoRebaseline |
| 879 | 880 |
| 880 def _write_test_file(self, port, path, contents): | 881 def _write_test_file(self, port, path, contents): |
| 881 abs_path = self.tool.filesystem.join(port.layout_tests_dir(), path) | 882 abs_path = self.tool.filesystem.join(port.layout_tests_dir(), path) |
| 882 self.tool.filesystem.write_text_file(abs_path, contents) | 883 self.tool.filesystem.write_text_file(abs_path, contents) |
| 883 | 884 |
| 884 def _setup_test_port(self): | 885 def _setup_test_port(self): |
| 885 test_port = self.tool.port_factory.get('test') | 886 test_port = self.tool.port_factory.get('test') |
| 886 original_get = self.tool.port_factory.get | 887 original_get = self.tool.port_factory.get |
| 887 | 888 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 TBR=foo@chromium.org | 976 TBR=foo@chromium.org |
| 976 """) | 977 """) |
| 977 | 978 |
| 978 def test_no_needs_rebaseline_lines(self): | 979 def test_no_needs_rebaseline_lines(self): |
| 979 def blame(path): | 980 def blame(path): |
| 980 return """ | 981 return """ |
| 981 6469e754a1 path/to/TestExpectations (foobarbaz1@chromium.org 2
013-06-14 20:18:46 +0000 11) crbug.com/24182 [ Debug ] path/to/norebaseline.ht
ml [ ImageOnlyFailure ] | 982 6469e754a1 path/to/TestExpectations (foobarbaz1@chromium.org 2
013-06-14 20:18:46 +0000 11) crbug.com/24182 [ Debug ] path/to/norebaseline.ht
ml [ ImageOnlyFailure ] |
| 982 """ | 983 """ |
| 983 self.tool.scm().blame = blame | 984 self.tool.scm().blame = blame |
| 984 | 985 |
| 985 self.command.execute(MockOptions(optimize=True, verbose=False, move_over
written_baselines=False, results_directory=False), [], self.tool) | 986 self.command.execute(MockOptions(optimize=True, verbose=False, results_d
irectory=False), [], self.tool) |
| 986 self.assertEqual(self.tool.executive.calls, []) | 987 self.assertEqual(self.tool.executive.calls, []) |
| 987 | 988 |
| 988 def test_execute(self): | 989 def test_execute(self): |
| 989 def blame(path): | 990 def blame(path): |
| 990 return """ | 991 return """ |
| 991 6469e754a1 path/to/TestExpectations (foobarbaz1@chromium.org 2
013-06-14 20:18:46 +0000 11) # Test NeedsRebaseline being in a comment doesn't
bork parsing. | 992 6469e754a1 path/to/TestExpectations (foobarbaz1@chromium.org 2
013-06-14 20:18:46 +0000 11) # Test NeedsRebaseline being in a comment doesn't
bork parsing. |
| 992 6469e754a1 path/to/TestExpectations (foobarbaz1@chromium.org 2
013-06-14 20:18:46 +0000 11) crbug.com/24182 [ Debug ] path/to/norebaseline.ht
ml [ ImageOnlyFailure ] | 993 6469e754a1 path/to/TestExpectations (foobarbaz1@chromium.org 2
013-06-14 20:18:46 +0000 11) crbug.com/24182 [ Debug ] path/to/norebaseline.ht
ml [ ImageOnlyFailure ] |
| 993 6469e754a1 path/to/TestExpectations (foobarbaz1@chromium.org 2
013-04-28 04:52:41 +0000 13) Bug(foo) fast/dom/prototype-taco.html [ NeedsReba
seline ] | 994 6469e754a1 path/to/TestExpectations (foobarbaz1@chromium.org 2
013-04-28 04:52:41 +0000 13) Bug(foo) fast/dom/prototype-taco.html [ NeedsReba
seline ] |
| 994 6469e754a1 path/to/TestExpectations (foobarbaz1@chromium.org 2
013-06-14 20:18:46 +0000 11) crbug.com/24182 [ SnowLeopard ] fast/dom/prototyp
e-strawberry.html [ NeedsRebaseline ] | 995 6469e754a1 path/to/TestExpectations (foobarbaz1@chromium.org 2
013-06-14 20:18:46 +0000 11) crbug.com/24182 [ SnowLeopard ] fast/dom/prototyp
e-strawberry.html [ NeedsRebaseline ] |
| 995 6469e754a1 path/to/TestExpectations (foobarbaz1@chromium.org 2
013-04-28 04:52:41 +0000 12) crbug.com/24182 fast/dom/prototype-chocolate.html
[ NeedsRebaseline ] | 996 6469e754a1 path/to/TestExpectations (foobarbaz1@chromium.org 2
013-04-28 04:52:41 +0000 12) crbug.com/24182 fast/dom/prototype-chocolate.html
[ NeedsRebaseline ] |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1037 crbug.com/24182 [ SnowLeopard ] fast/dom/prototype-strawberry.html [ NeedsRebase
line ] | 1038 crbug.com/24182 [ SnowLeopard ] fast/dom/prototype-strawberry.html [ NeedsRebase
line ] |
| 1038 crbug.com/24182 fast/dom/prototype-chocolate.html [ NeedsRebaseline ] | 1039 crbug.com/24182 fast/dom/prototype-chocolate.html [ NeedsRebaseline ] |
| 1039 crbug.com/24182 path/to/not-cycled-through-bots.html [ NeedsRebaseline ] | 1040 crbug.com/24182 path/to/not-cycled-through-bots.html [ NeedsRebaseline ] |
| 1040 crbug.com/24182 path/to/locally-changed-lined.html [ NeedsRebaseline ] | 1041 crbug.com/24182 path/to/locally-changed-lined.html [ NeedsRebaseline ] |
| 1041 """) | 1042 """) |
| 1042 | 1043 |
| 1043 self._write_test_file(test_port, 'fast/dom/prototype-taco.html', "Dummy
test contents") | 1044 self._write_test_file(test_port, 'fast/dom/prototype-taco.html', "Dummy
test contents") |
| 1044 self._write_test_file(test_port, 'fast/dom/prototype-strawberry.html', "
Dummy test contents") | 1045 self._write_test_file(test_port, 'fast/dom/prototype-strawberry.html', "
Dummy test contents") |
| 1045 self._write_test_file(test_port, 'fast/dom/prototype-chocolate.html', "D
ummy test contents") | 1046 self._write_test_file(test_port, 'fast/dom/prototype-chocolate.html', "D
ummy test contents") |
| 1046 | 1047 |
| 1047 self.tool.executive = MockLineRemovingExecutive() | 1048 self.tool.executive = MockLineRemovingExecutive( |
| 1049 should_return_zero_when_run=set(self.SVN_REMOTE_CMD)) |
| 1048 | 1050 |
| 1049 old_exact_matches = builders._exact_matches | 1051 old_exact_matches = builders._exact_matches |
| 1050 try: | 1052 try: |
| 1051 builders._exact_matches = { | 1053 builders._exact_matches = { |
| 1052 "MOCK Leopard": {"port_name": "test-mac-leopard", "specifiers":
set(["mock-specifier"])}, | 1054 "MOCK Leopard": {"port_name": "test-mac-leopard", "specifiers":
set(["mock-specifier"])}, |
| 1053 "MOCK SnowLeopard": {"port_name": "test-mac-snowleopard", "speci
fiers": set(["mock-specifier"])}, | 1055 "MOCK SnowLeopard": {"port_name": "test-mac-snowleopard", "speci
fiers": set(["mock-specifier"])}, |
| 1054 } | 1056 } |
| 1055 | 1057 |
| 1056 self.command.tree_status = lambda: 'closed' | 1058 self.command.tree_status = lambda: 'closed' |
| 1057 self.command.execute(MockOptions(optimize=True, verbose=False, move_
overwritten_baselines=False, results_directory=False), [], self.tool) | 1059 self.command.execute(MockOptions(optimize=True, verbose=False, resul
ts_directory=False), [], self.tool) |
| 1058 self.assertEqual(self.tool.executive.calls, []) | 1060 self.assertEqual(self.tool.executive.calls, []) |
| 1059 | 1061 |
| 1060 self.command.tree_status = lambda: 'open' | 1062 self.command.tree_status = lambda: 'open' |
| 1061 self.tool.executive.calls = [] | 1063 self.tool.executive.calls = [] |
| 1062 self.command.execute(MockOptions(optimize=True, verbose=False, move_
overwritten_baselines=False, results_directory=False), [], self.tool) | 1064 self.command.execute(MockOptions(optimize=True, verbose=False, resul
ts_directory=False), [], self.tool) |
| 1063 | 1065 |
| 1064 self.assertEqual(self.tool.executive.calls, [ | 1066 self.assertEqual(self.tool.executive.calls, [ |
| 1067 self.SVN_REMOTE_CMD, |
| 1068 ['git', 'rev-parse', '--symbolic-full-name', 'HEAD'], |
| 1065 [ | 1069 [ |
| 1066 ['python', 'echo', 'copy-existing-baselines-internal', '--su
ffixes', 'txt,png', '--builder', 'MOCK Leopard', '--test', 'fast/dom/prototype-c
hocolate.html'], | 1070 ['python', 'echo', 'copy-existing-baselines-internal', '--su
ffixes', 'txt,png', '--builder', 'MOCK Leopard', '--test', 'fast/dom/prototype-c
hocolate.html'], |
| 1067 ['python', 'echo', 'copy-existing-baselines-internal', '--su
ffixes', 'png', '--builder', 'MOCK SnowLeopard', '--test', 'fast/dom/prototype-s
trawberry.html'], | 1071 ['python', 'echo', 'copy-existing-baselines-internal', '--su
ffixes', 'png', '--builder', 'MOCK SnowLeopard', '--test', 'fast/dom/prototype-s
trawberry.html'], |
| 1068 ['python', 'echo', 'copy-existing-baselines-internal', '--su
ffixes', 'txt', '--builder', 'MOCK Leopard', '--test', 'fast/dom/prototype-taco.
html'], | 1072 ['python', 'echo', 'copy-existing-baselines-internal', '--su
ffixes', 'txt', '--builder', 'MOCK Leopard', '--test', 'fast/dom/prototype-taco.
html'], |
| 1069 ['python', 'echo', 'copy-existing-baselines-internal', '--su
ffixes', 'txt', '--builder', 'MOCK SnowLeopard', '--test', 'fast/dom/prototype-t
aco.html'], | 1073 ['python', 'echo', 'copy-existing-baselines-internal', '--su
ffixes', 'txt', '--builder', 'MOCK SnowLeopard', '--test', 'fast/dom/prototype-t
aco.html'], |
| 1070 ], | 1074 ], |
| 1071 [ | 1075 [ |
| 1072 ['python', 'echo', 'rebaseline-test-internal', '--suffixes',
'txt,png', '--builder', 'MOCK Leopard', '--test', 'fast/dom/prototype-chocolate
.html'], | 1076 ['python', 'echo', 'rebaseline-test-internal', '--suffixes',
'txt,png', '--builder', 'MOCK Leopard', '--test', 'fast/dom/prototype-chocolate
.html'], |
| 1073 ['python', 'echo', 'rebaseline-test-internal', '--suffixes',
'png', '--builder', 'MOCK SnowLeopard', '--test', 'fast/dom/prototype-strawberr
y.html'], | 1077 ['python', 'echo', 'rebaseline-test-internal', '--suffixes',
'png', '--builder', 'MOCK SnowLeopard', '--test', 'fast/dom/prototype-strawberr
y.html'], |
| 1074 ['python', 'echo', 'rebaseline-test-internal', '--suffixes',
'txt', '--builder', 'MOCK Leopard', '--test', 'fast/dom/prototype-taco.html'], | 1078 ['python', 'echo', 'rebaseline-test-internal', '--suffixes',
'txt', '--builder', 'MOCK Leopard', '--test', 'fast/dom/prototype-taco.html'], |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 self._write_test_file(test_port, 'fast/dom/prototype-taco.html', "Dummy
test contents") | 1138 self._write_test_file(test_port, 'fast/dom/prototype-taco.html', "Dummy
test contents") |
| 1135 | 1139 |
| 1136 old_exact_matches = builders._exact_matches | 1140 old_exact_matches = builders._exact_matches |
| 1137 try: | 1141 try: |
| 1138 builders._exact_matches = { | 1142 builders._exact_matches = { |
| 1139 "MOCK SnowLeopard": {"port_name": "test-mac-snowleopard", "speci
fiers": set(["mock-specifier"])}, | 1143 "MOCK SnowLeopard": {"port_name": "test-mac-snowleopard", "speci
fiers": set(["mock-specifier"])}, |
| 1140 } | 1144 } |
| 1141 | 1145 |
| 1142 self.command.SECONDS_BEFORE_GIVING_UP = 0 | 1146 self.command.SECONDS_BEFORE_GIVING_UP = 0 |
| 1143 self.command.tree_status = lambda: 'open' | 1147 self.command.tree_status = lambda: 'open' |
| 1148 self.tool.executive = MockExecutive( |
| 1149 should_return_zero_when_run=set(self.SVN_REMOTE_CMD)) |
| 1144 self.tool.executive.calls = [] | 1150 self.tool.executive.calls = [] |
| 1145 self.command.execute(MockOptions(optimize=True, verbose=False, move_
overwritten_baselines=False, results_directory=False), [], self.tool) | 1151 self.command.execute(MockOptions(optimize=True, verbose=False, resul
ts_directory=False), [], self.tool) |
| 1146 | 1152 |
| 1147 self.assertEqual(self.tool.executive.calls, [ | 1153 self.assertEqual(self.tool.executive.calls, [ |
| 1154 self.SVN_REMOTE_CMD, |
| 1155 ['git', 'rev-parse', '--symbolic-full-name', 'HEAD'], |
| 1148 [ | 1156 [ |
| 1149 ['python', 'echo', 'copy-existing-baselines-internal', '--su
ffixes', 'txt', '--builder', 'MOCK SnowLeopard', '--test', 'fast/dom/prototype-t
aco.html'], | 1157 ['python', 'echo', 'copy-existing-baselines-internal', '--su
ffixes', 'txt', '--builder', 'MOCK SnowLeopard', '--test', 'fast/dom/prototype-t
aco.html'], |
| 1150 ], | 1158 ], |
| 1151 [ | 1159 [ |
| 1152 ['python', 'echo', 'rebaseline-test-internal', '--suffixes',
'txt', '--builder', 'MOCK SnowLeopard', '--test', 'fast/dom/prototype-taco.html
'], | 1160 ['python', 'echo', 'rebaseline-test-internal', '--suffixes',
'txt', '--builder', 'MOCK SnowLeopard', '--test', 'fast/dom/prototype-taco.html
'], |
| 1153 ], | 1161 ], |
| 1154 [['python', 'echo', 'optimize-baselines', '--no-modify-scm', '--
suffixes', 'txt', 'fast/dom/prototype-taco.html']], | 1162 [['python', 'echo', 'optimize-baselines', '--no-modify-scm', '--
suffixes', 'txt', 'fast/dom/prototype-taco.html']], |
| 1155 ['git', 'cl', 'upload', '-f'], | 1163 ['git', 'cl', 'upload', '-f'], |
| 1156 ]) | 1164 ]) |
| 1157 finally: | 1165 finally: |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1185 return self.command._builder_data | 1193 return self.command._builder_data |
| 1186 | 1194 |
| 1187 self.command.builder_data = builder_data | 1195 self.command.builder_data = builder_data |
| 1188 | 1196 |
| 1189 self.tool.filesystem.write_text_file(test_port.path_to_generic_test_expe
ctations_file(), """ | 1197 self.tool.filesystem.write_text_file(test_port.path_to_generic_test_expe
ctations_file(), """ |
| 1190 Bug(foo) fast/dom/prototype-taco.html [ NeedsRebaseline ] | 1198 Bug(foo) fast/dom/prototype-taco.html [ NeedsRebaseline ] |
| 1191 """) | 1199 """) |
| 1192 | 1200 |
| 1193 self._write_test_file(test_port, 'fast/dom/prototype-taco.html', "Dummy
test contents") | 1201 self._write_test_file(test_port, 'fast/dom/prototype-taco.html', "Dummy
test contents") |
| 1194 | 1202 |
| 1195 self.tool.executive = MockLineRemovingExecutive() | 1203 self.tool.executive = MockLineRemovingExecutive( |
| 1204 should_return_zero_when_run=set(self.SVN_REMOTE_CMD)) |
| 1196 | 1205 |
| 1197 old_exact_matches = builders._exact_matches | 1206 old_exact_matches = builders._exact_matches |
| 1198 try: | 1207 try: |
| 1199 builders._exact_matches = { | 1208 builders._exact_matches = { |
| 1200 "MOCK Leopard": {"port_name": "test-mac-leopard", "specifiers":
set(["mock-specifier"])}, | 1209 "MOCK Leopard": {"port_name": "test-mac-leopard", "specifiers":
set(["mock-specifier"])}, |
| 1201 "MOCK SnowLeopard": {"port_name": "test-mac-snowleopard", "speci
fiers": set(["mock-specifier"])}, | 1210 "MOCK SnowLeopard": {"port_name": "test-mac-snowleopard", "speci
fiers": set(["mock-specifier"])}, |
| 1202 } | 1211 } |
| 1203 | 1212 |
| 1204 self.command.tree_status = lambda: 'open' | 1213 self.command.tree_status = lambda: 'open' |
| 1205 self.command.execute(MockOptions(optimize=True, verbose=False, move_
overwritten_baselines=False, results_directory=False), [], self.tool) | 1214 self.command.execute(MockOptions(optimize=True, verbose=False, resul
ts_directory=False), [], self.tool) |
| 1206 self.assertEqual(self.tool.executive.calls, [ | 1215 self.assertEqual(self.tool.executive.calls, [ |
| 1216 self.SVN_REMOTE_CMD, |
| 1217 ['git', 'rev-parse', '--symbolic-full-name', 'HEAD'], |
| 1207 [['python', 'echo', 'optimize-baselines', '--no-modify-scm', '--
suffixes', '', 'fast/dom/prototype-taco.html']], | 1218 [['python', 'echo', 'optimize-baselines', '--no-modify-scm', '--
suffixes', '', 'fast/dom/prototype-taco.html']], |
| 1208 ['git', 'cl', 'upload', '-f'], | 1219 ['git', 'cl', 'upload', '-f'], |
| 1209 ['git', 'pull'], | 1220 ['git', 'pull'], |
| 1210 ['git', 'cl', 'dcommit', '-f'], | 1221 ['git', 'cl', 'dcommit', '-f'], |
| 1211 ['git', 'cl', 'set_close'], | 1222 ['git', 'cl', 'set_close'], |
| 1212 ]) | 1223 ]) |
| 1213 | 1224 |
| 1214 # The mac ports should both be removed since they're the only ones i
n builders._exact_matches. | 1225 # The mac ports should both be removed since they're the only ones i
n builders._exact_matches. |
| 1215 self.assertEqual(self.tool.filesystem.read_text_file(test_port.path_
to_generic_test_expectations_file()), """ | 1226 self.assertEqual(self.tool.filesystem.read_text_file(test_port.path_
to_generic_test_expectations_file()), """ |
| 1216 Bug(foo) [ Linux Win ] fast/dom/prototype-taco.html [ NeedsRebaseline ] | 1227 Bug(foo) [ Linux Win ] fast/dom/prototype-taco.html [ NeedsRebaseline ] |
| 1217 """) | 1228 """) |
| 1218 finally: | 1229 finally: |
| 1219 builders._exact_matches = old_exact_matches | 1230 builders._exact_matches = old_exact_matches |
| 1220 | 1231 |
| 1232 def test_execute_setup_git_svn(self): |
| 1233 def blame(path): |
| 1234 return """ |
| 1235 6469e754a1 path/to/TestExpectations (foobarbaz1@chromium.org 2
013-04-28 04:52:41 +0000 13) Bug(foo) fast/dom/prototype-taco.html [ NeedsReba
seline ] |
| 1236 """ |
| 1237 self.tool.scm().blame = blame |
| 1238 |
| 1239 test_port = self._setup_test_port() |
| 1240 |
| 1241 old_builder_data = self.command.builder_data |
| 1242 |
| 1243 def builder_data(): |
| 1244 self.command._builder_data['MOCK Win'] = LayoutTestResults.results_f
rom_string("""ADD_RESULTS({ |
| 1245 "tests": { |
| 1246 "fast": { |
| 1247 "dom": { |
| 1248 "prototype-taco.html": { |
| 1249 "expected": "FAIL", |
| 1250 "actual": "PASS", |
| 1251 "is_unexpected": true |
| 1252 } |
| 1253 } |
| 1254 } |
| 1255 } |
| 1256 });""") |
| 1257 return self.command._builder_data |
| 1258 |
| 1259 self.command.builder_data = builder_data |
| 1260 |
| 1261 self.tool.filesystem.write_text_file(test_port.path_to_generic_test_expe
ctations_file(), """ |
| 1262 Bug(foo) fast/dom/prototype-taco.html [ NeedsRebaseline ] |
| 1263 """) |
| 1264 |
| 1265 self._write_test_file(test_port, 'fast/dom/prototype-taco.html', "Dummy
test contents") |
| 1266 |
| 1267 self.tool.executive = MockLineRemovingExecutive() |
| 1268 |
| 1269 old_exact_matches = builders._exact_matches |
| 1270 try: |
| 1271 builders._exact_matches = { |
| 1272 "MOCK Win": {"port_name": "test-win-win7", "specifiers": set(["m
ock-specifier"])}, |
| 1273 } |
| 1274 |
| 1275 self.command.tree_status = lambda: 'open' |
| 1276 self.command.execute(MockOptions(optimize=True, verbose=False, resul
ts_directory=False), [], self.tool) |
| 1277 self.assertEqual(self.tool.executive.calls, [ |
| 1278 self.SVN_REMOTE_CMD, |
| 1279 ['git', 'auto-svn'], |
| 1280 ['git', 'rev-parse', '--symbolic-full-name', 'HEAD'], |
| 1281 [['python', 'echo', 'optimize-baselines', '--no-modify-scm', '--
suffixes', '', 'fast/dom/prototype-taco.html']], |
| 1282 ['git', 'cl', 'upload', '-f'], |
| 1283 ['git', 'pull'], |
| 1284 ['git', 'cl', 'dcommit', '-f'], |
| 1285 ['git', 'cl', 'set_close'], |
| 1286 ]) |
| 1287 |
| 1288 self.assertEqual(self.tool.filesystem.read_text_file(test_port.path_
to_generic_test_expectations_file()), """ |
| 1289 Bug(foo) [ Linux Mac XP ] fast/dom/prototype-taco.html [ NeedsRebaseline ] |
| 1290 """) |
| 1291 finally: |
| 1292 builders._exact_matches = old_exact_matches |
| 1293 |
| 1221 | 1294 |
| 1222 class TestRebaselineOMatic(_BaseTestCase): | 1295 class TestRebaselineOMatic(_BaseTestCase): |
| 1223 command_constructor = RebaselineOMatic | 1296 command_constructor = RebaselineOMatic |
| 1224 | 1297 |
| 1225 def setUp(self): | 1298 def setUp(self): |
| 1226 super(TestRebaselineOMatic, self).setUp() | 1299 super(TestRebaselineOMatic, self).setUp() |
| 1227 self._logs = [] | 1300 self._logs = [] |
| 1228 | 1301 |
| 1229 def _mock_log_to_server(self, log=''): | 1302 def _mock_log_to_server(self, log=''): |
| 1230 self._logs.append(log) | 1303 self._logs.append(log) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1260 oc.capture_output() | 1333 oc.capture_output() |
| 1261 self.command._do_one_rebaseline() | 1334 self.command._do_one_rebaseline() |
| 1262 out, _, _ = oc.restore_output() | 1335 out, _, _ = oc.restore_output() |
| 1263 | 1336 |
| 1264 self.assertEqual(out, 'MOCK STDOUT\n') | 1337 self.assertEqual(out, 'MOCK STDOUT\n') |
| 1265 self.assertEqual(self.tool.executive.calls, [ | 1338 self.assertEqual(self.tool.executive.calls, [ |
| 1266 ['git', 'pull'], | 1339 ['git', 'pull'], |
| 1267 ['/mock-checkout/third_party/WebKit/Tools/Scripts/webkit-patch', 'au
to-rebaseline', '--verbose'], | 1340 ['/mock-checkout/third_party/WebKit/Tools/Scripts/webkit-patch', 'au
to-rebaseline', '--verbose'], |
| 1268 ]) | 1341 ]) |
| 1269 self.assertEqual(self._logs, ['MOCK STDOUT']) | 1342 self.assertEqual(self._logs, ['MOCK STDOUT']) |
| OLD | NEW |