Changeset 85472 in webkit
- Timestamp:
- May 2, 2011 5:13:00 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r85471 r85472 1 2011-05-02 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r85469. 4 http://trac.webkit.org/changeset/85469 5 https://bugs.webkit.org/show_bug.cgi?id=59928 6 7 Broke webkitpy-tests on Windows 7, GTK and Qt. (Requested by 8 bbandix on #webkit). 9 10 * Scripts/webkitpy/tool/bot/earlywarningsystemtask.py: Removed. 11 * Scripts/webkitpy/tool/commands/earlywarningsystem.py: 12 * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py: 13 1 14 2011-05-02 Tomasz Morawski <t.morawski@samsung.com> 2 15 -
trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
r85469 r85472 27 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 29 from webkitpy.tool.commands.queues import AbstractReviewQueue 29 30 from webkitpy.common.config.committers import CommitterList 30 31 from webkitpy.common.config.ports import WebKitPort 31 from webkitpy.common.system.deprecated_logging import error, log32 32 from webkitpy.common.system.executive import ScriptError 33 from webkitpy.tool.bot.expectedfailures import ExpectedFailures34 from webkitpy.tool.bot.layouttestresultsreader import LayoutTestResultsReader35 33 from webkitpy.tool.bot.queueengine import QueueEngine 36 from webkitpy.tool.bot.earlywarningsystemtask import EarlyWarningSystemTask, EarlyWarningSystemTaskDelegate, UnableToApplyPatch37 from webkitpy.tool.commands.queues import AbstractReviewQueue38 34 39 35 … … 110 106 exit(1) 111 107 112 # FIXME: This should merge with AbstractEarlyWarningSystem once all the EWS113 # bots run tests.114 class AbstractTestingEWS(AbstractEarlyWarningSystem):115 def begin_work_queue(self):116 # FIXME: This violates abstraction117 self._tool._port = self.port118 AbstractEarlyWarningSystem.begin_work_queue(self)119 self._expected_failures = ExpectedFailures()120 self._layout_test_results_reader = LayoutTestResultsReader(self._tool, self._log_directory())121 122 def review_patch(self, patch):123 task = EarlyWarningSystemTask(self, patch)124 if not task.validate():125 self._did_error(patch, "%s did not process patch." % self.name)126 return False127 try:128 return task.run()129 except UnableToApplyPatch, e:130 self._did_error(patch, "%s unable to apply patch." % self.name)131 return False132 except ScriptError, e:133 # FIXME: We should upload the results archive on failure.134 results_link = self._tool.status_server.results_url_for_status(task.failure_status_id)135 message = "Attachment %s did not pass %s:\nOutput: %s" % (patch.id(), self.name, results_link)136 results = task.results_from_patch_test_run(patch)137 unexpected_failures = self._expected_failures.unexpected_failures(results)138 if unexpected_failures:139 message += "\nNew failing tests:\n%s" % "\n".join(unexpected_failures)140 self._tool.bugs.post_comment_to_bug(patch.bug_id(), message, cc=self.watchers)141 raise142 143 # EarlyWarningSystemDelegate methods144 145 def parent_command(self):146 return self.name147 148 def run_command(self, command):149 self.run_webkit_patch(command + [self.port.flag()])150 151 def command_passed(self, message, patch):152 pass153 154 def command_failed(self, message, script_error, patch):155 failure_log = self._log_from_script_error_for_upload(script_error)156 return self._update_status(message, patch=patch, results_file=failure_log)157 158 def expected_failures(self):159 return self._expected_failures160 161 def layout_test_results(self):162 return self._layout_test_results_reader.results()163 164 def archive_last_layout_test_results(self, patch):165 return self._layout_test_results_reader.archive(patch)166 167 def refetch_patch(self, patch):168 return self._tool.bugs.fetch_attachment(patch.id())169 170 def report_flaky_tests(self, patch, flaky_test_results, results_archive):171 pass172 173 # StepSequenceErrorHandler methods174 175 @classmethod176 def handle_script_error(cls, tool, state, script_error):177 log(script_error.message_with_output())178 179 108 180 109 class GtkEWS(AbstractEarlyWarningSystem): -
trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py
r85469 r85472 34 34 from webkitpy.tool.commands.earlywarningsystem import * 35 35 from webkitpy.tool.commands.queuestest import QueuesTest 36 from webkitpy.tool.mocktool import MockTool, MockOptions , MockPort36 from webkitpy.tool.mocktool import MockTool, MockOptions 37 37 38 38 … … 109 109 self.assert_queue_outputs(ews, expected_stderr=expected_stderr, expected_exceptions=expected_exceptions) 110 110 111 def test_testing_ews(self):112 class ConcreteTestingEWS(AbstractTestingEWS):113 name = "mock-testing-ews-name"114 port_name = "mock-port"115 ews = ConcreteTestingEWS()116 ews.port = MockPort()117 expected_stderr = {118 "begin_work_queue": """CAUTION: mock-testing-ews-name will discard all local changes in "/private/tmp"119 Running WebKit mock-testing-ews-name.120 MOCK: update_status: mock-testing-ews-name Starting Queue121 """,122 "handle_unexpected_error": """Mock error message123 """,124 "next_work_item": "",125 "process_work_item": """MOCK: update_status: mock-testing-ews-name Pass126 MOCK: release_work_item: mock-testing-ews-name 197127 """,128 "handle_script_error": """ScriptError error message129 """,130 }131 self.assert_queue_outputs(ews, expected_stderr=expected_stderr)132 133 111 # FIXME: If all EWSes are going to output the same text, we 134 112 # could test them all in one method with a for loop over an array.
Note: See TracChangeset
for help on using the changeset viewer.