Title: [97320] trunk/Tools
- Revision
- 97320
- Author
- [email protected]
- Date
- 2011-10-12 17:13:31 -0700 (Wed, 12 Oct 2011)
Log Message
The commit-queue doesn't tell me which tests my patch broke
https://bugs.webkit.org/show_bug.cgi?id=69975
Reviewed by Eric Seidel.
We now print the list of newly failing tests, like we do for the EWS.
* Scripts/webkitpy/tool/commands/queues.py:
* Scripts/webkitpy/tool/commands/queues_unittest.py:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (97319 => 97320)
--- trunk/Tools/ChangeLog 2011-10-12 23:59:48 UTC (rev 97319)
+++ trunk/Tools/ChangeLog 2011-10-13 00:13:31 UTC (rev 97320)
@@ -1,3 +1,15 @@
+2011-10-12 Adam Barth <[email protected]>
+
+ The commit-queue doesn't tell me which tests my patch broke
+ https://bugs.webkit.org/show_bug.cgi?id=69975
+
+ Reviewed by Eric Seidel.
+
+ We now print the list of newly failing tests, like we do for the EWS.
+
+ * Scripts/webkitpy/tool/commands/queues.py:
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+
2011-10-10 Alice Boxhall <[email protected]>
Added myself as a committer.
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/queues.py (97319 => 97320)
--- trunk/Tools/Scripts/webkitpy/tool/commands/queues.py 2011-10-12 23:59:48 UTC (rev 97319)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/queues.py 2011-10-13 00:13:31 UTC (rev 97320)
@@ -289,18 +289,26 @@
self._did_retry(patch)
except ScriptError, e:
validator = CommitterValidator(self._tool.bugs)
- validator.reject_patch_from_commit_queue(patch.id(), self._error_message_for_bug(task.failure_status_id, e))
+ validator.reject_patch_from_commit_queue(patch.id(), self._error_message_for_bug(task, patch, e))
results_archive = task.results_archive_from_patch_test_run(patch)
if results_archive:
self._upload_results_archive_for_patch(patch, results_archive)
self._did_fail(patch)
- def _error_message_for_bug(self, status_id, script_error):
- if not script_error.output:
- return script_error.message_with_output()
- results_link = self._tool.status_server.results_url_for_status(status_id)
- return "%s\nFull output: %s" % (script_error.message_with_output(), results_link)
+ def _failing_tests_message(self, task, patch):
+ results = task.results_from_patch_test_run(patch)
+ unexpected_failures = self._expected_failures.unexpected_failures_observed(results)
+ if not unexpected_failures:
+ return None
+ return "New failing tests:\n%s" % "\n".join(unexpected_failures)
+ def _error_message_for_bug(self, task, patch, script_error):
+ message = self._failing_tests_message(task, patch)
+ if not message:
+ message = script_error.message_with_output()
+ results_link = self._tool.status_server.results_url_for_status(task.failure_status_id)
+ return "%s\nFull output: %s" % (message, results_link)
+
def handle_unexpected_error(self, patch, message):
self.committer_validator.reject_patch_from_commit_queue(patch.id(), message)
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py (97319 => 97320)
--- trunk/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py 2011-10-12 23:59:48 UTC (rev 97319)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py 2011-10-13 00:13:31 UTC (rev 97320)
@@ -261,7 +261,8 @@
"process_work_item": """MOCK: update_status: commit-queue Cleaned working directory
MOCK: update_status: commit-queue Updated working directory
MOCK: update_status: commit-queue Patch does not apply
-MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'MOCK script error'
+MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'MOCK script error
+Full output: http://dummy_url'
MOCK: update_status: commit-queue Fail
MOCK: release_work_item: commit-queue 10000
""",
@@ -280,6 +281,37 @@
queue.run_webkit_patch = mock_run_webkit_patch
self.assert_queue_outputs(queue, expected_stderr=expected_stderr)
+ def test_commit_queue_failure_with_failing_tests(self):
+ expected_stderr = {
+ "begin_work_queue": self._default_begin_work_queue_stderr("commit-queue"),
+ "should_proceed_with_work_item": "MOCK: update_status: commit-queue Processing patch\n",
+ "next_work_item": "",
+ "process_work_item": """MOCK: update_status: commit-queue Cleaned working directory
+MOCK: update_status: commit-queue Updated working directory
+MOCK: update_status: commit-queue Patch does not apply
+MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'New failing tests:
+mock_test_name.html
+another_test_name.html
+Full output: http://dummy_url'
+MOCK: update_status: commit-queue Fail
+MOCK: release_work_item: commit-queue 10000
+""",
+ "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'Mock error message'\n",
+ "handle_script_error": "ScriptError error message\n",
+ }
+ queue = CommitQueue()
+
+ def mock_run_webkit_patch(command):
+ if command == ['clean'] or command == ['update']:
+ # We want cleaning to succeed so we can error out on a step
+ # that causes the commit-queue to reject the patch.
+ return
+ queue._expected_failures.unexpected_failures_observed = lambda results: ["mock_test_name.html", "another_test_name.html"]
+ raise ScriptError('MOCK script error')
+
+ queue.run_webkit_patch = mock_run_webkit_patch
+ self.assert_queue_outputs(queue, expected_stderr=expected_stderr)
+
def test_rollout(self):
tool = MockTool(log_executive=True)
tool.filesystem.write_text_file('/mock-results/results.html', '') # Otherwise the commit-queue will hit a KeyError trying to read the results from the MockFileSystem.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes