Title: [89702] trunk/Tools
- Revision
- 89702
- Author
- [email protected]
- Date
- 2011-06-24 13:54:23 -0700 (Fri, 24 Jun 2011)
Log Message
Include the directory containing the failing tests in titles of bugs filed from TestFailures when all the tests won't fit
Fixes <http://webkit.org/b/63350> Short bug titles from TestFailures page give no indication
which tests are failing
Reviewed by David Kilzer.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Utilities.js:
(longestCommonPathPrefix): Added. Given a set of paths, returns the longest common prefix
that ends in a path separator.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
(ViewController.prototype._domForNewAndExistingBugs): When we can't fit all the test names
in the title, first try to include the longest common prefix of the test names, then, if
that's still too long or there's no common prefix, fall back to not including any
information about which tests are failing.
Modified Paths
Diff
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Utilities.js (89701 => 89702)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Utilities.js 2011-06-24 20:53:51 UTC (rev 89701)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Utilities.js 2011-06-24 20:54:23 UTC (rev 89702)
@@ -85,6 +85,24 @@
return url + urlEncodeQueryParameters(queryParameters);
}
+function longestCommonPathPrefix(paths) {
+ const separator = '/';
+
+ var splitPaths = paths.map(function(path) { return path.split(separator) });
+ var firstSplitPath = splitPaths.shift();
+
+ var result = [];
+ for (var i = 0; i < firstSplitPath.length; ++i) {
+ if (!splitPaths.every(function(splitPath) { return splitPath[i] === firstSplitPath[i] }))
+ break;
+ result.push(firstSplitPath[i]);
+ }
+
+ if (!result.length)
+ return null;
+ return result.join(separator);
+}
+
Array.prototype.findFirst = function(predicate) {
for (var i = 0; i < this.length; ++i) {
if (predicate(this[i]))
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js (89701 => 89702)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js 2011-06-24 20:53:51 UTC (rev 89701)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js 2011-06-24 20:54:23 UTC (rev 89702)
@@ -295,8 +295,13 @@
var titlePrefix = 'REGRESSION (' + regressionRangeString + '): ';
var titleSuffix = ' failing on ' + tester.name;
var title = titlePrefix + failingTests.join(', ') + titleSuffix;
- if (title.length > Bugzilla.maximumBugTitleLength)
- title = titlePrefix + failingTests.length + ' tests' + titleSuffix;
+ if (title.length > Bugzilla.maximumBugTitleLength) {
+ var pathPrefix = longestCommonPathPrefix(failingTests);
+ if (pathPrefix)
+ title = titlePrefix + failingTests.length + ' ' + pathPrefix + ' tests' + titleSuffix;
+ if (title.length > Bugzilla.maximumBugTitleLength)
+ title = titlePrefix + failingTests.length + ' tests' + titleSuffix;
+ }
console.assert(title.length <= Bugzilla.maximumBugTitleLength);
var firstSuspectRevision = parsedPassingBuildName ? parsedPassingBuildName.revision + 1 : parsedFailingBuildName.revision;
Modified: trunk/Tools/ChangeLog (89701 => 89702)
--- trunk/Tools/ChangeLog 2011-06-24 20:53:51 UTC (rev 89701)
+++ trunk/Tools/ChangeLog 2011-06-24 20:54:23 UTC (rev 89702)
@@ -1,5 +1,25 @@
2011-06-24 Adam Roben <[email protected]>
+ Include the directory containing the failing tests in titles of bugs filed from TestFailures
+ when all the tests won't fit
+
+ Fixes <http://webkit.org/b/63350> Short bug titles from TestFailures page give no indication
+ which tests are failing
+
+ Reviewed by David Kilzer.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Utilities.js:
+ (longestCommonPathPrefix): Added. Given a set of paths, returns the longest common prefix
+ that ends in a path separator.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
+ (ViewController.prototype._domForNewAndExistingBugs): When we can't fit all the test names
+ in the title, first try to include the longest common prefix of the test names, then, if
+ that's still too long or there's no common prefix, fall back to not including any
+ information about which tests are failing.
+
+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
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes