WebKit Bugzilla
Attachment 346016 Details for
Bug 186140
: Enhancement request: Make export-w3c-test-changes add the PR to "See Also" links
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
More Correct unit test, made see_also as list parameter
patch5.patch (text/plain), 10.85 KB, created by
darshan
on 2018-07-28 23:33:34 PDT
(
hide
)
Description:
More Correct unit test, made see_also as list parameter
Filename:
MIME Type:
Creator:
darshan
Created:
2018-07-28 23:33:34 PDT
Size:
10.85 KB
patch
obsolete
>diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 1de2778373..fd0f639bb0 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,15 @@ >+2018-07-28 Darshan Kadu <dkadu@igalia.com> >+ >+ Enhancement request: Make export-w3c-test-changes add the PR to "See Also" links >+ https://bugs.webkit.org/show_bug.cgi?id=186140 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/webkitpy/common/net/bugzilla/bugzilla.py: >+ (Bugzilla.post_comment_to_bug): >+ * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py: >+ (MockBugzilla.post_comment_to_bug): >+ > 2018-07-18 Carlos Garcia Campos <cgarcia@igalia.com> > > [GLIB] Add jsc_context_check_syntax() to GLib API >diff --git a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py >index 056c807514..288f090662 100644 >--- a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py >+++ b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py >@@ -851,13 +851,16 @@ class Bugzilla(object): > self.browser["newcc"] = ", ".join(email_address_list) > self.browser.submit() > >- def post_comment_to_bug(self, bug_id, comment_text, cc=None): >+ def post_comment_to_bug(self, bug_id, comment_text, cc=None, see_also=None): > self.authenticate() > > _log.info("Adding comment to bug %s" % bug_id) > self.open_url(self.bug_url_for_bug_id(bug_id)) > self.browser.select_form(name="changeform") > self.browser["comment"] = comment_text >+ if see_also: >+ _log.info("Adding PR link to See Also List for bug %s" % bug_id) >+ self.browser["see_also"] = ", ".join(see_also) > if cc: > self.browser["newcc"] = ", ".join(cc) > self.browser.submit() >diff --git a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py >index fb08ae9ce5..3dfa4aabe6 100644 >--- a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py >+++ b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py >@@ -468,9 +468,9 @@ class MockBugzilla(object): > _log.info("MOCK setting flag '%s' to '%s' on attachment '%s' with comment '%s'" % ( > flag_name, flag_value, attachment_id, comment_text)) > >- def post_comment_to_bug(self, bug_id, comment_text, cc=None): >- _log.info("MOCK bug comment: bug_id=%s, cc=%s\n--- Begin comment ---\n%s\n--- End comment ---\n" % ( >- bug_id, cc, comment_text)) >+ def post_comment_to_bug(self, bug_id, comment_text, cc=None, see_also=None): >+ _log.info("MOCK bug comment: bug_id=%s, cc=%s, see_also=%s\n--- Begin comment ---\n%s\n--- End comment ---\n" % ( >+ bug_id, cc, see_also, comment_text)) > > def add_attachment_to_bug(self, bug_id, file_or_string, description, filename=None, comment_text=None, mimetype=None): > _log.info("MOCK add_attachment_to_bug: bug_id=%s, description=%s filename=%s mimetype=%s" % >diff --git a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py >index 7b85d5b34c..1bd9d7cdce 100644 >--- a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py >+++ b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py >@@ -127,7 +127,7 @@ component: Tools / Tests > cc: abarth@webkit.org > blocked: 50856 > MOCK add_attachment_to_bug: bug_id=60001, description=Failure diff from mock-bot-id filename=failure.diff mimetype=None >-MOCK bug comment: bug_id=50000, cc=None >+MOCK bug comment: bug_id=50000, cc=None, see_also=None > --- Begin comment --- > The dummy-queue encountered the following flaky tests while processing attachment 10000: > >diff --git a/Tools/Scripts/webkitpy/tool/bot/sheriff_unittest.py b/Tools/Scripts/webkitpy/tool/bot/sheriff_unittest.py >index 78e7965aea..416592d2ee 100644 >--- a/Tools/Scripts/webkitpy/tool/bot/sheriff_unittest.py >+++ b/Tools/Scripts/webkitpy/tool/bot/sheriff_unittest.py >@@ -65,19 +65,19 @@ class SheriffTest(unittest.TestCase): > sheriff.post_blame_comment_on_bug(commit_info, builders, ["mock-test-1"]) > sheriff.post_blame_comment_on_bug(commit_info, builders, ["mock-test-1", "mock-test-2"]) > >- expected_logs = u"""MOCK bug comment: bug_id=1234, cc=['watcher@example.com'] >+ expected_logs = u"""MOCK bug comment: bug_id=1234, cc=['watcher@example.com'], see_also=None > --- Begin comment --- > https://trac.webkit.org/changeset/4321 might have broken Foo and Bar > --- End comment --- > >-MOCK bug comment: bug_id=1234, cc=['watcher@example.com'] >+MOCK bug comment: bug_id=1234, cc=['watcher@example.com'], see_also=None > --- Begin comment --- > https://trac.webkit.org/changeset/4321 might have broken Foo and Bar > The following tests are not passing: > mock-test-1 > --- End comment --- > >-MOCK bug comment: bug_id=1234, cc=['watcher@example.com'] >+MOCK bug comment: bug_id=1234, cc=['watcher@example.com'], see_also=None > --- Begin comment --- > https://trac.webkit.org/changeset/4321 might have broken Foo and Bar > The following tests are not passing: >diff --git a/Tools/Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py b/Tools/Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py >index e88a86fa55..15c0b1f22c 100644 >--- a/Tools/Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py >+++ b/Tools/Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py >@@ -43,7 +43,7 @@ Message2." > > def test_args_parsing_with_bug(self): > expected_logs = """MockWatchList: determine_cc_and_messages >-MOCK bug comment: bug_id=50002, cc=set(['eric@webkit.org', 'levin@chromium.org', 'abarth@webkit.org']) >+MOCK bug comment: bug_id=50002, cc=set(['eric@webkit.org', 'levin@chromium.org', 'abarth@webkit.org']), see_also=None > --- Begin comment --- > Message1. > >diff --git a/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py b/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py >index ab64143ccf..3ea8785610 100644 >--- a/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py >+++ b/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py >@@ -424,14 +424,14 @@ MOCK: release_work_item: commit-queue 10000 > > def test_report_flaky_tests(self): > queue = TestCommitQueue(MockTool()) >- expected_logs = """MOCK bug comment: bug_id=50002, cc=None >+ expected_logs = """MOCK bug comment: bug_id=50002, cc=None, see_also=None > --- Begin comment --- > The commit-queue just saw foo/bar.html flake (text diff) while processing attachment 10000 on bug 50000. > Port: MockPort Platform: MockPlatform 1.0 > --- End comment --- > > MOCK add_attachment_to_bug: bug_id=50002, description=Failure diff from bot filename=failure.diff mimetype=None >-MOCK bug comment: bug_id=50002, cc=None >+MOCK bug comment: bug_id=50002, cc=None, see_also=None > --- Begin comment --- > The commit-queue just saw bar/baz.html flake (text diff) while processing attachment 10000 on bug 50000. > Port: MockPort Platform: MockPlatform 1.0 >@@ -439,7 +439,7 @@ Port: MockPort Platform: MockPlatform 1.0 > > bar/baz-diffs.txt does not exist in results archive, uploading entire archive. > MOCK add_attachment_to_bug: bug_id=50002, description=Archive of layout-test-results from bot filename=layout-test-results.zip mimetype=None >-MOCK bug comment: bug_id=50000, cc=None >+MOCK bug comment: bug_id=50000, cc=None, see_also=None > --- Begin comment --- > The commit-queue encountered the following flaky tests while processing attachment 10000: > >diff --git a/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py b/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py >index b51d3e409f..afa79fc57c 100644 >--- a/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py >+++ b/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py >@@ -194,7 +194,7 @@ Revision: 9876 > MOCK: user.open_url: http://example.com/50000 > Is this correct? > Adding comment to Bug 50000. >-MOCK bug comment: bug_id=50000, cc=None >+MOCK bug comment: bug_id=50000, cc=None, see_also=None > --- Begin comment --- > MOCK comment > >diff --git a/Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py b/Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py >index a978f41648..b74f5c952b 100644 >--- a/Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py >+++ b/Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py >@@ -42,7 +42,7 @@ class ApplyWatchListTest(unittest.TestCase): > 'diff': 'The diff', > } > expected_logs = """MockWatchList: determine_cc_and_messages >-MOCK bug comment: bug_id=50001, cc=set(['levin@chromium.org']) >+MOCK bug comment: bug_id=50001, cc=set(['levin@chromium.org']), see_also=None > --- Begin comment --- > Message2. > --- End comment --- >diff --git a/Tools/Scripts/webkitpy/w3c/test_exporter.py b/Tools/Scripts/webkitpy/w3c/test_exporter.py >index 6a72d15676..7290311ed0 100644 >--- a/Tools/Scripts/webkitpy/w3c/test_exporter.py >+++ b/Tools/Scripts/webkitpy/w3c/test_exporter.py >@@ -324,7 +324,8 @@ class WebPlatformTestExporter(object): > _log.warning(e) > _log.info('Could not add label "%s" to pr #%s. User "%s" may not have permission to update labels in the %s/%s repo.' % (WEBKIT_EXPORT_PR_LABEL, pr_number, self.username, WPT_GH_ORG, WPT_GH_REPO_NAME)) > if self._bug_id and pr_number: >- self._bugzilla.post_comment_to_bug(self._bug_id, "Submitted web-platform-tests pull request: " + WPT_PR_URL + str(pr_number)) >+ pr_url = WPT_PR_URL + str(pr_number) >+ self._bugzilla.post_comment_to_bug(self._bug_id, "Submitted web-platform-tests pull request: " + pr_url, see_also=[pr_url]) > > def create_wpt_pull_request(self, remote_branch_name, title, body): > pr_number = None >diff --git a/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py b/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py >index 1efe507a80..4fc04883e7 100644 >--- a/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py >+++ b/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py >@@ -41,7 +41,9 @@ class TestExporterTest(unittest.TestCase): > self.calls.append('fetch bug ' + id) > return {"title": "my bug title"} > >- def post_comment_to_bug(self, id, comment): >+ def post_comment_to_bug(self, id, comment, see_also=None): >+ if see_also: >+ self.calls.append("Append "+ ", ".join(see_also) + " to see also list") > self.calls.append('post comment to bug ' + id + ' : ' + comment) > return True > >@@ -148,6 +150,7 @@ class TestExporterTest(unittest.TestCase): > 'reset hard origin/master']) > self.assertEquals(exporter._bugzilla.calls, [ > 'fetch bug 1234', >+ 'Append https://github.com/web-platform-tests/wpt/pull/5678 to see also list', > 'post comment to bug 1234 : Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/5678']) > self.assertEquals(mock_linter.calls, ['/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests', 'lint']) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186140
:
345458
|
345509
|
345693
|
345807
|
346016
|
346017
|
346044
|
347077
|
347078
|
347083
|
347084