Changeset 74373 in webkit
- Timestamp:
- Dec 20, 2010 3:55:36 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r74365 r74373 1 2010-12-20 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 commit-queue should include bot id when attaching failure diffs 6 https://bugs.webkit.org/show_bug.cgi?id=51280 7 8 This is a tiny change to include the bot id in the name of the attachment. 9 Most of this diff is just changing the unit test expectations 10 now that I hid the comment printing when the comment is None. 11 12 * Scripts/webkitpy/tool/bot/flakytestreporter.py: 13 * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py: 14 * Scripts/webkitpy/tool/commands/upload_unittest.py: 15 * Scripts/webkitpy/tool/mocktool.py: 16 1 17 2010-12-20 Jeff Miller <jeffm@apple.com> 2 18 -
trunk/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py
r74138 r74373 172 172 if self._tool.filesystem.exists(results_diff_path): 173 173 results_diff = self._tool.filesystem.read_binary_file(results_diff_path) 174 self._tool.bugs.add_attachment_to_bug(flake_bug_id, results_diff, "Failure diff from bot", filename="failure.diff") 174 bot_id = self._tool.status_server.bot_id or "bot" 175 self._tool.bugs.add_attachment_to_bug(flake_bug_id, results_diff, "Failure diff from %s" % bot_id, filename="failure.diff") 175 176 else: 176 177 _log.error("%s does not exist as expected, not uploading." % results_diff_path) -
trunk/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
r74138 r74373 98 98 def test_report_flaky_tests_creating_bug(self): 99 99 tool = MockTool() 100 tool.filesystem = MockFileSystem({"/mock/foo/bar.diff": "mock"}) 100 tool.filesystem = MockFileSystem({"/mock/foo/bar-diffs.txt": "mock"}) 101 tool.status_server = MockStatusServer(bot_id="mock-bot-id") 101 102 reporter = FlakyTestReporter(tool, 'dummy-queue') 102 103 reporter._lookup_bug_for_flaky_test = lambda bug_id: None … … 111 112 112 113 The dummy-queue just saw foo/bar.html flake while processing attachment 197 on bug 42. 113 Port: MockPort Platform: MockPlatform 1.0114 Bot: mock-bot-id Port: MockPort Platform: MockPlatform 1.0 114 115 115 116 The bots will update this with information from each new failure. … … 120 121 cc: abarth@webkit.org 121 122 blocked: 50856 123 MOCK add_attachment_to_bug: bug_id=78, description=Failure diff from mock-bot-id filename=failure.diff 122 124 MOCK bug comment: bug_id=42, cc=None 123 125 --- Begin comment --- -
trunk/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py
r73827 r74373 64 64 Obsoleting 2 old patches on bug 42 65 65 MOCK add_patch_to_bug: bug_id=42, description=MOCK description, mark_for_review=True, mark_for_commit_queue=False, mark_for_landing=False 66 -- Begin comment --67 None68 -- End comment --69 66 MOCK: user.open_url: http://example.com/42 70 67 """ … … 73 70 74 71 def test_land_safely(self): 75 expected_stderr = "Obsoleting 2 old patches on bug 42\nMOCK add_patch_to_bug: bug_id=42, description=Patch for landing, mark_for_review=False, mark_for_commit_queue=False, mark_for_landing=True\n -- Begin comment --\nNone\n-- End comment --\n"72 expected_stderr = "Obsoleting 2 old patches on bug 42\nMOCK add_patch_to_bug: bug_id=42, description=Patch for landing, mark_for_review=False, mark_for_commit_queue=False, mark_for_landing=True\n" 76 73 self.assert_execute_outputs(LandSafely(), [42], expected_stderr=expected_stderr) 77 74 … … 96 93 Obsoleting 2 old patches on bug 42 97 94 MOCK add_patch_to_bug: bug_id=42, description=MOCK description, mark_for_review=True, mark_for_commit_queue=False, mark_for_landing=False 98 -- Begin comment --99 None100 -- End comment --101 95 MOCK: user.open_url: http://example.com/42 102 96 """ … … 110 104 options.bug_id = 42 111 105 options.comment = "MOCK comment" 112 expected_stderr = "Bug: <http://example.com/42> Bug with two r+'d and cq+'d patches, one of which has an invalid commit-queue setter.\nRevision: 9876\nMOCK: user.open_url: http://example.com/42\nAdding comment to Bug 42.\nMOCK bug comment: bug_id=42, cc=None\n--- Begin comment ---\nMOCK comment\n\nCommitted r9876: <http://trac.webkit.org/changeset/9876>\n--- End comment ---\n\n" 106 expected_stderr = """Bug: <http://example.com/42> Bug with two r+'d and cq+'d patches, one of which has an invalid commit-queue setter. 107 Revision: 9876 108 MOCK: user.open_url: http://example.com/42 109 Adding comment to Bug 42. 110 MOCK bug comment: bug_id=42, cc=None 111 --- Begin comment --- 112 MOCK comment 113 114 Committed r9876: <http://trac.webkit.org/changeset/9876> 115 --- End comment --- 116 117 """ 113 118 expected_stdout = "Is this correct?\n" 114 119 self.assert_execute_outputs(MarkBugFixed(), [], expected_stdout=expected_stdout, expected_stderr=expected_stderr, tool=tool, options=options) -
trunk/Tools/Scripts/webkitpy/tool/mocktool.py
r74138 r74373 343 343 bug_id, cc, comment_text)) 344 344 345 def add_attachment_to_bug(self, 346 bug_id, 347 file_or_string, 348 description, 349 filename=None, 350 comment_text=None): 351 log("MOCK add_attachment_to_bug: bug_id=%s, description=%s filename=%s" % (bug_id, description, filename)) 352 if comment_text: 353 log("-- Begin comment --") 354 log(comment_text) 355 log("-- End comment --") 356 345 357 def add_patch_to_bug(self, 346 358 bug_id, … … 353 365 log("MOCK add_patch_to_bug: bug_id=%s, description=%s, mark_for_review=%s, mark_for_commit_queue=%s, mark_for_landing=%s" % 354 366 (bug_id, description, mark_for_review, mark_for_commit_queue, mark_for_landing)) 355 log("-- Begin comment --") 356 log(comment_text) 357 log("-- End comment --") 367 if comment_text: 368 log("-- Begin comment --") 369 log(comment_text) 370 log("-- End comment --") 358 371 359 372
Note: See TracChangeset
for help on using the changeset viewer.