0c9bad011515aff94aeca9b12adf41a758a72511
[WebKit-https.git] / Tools / Scripts / webkitpy / tool / commands / download_unittest.py
1 # Copyright (C) 2009, 2011 Google Inc. All rights reserved.
2 #
3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are
5 # met:
6 #
7 #    * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer.
9 #    * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer
11 # in the documentation and/or other materials provided with the
12 # distribution.
13 #    * Neither the name of Google Inc. nor the names of its
14 # contributors may be used to endorse or promote products derived from
15 # this software without specific prior written permission.
16 #
17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29 import unittest
30
31 from webkitpy.common.system.outputcapture import OutputCapture
32 from webkitpy.thirdparty.mock import Mock
33 from webkitpy.tool.commands.commandtest import CommandsTest
34 from webkitpy.tool.commands.download import *
35 from webkitpy.tool.mocktool import MockOptions, MockTool
36 from webkitpy.common.checkout.checkout_mock import MockCheckout
37
38
39 class AbstractRolloutPrepCommandTest(unittest.TestCase):
40     def test_commit_info(self):
41         command = AbstractRolloutPrepCommand()
42         tool = MockTool()
43         command.bind_to_tool(tool)
44         output = OutputCapture()
45
46         expected_logs = "Preparing rollout for bug 50000.\n"
47         commit_info = output.assert_outputs(self, command._commit_info, [1234], expected_logs=expected_logs)
48         self.assertTrue(commit_info)
49
50         mock_commit_info = Mock()
51         mock_commit_info.bug_id = lambda: None
52         tool._checkout.commit_info_for_revision = lambda revision: mock_commit_info
53         expected_logs = "Unable to parse bug number from diff.\n"
54         commit_info = output.assert_outputs(self, command._commit_info, [1234], expected_logs=expected_logs)
55         self.assertEqual(commit_info, mock_commit_info)
56
57     def test_prepare_state(self):
58         command = AbstractRolloutPrepCommand()
59         mock_commit_info = MockCheckout().commit_info_for_revision(123)
60         command._commit_info = lambda revision: mock_commit_info
61
62         state = command._prepare_state(None, ["124 123 125", "Reason"], None)
63         self.assertEqual(123, state["revision"])
64         self.assertEqual([123, 124, 125], state["revision_list"])
65
66         self.assertRaises(ScriptError, command._prepare_state, options=None, args=["125 r122  123", "Reason"], tool=None)
67         self.assertRaises(ScriptError, command._prepare_state, options=None, args=["125 foo 123", "Reason"], tool=None)
68
69         command._commit_info = lambda revision: None
70         state = command._prepare_state(None, ["124 123 125", "Reason"], None)
71         self.assertEqual(123, state["revision"])
72         self.assertEqual([123, 124, 125], state["revision_list"])
73
74
75 class DownloadCommandsTest(CommandsTest):
76     def _default_options(self):
77         options = MockOptions()
78         options.build = True
79         options.build_style = "release"
80         options.check_style = True
81         options.check_style_filter = None
82         options.clean = True
83         options.close_bug = True
84         options.force_clean = False
85         options.non_interactive = False
86         options.parent_command = 'MOCK parent command'
87         options.quiet = False
88         options.test = True
89         options.update = True
90         options.architecture = 'MOCK ARCH'
91         options.iterate_on_new_tests = 0
92         options.group = None
93         options.sort_xcode_project = False
94         return options
95
96     def test_build(self):
97         expected_logs = "Updating working directory\nBuilding WebKit\n"
98         self.assert_execute_outputs(Build(), [], options=self._default_options(), expected_logs=expected_logs)
99
100     def test_build_and_test(self):
101         expected_logs = """Updating working directory
102 Building WebKit
103 Running Python unit tests
104 Running Perl unit tests
105 Running JavaScriptCore tests
106 Running bindings generation tests
107 Running run-webkit-tests
108 """
109         self.assert_execute_outputs(BuildAndTest(), [], options=self._default_options(), expected_logs=expected_logs)
110
111     def test_apply_attachment(self):
112         options = self._default_options()
113         options.update = True
114         options.local_commit = True
115         expected_logs = "Updating working directory\nProcessing 1 patch from 1 bug.\nProcessing patch 10000 from bug 50000.\n"
116         self.assert_execute_outputs(ApplyAttachment(), [10000], options=options, expected_logs=expected_logs)
117
118     def test_apply_from_bug(self):
119         options = self._default_options()
120         options.update = True
121         options.local_commit = True
122
123         expected_logs = "Updating working directory\n0 reviewed patches found on bug 50001.\nNo reviewed patches found, looking for unreviewed patches.\n1 patch found on bug 50001.\nProcessing 1 patch from 1 bug.\nProcessing patch 10002 from bug 50001.\n"
124         self.assert_execute_outputs(ApplyFromBug(), [50001], options=options, expected_logs=expected_logs)
125
126         expected_logs = "Updating working directory\n2 reviewed patches found on bug 50000.\nProcessing 2 patches from 1 bug.\nProcessing patch 10000 from bug 50000.\nProcessing patch 10001 from bug 50000.\n"
127         self.assert_execute_outputs(ApplyFromBug(), [50000], options=options, expected_logs=expected_logs)
128
129     def test_apply_watch_list(self):
130         expected_logs = """Processing 1 patch from 1 bug.
131 Updating working directory
132 MOCK run_and_throw_if_fail: ['mock-update-webkit'], cwd=/mock-checkout
133 Processing patch 10000 from bug 50000.
134 MockWatchList: determine_cc_and_messages
135 No bug was updated because no id was given.
136 Result of watchlist: cc "abarth@webkit.org, eric@webkit.org, levin@chromium.org" messages "Message1.
137
138 Message2."
139 """
140         self.assert_execute_outputs(ApplyWatchList(), [10000], options=self._default_options(), expected_logs=expected_logs, tool=MockTool(log_executive=True))
141
142     def test_land(self):
143         expected_logs = """Building WebKit
144 Running Python unit tests
145 Running Perl unit tests
146 Running JavaScriptCore tests
147 Running bindings generation tests
148 Running run-webkit-tests
149 Committed r49824: <http://trac.webkit.org/changeset/49824>
150 Updating bug 50000
151 """
152         mock_tool = MockTool()
153         mock_tool.scm().create_patch = Mock(return_value="Patch1\nMockPatch\n")
154         mock_tool.checkout().modified_changelogs = Mock(return_value=[])
155         self.assert_execute_outputs(Land(), [50000], options=self._default_options(), expected_logs=expected_logs, tool=mock_tool)
156         # Make sure we're not calling expensive calls too often.
157         self.assertEqual(mock_tool.scm().create_patch.call_count, 0)
158         self.assertEqual(mock_tool.checkout().modified_changelogs.call_count, 1)
159
160     def test_land_cowhand(self):
161         expected_logs = """MOCK run_and_throw_if_fail: ['mock-prepare-ChangeLog', '--email=MOCK email', '--merge-base=None', 'MockFile1'], cwd=/mock-checkout
162 MOCK run_and_throw_if_fail: ['mock-check-webkit-style', '--git-commit', 'MOCK git commit', '--diff-files', 'MockFile1', '--filter', '-changelog'], cwd=/mock-checkout
163 MOCK run_command: ['ruby', '-I', '/mock-checkout/Websites/bugs.webkit.org/PrettyPatch', '/mock-checkout/Websites/bugs.webkit.org/PrettyPatch/prettify.rb'], cwd=None, input=Patch1
164 MOCK: user.open_url: file://...
165 Was that diff correct?
166 Building WebKit
167 MOCK run_and_throw_if_fail: ['mock-build-webkit', 'ARCHS=MOCK ARCH'], cwd=/mock-checkout, env={'LC_ALL': 'C', 'TERM': 'none', 'MOCK_ENVIRON_COPY': '1'}
168 Running Python unit tests
169 MOCK run_and_throw_if_fail: ['mock-test-webkitpy'], cwd=/mock-checkout
170 Running Perl unit tests
171 MOCK run_and_throw_if_fail: ['mock-test-webkitperl'], cwd=/mock-checkout
172 Running JavaScriptCore tests
173 MOCK run_and_throw_if_fail: ['mock-run-javacriptcore-tests'], cwd=/mock-checkout
174 Running bindings generation tests
175 MOCK run_and_throw_if_fail: ['mock-run-bindings-tests'], cwd=/mock-checkout
176 Running run-webkit-tests
177 MOCK run_and_throw_if_fail: ['mock-run-webkit-tests', '--quiet'], cwd=/mock-checkout
178 Committed r49824: <http://trac.webkit.org/changeset/49824>
179 Committed r49824: <http://trac.webkit.org/changeset/49824>
180 No bug id provided.
181 """
182         mock_tool = MockTool(log_executive=True)
183         self.assert_execute_outputs(LandCowhand(), [50000], options=self._default_options(), expected_logs=expected_logs, tool=mock_tool)
184
185         expected_logs = "land-cowboy is deprecated, use land-cowhand instead.\n" + expected_logs
186         self.assert_execute_outputs(LandCowboy(), [50000], options=self._default_options(), expected_logs=expected_logs, tool=mock_tool)
187
188     def test_land_red_builders(self):
189         expected_logs = """Building WebKit
190 Running Python unit tests
191 Running Perl unit tests
192 Running JavaScriptCore tests
193 Running bindings generation tests
194 Running run-webkit-tests
195 Committed r49824: <http://trac.webkit.org/changeset/49824>
196 Updating bug 50000
197 """
198         mock_tool = MockTool()
199         mock_tool.buildbot.light_tree_on_fire()
200         self.assert_execute_outputs(Land(), [50000], options=self._default_options(), expected_logs=expected_logs, tool=mock_tool)
201
202     def test_check_style(self):
203         expected_logs = """Processing 1 patch from 1 bug.
204 Updating working directory
205 MOCK run_and_throw_if_fail: ['mock-update-webkit'], cwd=/mock-checkout
206 Processing patch 10000 from bug 50000.
207 MOCK run_and_throw_if_fail: ['mock-check-webkit-style', '--git-commit', 'MOCK git commit', '--diff-files', 'MockFile1'], cwd=/mock-checkout
208 """
209         self.assert_execute_outputs(CheckStyle(), [10000], options=self._default_options(), expected_logs=expected_logs, tool=MockTool(log_executive=True))
210
211     def test_build_attachment(self):
212         expected_logs = "Processing 1 patch from 1 bug.\nUpdating working directory\nProcessing patch 10000 from bug 50000.\nBuilding WebKit\n"
213         self.assert_execute_outputs(BuildAttachment(), [10000], options=self._default_options(), expected_logs=expected_logs)
214
215     def test_land_attachment(self):
216         # FIXME: This expected result is imperfect, notice how it's seeing the same patch as still there after it thought it would have cleared the flags.
217         expected_logs = """Processing 1 patch from 1 bug.
218 Updating working directory
219 Processing patch 10000 from bug 50000.
220 Building WebKit
221 Running Python unit tests
222 Running Perl unit tests
223 Running JavaScriptCore tests
224 Running bindings generation tests
225 Running run-webkit-tests
226 Committed r49824: <http://trac.webkit.org/changeset/49824>
227 Not closing bug 50000 as attachment 10000 has review=+.  Assuming there are more patches to land from this bug.
228 """
229         self.assert_execute_outputs(LandAttachment(), [10000], options=self._default_options(), expected_logs=expected_logs)
230
231     def test_land_from_bug(self):
232         # FIXME: This expected result is imperfect, notice how it's seeing the same patch as still there after it thought it would have cleared the flags.
233         expected_logs = """2 reviewed patches found on bug 50000.
234 Processing 2 patches from 1 bug.
235 Updating working directory
236 Processing patch 10000 from bug 50000.
237 Building WebKit
238 Running Python unit tests
239 Running Perl unit tests
240 Running JavaScriptCore tests
241 Running bindings generation tests
242 Running run-webkit-tests
243 Committed r49824: <http://trac.webkit.org/changeset/49824>
244 Not closing bug 50000 as attachment 10000 has review=+.  Assuming there are more patches to land from this bug.
245 Updating working directory
246 Processing patch 10001 from bug 50000.
247 Building WebKit
248 Running Python unit tests
249 Running Perl unit tests
250 Running JavaScriptCore tests
251 Running bindings generation tests
252 Running run-webkit-tests
253 Committed r49824: <http://trac.webkit.org/changeset/49824>
254 Not closing bug 50000 as attachment 10000 has review=+.  Assuming there are more patches to land from this bug.
255 """
256         self.assert_execute_outputs(LandFromBug(), [50000], options=self._default_options(), expected_logs=expected_logs)
257
258     def test_land_from_url(self):
259         # FIXME: This expected result is imperfect, notice how it's seeing the same patch as still there after it thought it would have cleared the flags.
260         expected_logs = """2 patches found on bug 50000.
261 Processing 2 patches from 1 bug.
262 Updating working directory
263 Processing patch 10000 from bug 50000.
264 Building WebKit
265 Running Python unit tests
266 Running Perl unit tests
267 Running JavaScriptCore tests
268 Running bindings generation tests
269 Running run-webkit-tests
270 Committed r49824: <http://trac.webkit.org/changeset/49824>
271 Not closing bug 50000 as attachment 10000 has review=+.  Assuming there are more patches to land from this bug.
272 Updating working directory
273 Processing patch 10001 from bug 50000.
274 Building WebKit
275 Running Python unit tests
276 Running Perl unit tests
277 Running JavaScriptCore tests
278 Running bindings generation tests
279 Running run-webkit-tests
280 Committed r49824: <http://trac.webkit.org/changeset/49824>
281 Not closing bug 50000 as attachment 10000 has review=+.  Assuming there are more patches to land from this bug.
282 """
283         self.assert_execute_outputs(LandFromURL(), ["https://bugs.webkit.org/show_bug.cgi?id=50000"], options=self._default_options(), expected_logs=expected_logs)
284
285     def test_prepare_rollout(self):
286         expected_logs = "Preparing rollout for bug 50000.\nUpdating working directory\n"
287         self.assert_execute_outputs(PrepareRollout(), [852, "Reason"], options=self._default_options(), expected_logs=expected_logs)
288
289     def test_create_rollout(self):
290         expected_logs = """Preparing rollout for bug 50000.
291 Updating working directory
292 MOCK create_bug
293 bug_title: REGRESSION(r852): Reason
294 bug_description: http://trac.webkit.org/changeset/852 broke the build:
295 Reason
296 component: MOCK component
297 cc: MOCK cc
298 blocked: 50000
299 MOCK add_patch_to_bug: bug_id=60001, description=ROLLOUT of r852, mark_for_review=False, mark_for_commit_queue=True, mark_for_landing=False
300 -- Begin comment --
301 Any committer can land this patch automatically by marking it commit-queue+.  The commit-queue will build and test the patch before landing to ensure that the rollout will be successful.  This process takes approximately 15 minutes.
302
303 If you would like to land the rollout faster, you can use the following command:
304
305   webkit-patch land-attachment ATTACHMENT_ID
306
307 where ATTACHMENT_ID is the ID of this attachment.
308 -- End comment --
309 """
310         self.assert_execute_outputs(CreateRollout(), [852, "Reason"], options=self._default_options(), expected_logs=expected_logs)
311
312     def test_create_rollout_multiple_revision(self):
313         expected_logs = """Preparing rollout for bug 50000.
314 Preparing rollout for bug 50000.
315 Unable to parse bug number from diff.
316 Updating working directory
317 MOCK create_bug
318 bug_title: REGRESSION(r852): Reason
319 bug_description: http://trac.webkit.org/changeset/852 broke the build:
320 Reason
321 component: MOCK component
322 cc: MOCK cc
323 blocked: 50000, 50000
324 MOCK add_patch_to_bug: bug_id=60001, description=ROLLOUT of r852, mark_for_review=False, mark_for_commit_queue=True, mark_for_landing=False
325 -- Begin comment --
326 Any committer can land this patch automatically by marking it commit-queue+.  The commit-queue will build and test the patch before landing to ensure that the rollout will be successful.  This process takes approximately 15 minutes.
327
328 If you would like to land the rollout faster, you can use the following command:
329
330   webkit-patch land-attachment ATTACHMENT_ID
331
332 where ATTACHMENT_ID is the ID of this attachment.
333 -- End comment --
334 """
335         self.assert_execute_outputs(CreateRollout(), ["855 852 854", "Reason"], options=self._default_options(), expected_logs=expected_logs)
336
337     def test_create_rollout_multiple_revision_with_one_resolved(self):
338         expected_logs = """Preparing rollout for bug 50000.
339 Unable to parse bug number from diff.
340 Preparing rollout for bug 50004.
341 Updating working directory
342 MOCK create_bug
343 bug_title: REGRESSION(r852): Reason
344 bug_description: http://trac.webkit.org/changeset/852 broke the build:
345 Reason
346 component: MOCK component
347 cc: MOCK cc
348 blocked: 50000, 50004
349 MOCK reopen_bug 50004 with comment 'Re-opened since this is blocked by bug 60001'
350 MOCK add_patch_to_bug: bug_id=60001, description=ROLLOUT of r852, mark_for_review=False, mark_for_commit_queue=True, mark_for_landing=False
351 -- Begin comment --
352 Any committer can land this patch automatically by marking it commit-queue+.  The commit-queue will build and test the patch before landing to ensure that the rollout will be successful.  This process takes approximately 15 minutes.
353
354 If you would like to land the rollout faster, you can use the following command:
355
356   webkit-patch land-attachment ATTACHMENT_ID
357
358 where ATTACHMENT_ID is the ID of this attachment.
359 -- End comment --
360 """
361         self.assert_execute_outputs(CreateRollout(), ["855 852 3001", "Reason"], options=self._default_options(), expected_logs=expected_logs)
362
363     def test_create_rollout_resolved(self):
364         expected_logs = """Preparing rollout for bug 50004.
365 Updating working directory
366 MOCK create_bug
367 bug_title: REGRESSION(r3001): Reason
368 bug_description: http://trac.webkit.org/changeset/3001 broke the build:
369 Reason
370 component: MOCK component
371 cc: MOCK cc
372 blocked: 50004
373 MOCK reopen_bug 50004 with comment 'Re-opened since this is blocked by bug 60001'
374 MOCK add_patch_to_bug: bug_id=60001, description=ROLLOUT of r3001, mark_for_review=False, mark_for_commit_queue=True, mark_for_landing=False
375 -- Begin comment --
376 Any committer can land this patch automatically by marking it commit-queue+.  The commit-queue will build and test the patch before landing to ensure that the rollout will be successful.  This process takes approximately 15 minutes.
377
378 If you would like to land the rollout faster, you can use the following command:
379
380   webkit-patch land-attachment ATTACHMENT_ID
381
382 where ATTACHMENT_ID is the ID of this attachment.
383 -- End comment --
384 """
385         self.assert_execute_outputs(CreateRollout(), [3001, "Reason"], options=self._default_options(), expected_logs=expected_logs)
386
387     def test_create_rollout_multiple_resolved(self):
388         expected_logs = """Preparing rollout for bug 50005.
389 Preparing rollout for bug 50006.
390 Preparing rollout for bug 50004.
391 Updating working directory
392 MOCK create_bug
393 bug_title: REGRESSION(r963): Reason
394 bug_description: http://trac.webkit.org/changeset/963 broke the build:
395 Reason
396 component: MOCK component
397 cc: MOCK cc
398 blocked: 50005, 50006, 50004
399 MOCK reopen_bug 50005 with comment 'Re-opened since this is blocked by bug 60001'
400 MOCK reopen_bug 50006 with comment 'Re-opened since this is blocked by bug 60001'
401 MOCK reopen_bug 50004 with comment 'Re-opened since this is blocked by bug 60001'
402 MOCK add_patch_to_bug: bug_id=60001, description=ROLLOUT of r963, mark_for_review=False, mark_for_commit_queue=True, mark_for_landing=False
403 -- Begin comment --
404 Any committer can land this patch automatically by marking it commit-queue+.  The commit-queue will build and test the patch before landing to ensure that the rollout will be successful.  This process takes approximately 15 minutes.
405
406 If you would like to land the rollout faster, you can use the following command:
407
408   webkit-patch land-attachment ATTACHMENT_ID
409
410 where ATTACHMENT_ID is the ID of this attachment.
411 -- End comment --
412 """
413         self.assert_execute_outputs(CreateRollout(), ["987 3001 963", "Reason"], options=self._default_options(), expected_logs=expected_logs)
414
415     def test_rollout(self):
416         expected_logs = """Preparing rollout for bug 50000.
417 Updating working directory
418 MOCK: user.open_url: file://...
419 Was that diff correct?
420 Building WebKit
421 Committed r49824: <http://trac.webkit.org/changeset/49824>
422 MOCK reopen_bug 50000 with comment 'Reverted r852 for reason:
423
424 Reason
425
426 Committed r49824: <http://trac.webkit.org/changeset/49824>'
427 """
428         self.assert_execute_outputs(Rollout(), [852, "Reason", "Description"], options=self._default_options(), expected_logs=expected_logs)
429
430     def test_rollout_two_revisions(self):
431         expected_logs = """Preparing rollout for bug 50000.
432 Preparing rollout for bug 50005.
433 Updating working directory
434 MOCK: user.open_url: file://...
435 Was that diff correct?
436 Building WebKit
437 Committed r49824: <http://trac.webkit.org/changeset/49824>
438 MOCK reopen_bug 50000 with comment 'Reverted r852 and r963 for reason:
439
440 Reason
441
442 Committed r49824: <http://trac.webkit.org/changeset/49824>'
443 MOCK reopen_bug 50005 with comment 'Reverted r852 and r963 for reason:
444
445 Reason
446
447 Committed r49824: <http://trac.webkit.org/changeset/49824>'
448 """
449         self.assert_execute_outputs(Rollout(), ["852 963", "Reason", "Description"], options=self._default_options(), expected_logs=expected_logs)
450
451     def test_rollout_multiple_revisions(self):
452         expected_logs = """Preparing rollout for bug 50000.
453 Preparing rollout for bug 50005.
454 Preparing rollout for bug 50004.
455 Updating working directory
456 MOCK: user.open_url: file://...
457 Was that diff correct?
458 Building WebKit
459 Committed r49824: <http://trac.webkit.org/changeset/49824>
460 MOCK reopen_bug 50000 with comment 'Reverted r852, r963, and r3001 for reason:
461
462 Reason
463
464 Committed r49824: <http://trac.webkit.org/changeset/49824>'
465 MOCK reopen_bug 50005 with comment 'Reverted r852, r963, and r3001 for reason:
466
467 Reason
468
469 Committed r49824: <http://trac.webkit.org/changeset/49824>'
470 MOCK reopen_bug 50004 with comment 'Reverted r852, r963, and r3001 for reason:
471
472 Reason
473
474 Committed r49824: <http://trac.webkit.org/changeset/49824>'
475 """
476         self.assert_execute_outputs(Rollout(), ["852 3001 963", "Reason", "Description"], options=self._default_options(), expected_logs=expected_logs)
477
478     def test_rollout_multiple_revisions_with_a_missing_bug_id(self):
479         expected_logs = """Preparing rollout for bug 50000.
480 Preparing rollout for bug 50005.
481 Unable to parse bug number from diff.
482 Updating working directory
483 MOCK: user.open_url: file://...
484 Was that diff correct?
485 Building WebKit
486 Committed r49824: <http://trac.webkit.org/changeset/49824>
487 MOCK reopen_bug 50000 with comment 'Reverted r852, r963, and r999 for reason:
488
489 Reason
490
491 Committed r49824: <http://trac.webkit.org/changeset/49824>'
492 MOCK reopen_bug 50005 with comment 'Reverted r852, r963, and r999 for reason:
493
494 Reason
495
496 Committed r49824: <http://trac.webkit.org/changeset/49824>'
497 """
498         self.assert_execute_outputs(Rollout(), ["852 999 963", "Reason", "Description"], options=self._default_options(), expected_logs=expected_logs)