Changeset 74403 in webkit
- Timestamp:
- Dec 20, 2010 11:48:11 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r74396 r74403 1 2010-12-20 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 commit-queue wrongly rejects patches when it can't update itself 6 https://bugs.webkit.org/show_bug.cgi?id=46636 7 8 * Scripts/webkitpy/tool/bot/commitqueuetask.py: 9 * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py: 10 * Scripts/webkitpy/tool/commands/queues_unittest.py: 11 1 12 2010-12-20 Adam Barth <abarth@webkit.org> 2 13 -
trunk/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
r73682 r74403 88 88 "Unable to clean working directory") 89 89 90 def _update(self): 91 # FIXME: Ideally the status server log message should include which revision we updated to. 92 return self._run_command([ 93 "update", 94 ], 95 "Updated working directory", 96 "Unable to update working directory") 97 90 98 def _apply(self): 91 99 return self._run_command([ 92 100 "apply-attachment", 101 "--no-update", 93 102 "--non-interactive", 94 103 self._patch.id(), … … 187 196 return False 188 197 if not self._clean(): 198 return False 199 if not self._update(): 189 200 return False 190 201 if not self._apply(): -
trunk/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
r73682 r74403 78 78 expected_stderr = """run_webkit_patch: ['clean'] 79 79 command_passed: success_message='Cleaned working directory' patch='197' 80 run_webkit_patch: ['apply-attachment', '--non-interactive', 197] 80 run_webkit_patch: ['update'] 81 command_passed: success_message='Updated working directory' patch='197' 82 run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 197] 81 83 command_passed: success_message='Applied patch' patch='197' 82 84 run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both'] … … 98 100 self._run_through_task(commit_queue, expected_stderr) 99 101 102 def test_update_failure(self): 103 commit_queue = MockCommitQueue([ 104 None, 105 ScriptError("MOCK update failure"), 106 ]) 107 expected_stderr = """run_webkit_patch: ['clean'] 108 command_passed: success_message='Cleaned working directory' patch='197' 109 run_webkit_patch: ['update'] 110 command_failed: failure_message='Unable to update working directory' script_error='MOCK update failure' patch='197' 111 """ 112 self._run_through_task(commit_queue, expected_stderr) 113 100 114 def test_apply_failure(self): 101 115 commit_queue = MockCommitQueue([ 102 116 None, 117 None, 103 118 ScriptError("MOCK apply failure"), 104 119 ]) 105 120 expected_stderr = """run_webkit_patch: ['clean'] 106 121 command_passed: success_message='Cleaned working directory' patch='197' 107 run_webkit_patch: ['apply-attachment', '--non-interactive', 197] 122 run_webkit_patch: ['update'] 123 command_passed: success_message='Updated working directory' patch='197' 124 run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 197] 108 125 command_failed: failure_message='Patch does not apply' script_error='MOCK apply failure' patch='197' 109 126 """ … … 114 131 None, 115 132 None, 133 None, 116 134 ScriptError("MOCK build failure"), 117 135 ]) 118 136 expected_stderr = """run_webkit_patch: ['clean'] 119 137 command_passed: success_message='Cleaned working directory' patch='197' 120 run_webkit_patch: ['apply-attachment', '--non-interactive', 197] 138 run_webkit_patch: ['update'] 139 command_passed: success_message='Updated working directory' patch='197' 140 run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 197] 121 141 command_passed: success_message='Applied patch' patch='197' 122 142 run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both'] … … 131 151 None, 132 152 None, 153 None, 133 154 ScriptError("MOCK build failure"), 134 155 ScriptError("MOCK clean build failure"), … … 136 157 expected_stderr = """run_webkit_patch: ['clean'] 137 158 command_passed: success_message='Cleaned working directory' patch='197' 138 run_webkit_patch: ['apply-attachment', '--non-interactive', 197] 159 run_webkit_patch: ['update'] 160 command_passed: success_message='Updated working directory' patch='197' 161 run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 197] 139 162 command_passed: success_message='Applied patch' patch='197' 140 163 run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both'] … … 150 173 None, 151 174 None, 175 None, 152 176 ScriptError("MOCK tests failure"), 153 177 ]) 154 178 expected_stderr = """run_webkit_patch: ['clean'] 155 179 command_passed: success_message='Cleaned working directory' patch='197' 156 run_webkit_patch: ['apply-attachment', '--non-interactive', 197] 180 run_webkit_patch: ['update'] 181 command_passed: success_message='Updated working directory' patch='197' 182 run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 197] 157 183 command_passed: success_message='Applied patch' patch='197' 158 184 run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both'] … … 173 199 None, 174 200 None, 201 None, 175 202 ScriptError("MOCK test failure"), 176 203 ScriptError("MOCK test failure again"), … … 178 205 expected_stderr = """run_webkit_patch: ['clean'] 179 206 command_passed: success_message='Cleaned working directory' patch='197' 180 run_webkit_patch: ['apply-attachment', '--non-interactive', 197] 207 run_webkit_patch: ['update'] 208 command_passed: success_message='Updated working directory' patch='197' 209 run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 197] 181 210 command_passed: success_message='Applied patch' patch='197' 182 211 run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both'] … … 196 225 None, 197 226 None, 227 None, 198 228 ScriptError("MOCK test failure"), 199 229 ScriptError("MOCK test failure again"), … … 202 232 expected_stderr = """run_webkit_patch: ['clean'] 203 233 command_passed: success_message='Cleaned working directory' patch='197' 204 run_webkit_patch: ['apply-attachment', '--non-interactive', 197] 234 run_webkit_patch: ['update'] 235 command_passed: success_message='Updated working directory' patch='197' 236 run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 197] 205 237 command_passed: success_message='Applied patch' patch='197' 206 238 run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both'] … … 221 253 None, 222 254 None, 255 None, 223 256 ScriptError("MOCK land failure"), 224 257 ]) 225 258 expected_stderr = """run_webkit_patch: ['clean'] 226 259 command_passed: success_message='Cleaned working directory' patch='197' 227 run_webkit_patch: ['apply-attachment', '--non-interactive', 197] 260 run_webkit_patch: ['update'] 261 command_passed: success_message='Updated working directory' patch='197' 262 run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 197] 228 263 command_passed: success_message='Applied patch' patch='197' 229 264 run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both'] -
trunk/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
r74301 r74403 205 205 "next_work_item": "", 206 206 "process_work_item": """MOCK: update_status: commit-queue Cleaned working directory 207 MOCK: update_status: commit-queue Updated working directory 207 208 MOCK: update_status: commit-queue Applied patch 208 209 MOCK: update_status: commit-queue Built patch … … 223 224 "next_work_item": "", 224 225 "process_work_item": """MOCK: update_status: commit-queue Cleaned working directory 226 MOCK: update_status: commit-queue Updated working directory 225 227 MOCK: update_status: commit-queue Patch does not apply 226 228 MOCK setting flag 'commit-queue' to '-' on attachment '197' with comment 'Rejecting attachment 197 from commit-queue.' and additional comment 'MOCK script error' … … 234 236 235 237 def mock_run_webkit_patch(command): 236 if command == ['clean'] :238 if command == ['clean'] or command == ['update']: 237 239 # We want cleaning to succeed so we can error out on a step 238 240 # that causes the commit-queue to reject the patch. … … 252 254 "process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean'] 253 255 MOCK: update_status: commit-queue Cleaned working directory 254 MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-attachment', '--non-interactive', 197] 256 MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'update'] 257 MOCK: update_status: commit-queue Updated working directory 258 MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-attachment', '--no-update', '--non-interactive', 197] 255 259 MOCK: update_status: commit-queue Applied patch 256 260 MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'build', '--no-clean', '--no-update', '--build-style=both'] … … 279 283 "process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean'] 280 284 MOCK: update_status: commit-queue Cleaned working directory 281 MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-attachment', '--non-interactive', 106] 285 MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'update'] 286 MOCK: update_status: commit-queue Updated working directory 287 MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-attachment', '--no-update', '--non-interactive', 106] 282 288 MOCK: update_status: commit-queue Applied patch 283 289 MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'build', '--no-clean', '--no-update', '--build-style=both'] … … 314 320 queue._options.port = None 315 321 expected_stderr = """MOCK: update_status: commit-queue Cleaned working directory 322 MOCK: update_status: commit-queue Updated working directory 316 323 MOCK: update_status: commit-queue Applied patch 317 324 MOCK: update_status: commit-queue Built patch
Note: See TracChangeset
for help on using the changeset viewer.