Title: [89701] trunk/Tools
Revision
89701
Author
[email protected]
Date
2011-06-24 13:53:51 -0700 (Fri, 24 Jun 2011)

Log Message

Include links to Trac in bugs filed from TestFailures

Fixes <http://webkit.org/b/63348> Bugs filed from TestFailures page should include links to
Trac for suspect revisions

Reviewed by David Kilzer.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js:
(Trac.prototype.changesetURL): New function, returns the URL for a particular revision in
Trac.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
(ViewController.prototype._domForNewAndExistingBugs): If there's only one suspect revision,
include a link to Trac for it in the first sentence of the description. Otherwise include a
link to the suspect range after the list of failing tests.

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js (89700 => 89701)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js	2011-06-24 20:46:42 UTC (rev 89700)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js	2011-06-24 20:53:51 UTC (rev 89701)
@@ -28,6 +28,10 @@
 }
 
 Trac.prototype = {
+    changesetURL: function(revision) {
+        return this.baseURL + 'changeset/' + revision;
+    },
+
     logURL: function(path, startRevision, endRevision) {
         return addQueryParametersToURL(this.baseURL + 'log/' + path, { rev: endRevision, stop_rev: startRevision });
     },

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js (89700 => 89701)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js	2011-06-24 20:46:42 UTC (rev 89700)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js	2011-06-24 20:53:51 UTC (rev 89701)
@@ -299,19 +299,31 @@
             title = titlePrefix + failingTests.length + ' tests' + titleSuffix;
         console.assert(title.length <= Bugzilla.maximumBugTitleLength);
 
+        var firstSuspectRevision = parsedPassingBuildName ? parsedPassingBuildName.revision + 1 : parsedFailingBuildName.revision;
+        var lastSuspectRevision = parsedFailingBuildName.revision;
+
+        var endOfFirstSentence;
+        if (passingBuildName) {
+            endOfFirstSentence = 'started failing on ' + tester.name;
+            if (firstSuspectRevision === lastSuspectRevision)
+                endOfFirstSentence += ' in r' + firstSuspectRevision + ' <' + this._trac.changesetURL(firstSuspectRevision) + '>';
+            else
+                endOfFirstSentence += ' between r' + firstSuspectRevision + ' and r' + lastSuspectRevision + ' (inclusive)';
+        } else
+            endOfFirstSentence = (failingTests.length === 1 ? 'has' : 'have') + ' been failing on ' + tester.name + ' since at least r' + firstSuspectRevision + ' <' + this._trac.changesetURL(firstSuspectRevision) + '>';
+
         var description;
-        if (failingTests.length === 1) {
-            description = failingTests[0] + ' has been failing on ' + tester.name
-                + ' since r' + parsedFailingBuildName.revision + '.\n\n';
-        } else if (failingTests.length === 2) {
-            description = failingTests.join(' and ') + ' have been failing on ' + tester.name
-                + ' since r' + parsedFailingBuildName.revision + '.\n\n';
-        } else {
-            description = 'The following tests have been failing on ' + tester.name
-                + ' since r' + parsedFailingBuildName.revision + ':\n\n'
+        if (failingTests.length === 1)
+            description = failingTests[0] + ' ' + endOfFirstSentence + '.\n\n';
+        else if (failingTests.length === 2)
+            description = failingTests.join(' and ') + ' ' + endOfFirstSentence + '.\n\n';
+        else {
+            description = 'The following tests ' + endOfFirstSentence + ':\n\n'
                 + failingTests.map(function(test) { return '    ' + test }).join('\n')
                 + '\n\n';
         }
+        if (firstSuspectRevision !== lastSuspectRevision)
+            description += this._trac.logURL('trunk', firstSuspectRevision, lastSuspectRevision) + '\n\n';
         if (passingBuildName)
             description += encodeURI(tester.resultsPageURL(passingBuildName)) + ' passed\n';
         var failingResultsHTML = tester.resultsPageURL(failingBuildName);

Modified: trunk/Tools/ChangeLog (89700 => 89701)


--- trunk/Tools/ChangeLog	2011-06-24 20:46:42 UTC (rev 89700)
+++ trunk/Tools/ChangeLog	2011-06-24 20:53:51 UTC (rev 89701)
@@ -1,3 +1,21 @@
+2011-06-24  Adam Roben  <[email protected]>
+
+        Include links to Trac in bugs filed from TestFailures
+
+        Fixes <http://webkit.org/b/63348> Bugs filed from TestFailures page should include links to
+        Trac for suspect revisions
+
+        Reviewed by David Kilzer.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js:
+        (Trac.prototype.changesetURL): New function, returns the URL for a particular revision in
+        Trac.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
+        (ViewController.prototype._domForNewAndExistingBugs): If there's only one suspect revision,
+        include a link to Trac for it in the first sentence of the description. Otherwise include a
+        link to the suspect range after the list of failing tests.
+
 2011-06-24  Nat Duca  <[email protected]>
 
         Unreviewed, rolling out r89694.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to