Changeset 57035 in webkit
- Timestamp:
- Apr 2, 2010 5:14:45 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r57011 r57035 1 2010-04-02 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 commit-queue should ignore builders when landing rollouts 6 https://bugs.webkit.org/show_bug.cgi?id=37051 7 8 When we moved the "builders are red" check into the master process, we 9 forgot about rollouts. I thought we had a test covering this case, but 10 looking at the test, it was a bit too loose. I added a new test and 11 introduced some new logging technology into MockTool to make the test 12 tighter. 13 14 * Scripts/webkitpy/tool/commands/queues.py: 15 * Scripts/webkitpy/tool/commands/queues_unittest.py: 16 * Scripts/webkitpy/tool/mocktool.py: 17 1 18 2010-04-02 David Levin <levin@chromium.org> 2 19 -
trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues.py
r56986 r57035 206 206 def _land(self, patch, first_run=False): 207 207 try: 208 if not self._builders_are_green(): 208 # We need to check the builders, unless we're trying to land a 209 # rollout (in which case the builders are probably red.) 210 if not patch.is_rollout() and not self._builders_are_green(): 209 211 # We return true here because we want to return to the main 210 212 # QueueEngine loop as quickly as possible. … … 232 234 # built and tested. 233 235 args.append("--no-update") 234 if patch.is_rollout():235 # We need to ignore the builders when landing a rollout236 # because they're probably red.237 args.append("--ignore-builders")238 236 self.run_webkit_patch(args) 239 237 self._did_pass(patch) -
trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
r56519 r57035 44 44 class TestReviewQueue(AbstractReviewQueue): 45 45 name = "test-review-queue" 46 47 48 class MockPatch(object): 49 def is_rollout(self): 50 return True 51 52 def bug_id(self): 53 return 12345 54 55 def id(self): 56 return 76543 46 57 47 58 … … 113 124 114 125 def test_rollout(self): 115 tool = MockTool( )126 tool = MockTool(log_executive=True) 116 127 tool.buildbot.light_tree_on_fire() 117 128 expected_stderr = { … … 125 136 self.assert_queue_outputs(CommitQueue(), tool=tool, expected_stderr=expected_stderr) 126 137 138 def test_rollout_lands(self): 139 tool = MockTool(log_executive=True) 140 tool.buildbot.light_tree_on_fire() 141 rollout_patch = MockPatch() 142 expected_stderr = { 143 "begin_work_queue": "CAUTION: commit-queue will discard all local changes in \"%s\"\nRunning WebKit commit-queue.\n" % MockSCM.fake_checkout_root, 144 # FIXME: The commit-queue warns about bad committers twice. This is due to the fact that we access Attachment.reviewer() twice and it logs each time. 145 "next_work_item": """Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com) 146 Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com) 147 1 patch in commit-queue [106] 148 """, 149 "process_work_item": "MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'land-attachment', '--force-clean', '--non-interactive', '--ignore-builders', '--build-style=both', '--quiet', '76543']\n", 150 } 151 self.assert_queue_outputs(CommitQueue(), tool=tool, work_item=rollout_patch, expected_stderr=expected_stderr) 152 127 153 128 154 class StyleQueueTest(QueuesTest): -
trunk/WebKitTools/Scripts/webkitpy/tool/mocktool.py
r56863 r57035 446 446 class MockTool(): 447 447 448 def __init__(self ):448 def __init__(self, log_executive=False): 449 449 self.wakeup_event = threading.Event() 450 450 self.bugs = MockBugzilla() 451 451 self.buildbot = MockBuildBot() 452 452 self.executive = Mock() 453 if log_executive: 454 self.executive.run_and_throw_if_fail = lambda args: log("MOCK run_and_throw_if_fail: %s" % args) 453 455 self._irc = None 454 456 self.user = MockUser()
Note: See TracChangeset
for help on using the changeset viewer.