Skip to content
Permalink
Browse files
Correctly detect cases where only a single test failed/crashed/timed out
Fixes <http://webkit.org/b/61463> TestFailures page doesn't show testers with only a single
failing test

Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js:
(Builder.prototype.getNumberOfFailingTests): Don't require "test cases" to be plural. It
will be singular when only a single test fails/crashes/times out.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
(ViewController.prototype._displayTesters): Only pluralize "test" when more than one test
failed/crashed/timed out.

Canonical link: https://commits.webkit.org/76929@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
aroben committed May 26, 2011
1 parent 919b7c0 commit d8d5b36834c878bbf13372b4a5936d1cd1e5a922
Showing 3 changed files with 19 additions and 2 deletions.
@@ -125,7 +125,7 @@ Builder.prototype = {
tooManyFailures = true;

var failureCount = layoutTestStep.results[1].reduce(function(sum, outputLine) {
var match = /^(\d+) test cases/.exec(outputLine);
var match = /^(\d+) test case/.exec(outputLine);
if (!match)
return sum;
return sum + parseInt(match[1], 10);
@@ -104,7 +104,7 @@ ViewController.prototype = {
if (buildInfo.tooManyFailures)
item.appendChild(document.createTextNode(' (too many failures/crashes/timeouts)'));
else
item.appendChild(document.createTextNode(' (' + buildInfo.failureCount + ' failing tests)'));
item.appendChild(document.createTextNode(' (' + buildInfo.failureCount + ' failing test' + (buildInfo.failureCount > 1 ? 's' : '') + ')'));
list.appendChild(item);
});
}
@@ -1,3 +1,20 @@
2011-05-25 Adam Roben <aroben@apple.com>

Correctly detect cases where only a single test failed/crashed/timed out

Fixes <http://webkit.org/b/61463> TestFailures page doesn't show testers with only a single
failing test

Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js:
(Builder.prototype.getNumberOfFailingTests): Don't require "test cases" to be plural. It
will be singular when only a single test fails/crashes/times out.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
(ViewController.prototype._displayTesters): Only pluralize "test" when more than one test
failed/crashed/timed out.

2011-05-26 Tom Hudson <tomhudson@google.com>

Reviewed by Tony Chang.

0 comments on commit d8d5b36

Please sign in to comment.