Changeset 116572 in webkit
- Timestamp:
- May 9, 2012 4:22:04 PM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r116571 r116572 1 2012-05-09 Tom Zakrajsek <tomz@codeaurora.org> 2 3 Fix overzealous re-opened since blocked by... message 4 https://bugs.webkit.org/show_bug.cgi?id=86020 5 6 Reviewed by Adam Barth. 7 8 Changed CreateBug behavior to only re-open a blocked bug if it 9 was RESOLVED. Also had to update the test infrastructure slightly 10 to allow for distinct mock commit revisions, so one could point 11 to a RESOLVED bug for testing while another pointed to an OPEN bug. 12 13 Also moved default created mock bug to be 60001 instead of 50004 14 which already exists as a reference mock bug. 15 16 * Scripts/webkitpy/common/checkout/checkout_mock.py: 17 (MockCheckout.__init__): 18 (MockCheckout.commit_info_for_revision): 19 * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py: 20 (MockBugzilla.create_bug): 21 * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py: 22 * Scripts/webkitpy/tool/commands/download_unittest.py: 23 (test_create_rollout_resolved): 24 * Scripts/webkitpy/tool/commands/queries_unittest.py: 25 (FailureReasonTest.test_blame_line_for_revision): 26 * Scripts/webkitpy/tool/steps/createbug.py: 27 (CreateBug.run): 28 1 29 2012-05-09 Hugo Parente Lima <hugo.lima@openbossa.org> 2 30 -
trunk/Tools/Scripts/webkitpy/common/checkout/checkout_mock.py
r107302 r116572 41 41 42 42 43 committer_list = CommitterList() 44 45 mock_revisions = { 46 1: CommitInfo(852, "eric@webkit.org", { 47 "bug_id": 50000, 48 "author_name": "Adam Barth", 49 "author_email": "abarth@webkit.org", 50 "author": committer_list.contributor_by_email("abarth@webkit.org"), 51 "reviewer_text": "Darin Adler", 52 "reviewer": committer_list.committer_by_name("Darin Adler"), 53 "changed_files": [ 54 "path/to/file", 55 "another/file", 56 ], 57 }), 58 3001: CommitInfo(3001, "tomz@codeaurora.org", { 59 "bug_id": 50004, 60 "author_name": "Tom Zakrajsek", 61 "author_email": "tomz@codeaurora.org", 62 "author": committer_list.contributor_by_email("tomz@codeaurora.org"), 63 "reviewer_text": "Darin Adler", 64 "reviewer": committer_list.committer_by_name("Darin Adler"), 65 "changed_files": [ 66 "path/to/file", 67 "another/file", 68 ], 69 }) 70 } 71 43 72 class MockCheckout(object): 44 73 def __init__(self): … … 47 76 self._filesystem = MockFileSystem() 48 77 49 # FIXME: This should move onto the Host object, and we should use a MockCommitterList for tests. 50 _committer_list = CommitterList() 78 def commit_info_for_revision(self, svn_revision): 79 # There are legacy tests that all expected these revision numbers to map 80 # to the same commit description (now mock_revisions[1]) 81 if svn_revision in [32, 123, 852, 853, 854, 1234, 21654, 21655, 21656]: 82 return mock_revisions[1] 51 83 52 def commit_info_for_revision(self, svn_revision): 53 # The real Checkout would probably throw an exception, but this is the only way tests have to get None back at the moment. 54 if not svn_revision: 55 return None 56 return CommitInfo(svn_revision, "eric@webkit.org", { 57 "bug_id": 50000, 58 "author_name": "Adam Barth", 59 "author_email": "abarth@webkit.org", 60 "author": self._committer_list.contributor_by_email("abarth@webkit.org"), 61 "reviewer_text": "Darin Adler", 62 "reviewer": self._committer_list.committer_by_name("Darin Adler"), 63 "changed_files": [ 64 "path/to/file", 65 "another/file", 66 ], 67 }) 84 if svn_revision in mock_revisions: 85 return mock_revisions[svn_revision] 86 87 # any "unrecognized" svn_revision will return None. 68 88 69 89 def is_path_to_changelog(self, path): -
trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py
r116414 r116572 324 324 if blocked: 325 325 log("blocked: %s" % blocked) 326 return 50004326 return 60001 327 327 328 328 def quips(self): -
trunk/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
r99140 r116572 126 126 cc: abarth@webkit.org 127 127 blocked: 50856 128 MOCK add_attachment_to_bug: bug_id= 50004, description=Failure diff from mock-bot-id filename=failure.diff128 MOCK add_attachment_to_bug: bug_id=60001, description=Failure diff from mock-bot-id filename=failure.diff 129 129 MOCK bug comment: bug_id=50000, cc=None 130 130 --- Begin comment --- 131 131 The dummy-queue encountered the following flaky tests while processing attachment 10000: 132 132 133 foo/bar.html bug 50004(author: abarth@webkit.org)133 foo/bar.html bug 60001 (author: abarth@webkit.org) 134 134 The dummy-queue is continuing to process your patch. 135 135 --- End comment --- -
trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py
r116245 r116572 262 262 cc: MOCK cc 263 263 blocked: 50000 264 MOCK reopen_bug 50000 with comment 'Re-opened since this is blocked by 50004' 265 MOCK add_patch_to_bug: bug_id=50004, description=ROLLOUT of r852, mark_for_review=False, mark_for_commit_queue=True, mark_for_landing=False 264 MOCK add_patch_to_bug: bug_id=60001, description=ROLLOUT of r852, mark_for_review=False, mark_for_commit_queue=True, mark_for_landing=False 266 265 -- Begin comment -- 267 266 Any committer can land this patch automatically by marking it commit-queue+. The commit-queue will build and test the patch before landing to ensure that the rollout will be successful. This process takes approximately 15 minutes. … … 277 276 self.assert_execute_outputs(CreateRollout(), ["855 852 854", "Reason"], options=self._default_options(), expected_stderr=expected_stderr) 278 277 278 def test_create_rollout_resolved(self): 279 expected_stderr = """Preparing rollout for bug 50004. 280 Updating working directory 281 MOCK create_bug 282 bug_title: REGRESSION(r3001): Reason 283 bug_description: http://trac.webkit.org/changeset/3001 broke the build: 284 Reason 285 component: MOCK component 286 cc: MOCK cc 287 blocked: 50004 288 MOCK reopen_bug 50004 with comment 'Re-opened since this is blocked by 60001' 289 MOCK add_patch_to_bug: bug_id=60001, description=ROLLOUT of r3001, mark_for_review=False, mark_for_commit_queue=True, mark_for_landing=False 290 -- Begin comment -- 291 Any committer can land this patch automatically by marking it commit-queue+. The commit-queue will build and test the patch before landing to ensure that the rollout will be successful. This process takes approximately 15 minutes. 292 293 If you would like to land the rollout faster, you can use the following command: 294 295 webkit-patch land-attachment ATTACHMENT_ID 296 297 where ATTACHMENT_ID is the ID of this attachment. 298 -- End comment -- 299 """ 300 self.assert_execute_outputs(CreateRollout(), [3001, "Reason"], options=self._default_options(), expected_stderr=expected_stderr) 301 279 302 def test_rollout(self): 280 303 expected_stderr = """Preparing rollout for bug 50000. -
trunk/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py
r113927 r116572 99 99 command.bind_to_tool(tool) 100 100 # This is an artificial example, mostly to test the CommitInfo lookup failure case. 101 self.assertEquals(command._blame_line_for_revision( None), "FAILED to fetch CommitInfo for rNone, likely missing ChangeLog")101 self.assertEquals(command._blame_line_for_revision(0), "FAILED to fetch CommitInfo for r0, likely missing ChangeLog") 102 102 103 103 def raising_mock(self): 104 104 raise Exception("MESSAGE") 105 105 tool.checkout().commit_info_for_revision = raising_mock 106 self.assertEquals(command._blame_line_for_revision( None), "FAILED to fetch CommitInfo for rNone, exception: MESSAGE")106 self.assertEquals(command._blame_line_for_revision(0), "FAILED to fetch CommitInfo for r0, exception: MESSAGE") 107 107 108 108 -
trunk/Tools/Scripts/webkitpy/tool/steps/createbug.py
r116245 r116572 1 1 # Copyright (C) 2010 Google Inc. All rights reserved. 2 # 2 # 3 3 # Redistribution and use in source and binary forms, with or without 4 4 # modification, are permitted provided that the following conditions are 5 5 # met: 6 # 6 # 7 7 # * Redistributions of source code must retain the above copyright 8 8 # notice, this list of conditions and the following disclaimer. … … 14 14 # contributors may be used to endorse or promote products derived from 15 15 # this software without specific prior written permission. 16 # 16 # 17 17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 18 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT … … 52 52 state["bug_id"] = self._tool.bugs.create_bug(state["bug_title"], state["bug_description"], blocked=blocks, component=self._options.component, cc=cc) 53 53 if blocks: 54 self._tool.bugs.reopen_bug(blocks, "Re-opened since this is blocked by %s" % state["bug_id"]) 54 status = self._tool.bugs.fetch_bug(blocks).status() 55 if status == 'RESOLVED': 56 self._tool.bugs.reopen_bug(blocks, "Re-opened since this is blocked by %s" % state["bug_id"])
Note: See TracChangeset
for help on using the changeset viewer.