- Revision
- 89695
- Author
- [email protected]
- Date
- 2011-06-24 12:36:44 -0700 (Fri, 24 Jun 2011)
Log Message
Add links to regression ranges in Trac to the TestFailures page
Fixes <http://webkit.org/b/61060> <rdar://problem/9452153> TestFailures page should provide
links to regression ranges in Trac
Reviewed by David Kilzer.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js: Added.
(Trac): This new class represents a particular instance of Trac for a single project.
(Trac.prototype.logURL): Returns the URL that can be used to see the log of the given
repository path between the two specified revisions
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
(ViewController): Added new trac argument.
(ViewController.prototype._displayBuilder): Moved code to create the DOM for the
passed/failed builds from here...
(ViewController.prototype._domForRegressionRange): ...to here. Now also includes a link to
Trac if there are multiple suspect revisions.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html: Pull in
Trac.js and pass a Trac instance for trac.webkit.org to the ViewController.
Modified Paths
Added Paths
Diff
Added: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js (0 => 89695)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js 2011-06-24 19:36:44 UTC (rev 89695)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+function Trac(baseURL) {
+ this.baseURL = baseURL;
+}
+
+Trac.prototype = {
+ 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 (89694 => 89695)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js 2011-06-24 19:29:16 UTC (rev 89694)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js 2011-06-24 19:36:44 UTC (rev 89695)
@@ -23,9 +23,10 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-function ViewController(buildbot, bugzilla) {
+function ViewController(buildbot, bugzilla, trac) {
this._buildbot = buildbot;
this._bugzilla = bugzilla;
+ this._trac = trac;
var self = this;
addEventListener('load', function() { self.loaded() }, false);
@@ -79,12 +80,7 @@
if (buildIndex + 1 < buildNameArray.length)
passingBuildName = buildNameArray[buildIndex + 1];
- var dlItems = [
- [document.createTextNode('Failed'), self._domForBuildName(builder, buildName)],
- ];
- if (passingBuildName)
- dlItems.push([document.createTextNode('Passed'), self._domForBuildName(builder, buildNameArray[buildIndex + 1])]);
- item.appendChild(createDefinitionList(dlItems));
+ item.appendChild(self._domForRegressionRange(builder, passingBuildName, buildName));
if (passingBuildName || !stillFetchingData)
item.appendChild(self._domForNewAndExistingBugs(builder, buildName, passingBuildName, failingTestNames));
@@ -145,6 +141,34 @@
});
},
+ _domForRegressionRange: function(builder, passingBuildName, failingBuildName) {
+ var result = document.createDocumentFragment();
+
+ var dlItems = [
+ [document.createTextNode('Failed'), this._domForBuildName(builder, failingBuildName)],
+ ];
+ if (passingBuildName)
+ dlItems.push([document.createTextNode('Passed'), this._domForBuildName(builder, passingBuildName)]);
+ result.appendChild(createDefinitionList(dlItems));
+
+ if (!passingBuildName)
+ return result;
+
+ var firstSuspectRevision = this._buildbot.parseBuildName(passingBuildName).revision + 1;
+ var lastSuspectRevision = this._buildbot.parseBuildName(failingBuildName).revision;
+
+ if (firstSuspectRevision === lastSuspectRevision)
+ return result;
+
+ var link = document.createElement('a');
+ result.appendChild(link);
+
+ link.href = "" firstSuspectRevision, lastSuspectRevision);
+ link.appendChild(document.createTextNode('View regression range in Trac'));
+
+ return result;
+ },
+
_domForBuildName: function(builder, buildName) {
var parsed = this._buildbot.parseBuildName(buildName);
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html (89694 => 89695)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html 2011-06-24 19:29:16 UTC (rev 89694)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html 2011-06-24 19:36:44 UTC (rev 89695)
@@ -31,12 +31,13 @@
<script src=""
<script src=""
<script src=""
+ <script src=""
<script src=""
<script src=""
<script src=""
<script>
- var viewController = new ViewController(new WebKitBuildbot(), new Bugzilla('https://bugs.webkit.org/'));
+ var viewController = new ViewController(new WebKitBuildbot(), new Bugzilla('https://bugs.webkit.org/'), new Trac('http://trac.webkit.org/'));
</script>
</head>
<body>
Modified: trunk/Tools/ChangeLog (89694 => 89695)
--- trunk/Tools/ChangeLog 2011-06-24 19:29:16 UTC (rev 89694)
+++ trunk/Tools/ChangeLog 2011-06-24 19:36:44 UTC (rev 89695)
@@ -1,3 +1,26 @@
+2011-06-24 Adam Roben <[email protected]>
+
+ Add links to regression ranges in Trac to the TestFailures page
+
+ Fixes <http://webkit.org/b/61060> <rdar://problem/9452153> TestFailures page should provide
+ links to regression ranges in Trac
+
+ Reviewed by David Kilzer.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js: Added.
+ (Trac): This new class represents a particular instance of Trac for a single project.
+ (Trac.prototype.logURL): Returns the URL that can be used to see the log of the given
+ repository path between the two specified revisions
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
+ (ViewController): Added new trac argument.
+ (ViewController.prototype._displayBuilder): Moved code to create the DOM for the
+ passed/failed builds from here...
+ (ViewController.prototype._domForRegressionRange): ...to here. Now also includes a link to
+ Trac if there are multiple suspect revisions.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html: Pull in
+ Trac.js and pass a Trac instance for trac.webkit.org to the ViewController.
+
2011-05-17 Nat Duca <[email protected]>
Reviewed by James Robinson.