+2012-02-24 Adam Barth <abarth@webkit.org>
+
+ style-queue tries to apply the patch twice
+ https://bugs.webkit.org/show_bug.cgi?id=79459
+
+ Reviewed by Eric Seidel.
+
+ Previously, we applied the patch using both apply-patch and
+ check-style. This patch introduces a check-style-local to mirror the
+ apply-watchlist-local, which operates on the current working diff.
+
+ This patch also cleans up some other bugs I found by running the queue
+ locally for a while. The queue still prints out a slightly
+ less-than-ideal message on the bugs when it find an error, but it's ok
+ for now. We'll need to iterate a bit.
+
+ * Scripts/webkitpy/tool/bot/stylequeuetask.py:
+ (StyleQueueTask.validate):
+ (StyleQueueTask._check_style):
+ * Scripts/webkitpy/tool/commands/download.py:
+ (CheckStyleLocal):
+ * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
+ (EarlyWarningSytemTest._default_expected_stderr):
+ (EarlyWarningSytemTest._test_testing_ews):
+ * Scripts/webkitpy/tool/commands/queues.py:
+ (AbstractReviewQueue.handle_script_error):
+ (StyleQueue.review_patch):
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+ * Scripts/webkitpy/tool/commands/queuestest.py:
+ (QueuesTest.assert_queue_outputs):
+
2012-02-23 Adam Barth <abarth@webkit.org>
should_proceed_with_work_item is unused and can be removed
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",
+ "handle_script_error": "ScriptError error message\n\nMOCK output\n",
}
self.assert_queue_outputs(CommitQueue(), tool=tool, expected_stderr=expected_stderr)
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",
+ "handle_script_error": "ScriptError error message\n\nMOCK output\n",
}
queue = CommitQueue()
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",
+ "handle_script_error": "ScriptError error message\n\nMOCK output\n",
}
queue = CommitQueue()
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",
+ "handle_script_error": "ScriptError error message\n\nMOCK output\n",
}
self.assert_queue_outputs(CommitQueue(), tool=tool, expected_stderr=expected_stderr)
MOCK: release_work_item: commit-queue 10005
""",
"handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10005' with comment 'Rejecting attachment 10005 from commit-queue.' and additional comment 'Mock error message'\n",
- "handle_script_error": "ScriptError error message\n",
+ "handle_script_error": "ScriptError error message\n\nMOCK output\n",
}
self.assert_queue_outputs(CommitQueue(), tool=tool, work_item=rollout_patch, expected_stderr=expected_stderr)
MOCK: update_status: style-queue Applied patch
MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-watchlist-local', 50000], cwd=/mock-checkout
MOCK: update_status: style-queue Watchlist applied
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'check-style', '--no-clean', '--no-update', '--non-interactive', 10000], cwd=/mock-checkout
-MOCK: update_status: style-queue Patch did not pass style check
-MOCK bug comment: bug_id=50000, cc=[]
---- Begin comment ---
-Attachment 10000 did not pass style-queue:
-
-MOCK command output
-
-If any of these errors are false positives, please file a bug against check-webkit-style.
---- End comment ---
-
-MOCK: update_status: style-queue Fail
+MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'check-style-local', '--non-interactive', '--quiet'], cwd=/mock-checkout
+MOCK: update_status: style-queue Style checked
+MOCK: update_status: style-queue Pass
MOCK: release_work_item: style-queue 10000
""",
"handle_unexpected_error": "Mock error message\n",
- "handle_script_error": "ScriptError error message\n",
+ "handle_script_error": "MOCK output\n",
}
tool = MockTool(log_executive=True, executive_throws_when_run=set(['check-style']))
self.assert_queue_outputs(StyleQueue(), expected_stderr=expected_stderr, tool=tool)
MOCK: update_status: style-queue Applied patch
MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-watchlist-local', 50000], cwd=/mock-checkout
MOCK: update_status: style-queue Unabled to apply watchlist
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'check-style', '--no-clean', '--no-update', '--non-interactive', 10000], cwd=/mock-checkout
+MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'check-style-local', '--non-interactive', '--quiet'], cwd=/mock-checkout
MOCK: update_status: style-queue Style checked
MOCK: update_status: style-queue Pass
MOCK: release_work_item: style-queue 10000
""",
"handle_unexpected_error": "Mock error message\n",
- "handle_script_error": "ScriptError error message\n",
+ "handle_script_error": "MOCK output\n",
}
tool = MockTool(log_executive=True, executive_throws_when_run=set(['apply-watchlist-local']))
self.assert_queue_outputs(StyleQueue(), expected_stderr=expected_stderr, tool=tool)