Title: [89619] trunk/Tools
- Revision
- 89619
- Author
- [email protected]
- Date
- 2011-06-23 14:47:00 -0700 (Thu, 23 Jun 2011)
Log Message
Avoid fetching JSON data when possible on TestFailures page to determine if old-run-webkit-tests exited early
As of r89610, results.html includes information about whether old-run-webkit-tests exited
early, so we don't need to look at JSON data to get this information for builds newer than
that.
Fixes <http://webkit.org/b/63281> TestFailures page fetches build JSON for every build,
which is slow and limits history to the last build master restart
Reviewed by David Kilzer.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js:
(Builder.prototype._getFailingTests): Moved code dealing with results.html into a new
function. If we're dealing with a build that has early-exit information in results.html,
don't bother fetching JSON data and go straight to parsing results.html. Otherwise first use
the JSON data to determine if old-run-webkit-tests exited early, and then parse results.html
(as before).
Modified Paths
Diff
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js (89618 => 89619)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js 2011-06-23 21:43:33 UTC (rev 89618)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js 2011-06-23 21:47:00 UTC (rev 89619)
@@ -243,29 +243,21 @@
var tests = {};
- var buildNumber = this.buildbot.parseBuildName(buildName).buildNumber;
+ var parsedBuildName = this.buildbot.parseBuildName(buildName);
+ // http://webkit.org/b/62380 was fixed in r89610.
+ var resultsHTMLSupportsTooManyFailuresInfo = parsedBuildName.revision >= 89610;
+
var self = this;
- self.getNumberOfFailingTests(buildNumber, function(failingTestCount, tooManyFailures) {
- if (failingTestCount < 0) {
- // The number of failing tests couldn't be determined.
- PersistentCache.set(cacheKey, tests);
- errorCallback(tests, tooManyFailures);
- return;
- }
- if (!failingTestCount) {
- // All tests passed.
- PersistentCache.set(cacheKey, tests);
- callback(tests, tooManyFailures);
- return;
- }
-
- // Find out which tests failed.
+ function fetchAndParseResultsHTMLAndCallCallback(callback, tooManyFailures) {
getResource(self.resultsPageURL(buildName), function(xhr) {
var root = document.createElement('html');
root.innerHTML = xhr.responseText;
+ if (resultsHTMLSupportsTooManyFailuresInfo)
+ tooManyFailures = root.getElementsByClassName('stopped-running-early-message').length > 0;
+
function testsForResultTable(regex) {
var paragraph = Array.prototype.findFirst.call(root.querySelectorAll('p'), function(paragraph) {
return regex.test(paragraph.innerText);
@@ -300,6 +292,30 @@
PersistentCache.set(cacheKey, tests);
errorCallback(tests, tooManyFailures);
});
+ }
+
+ if (resultsHTMLSupportsTooManyFailuresInfo) {
+ fetchAndParseResultsHTMLAndCallCallback(callback, false);
+ return;
+ }
+
+ self.getNumberOfFailingTests(parsedBuildName.buildNumber, function(failingTestCount, tooManyFailures) {
+ if (failingTestCount < 0) {
+ // The number of failing tests couldn't be determined.
+ PersistentCache.set(cacheKey, tests);
+ errorCallback(tests, tooManyFailures);
+ return;
+ }
+
+ if (!failingTestCount) {
+ // All tests passed.
+ PersistentCache.set(cacheKey, tests);
+ callback(tests, tooManyFailures);
+ return;
+ }
+
+ // Find out which tests failed.
+ fetchAndParseResultsHTMLAndCallCallback(callback, tooManyFailures);
});
},
Modified: trunk/Tools/ChangeLog (89618 => 89619)
--- trunk/Tools/ChangeLog 2011-06-23 21:43:33 UTC (rev 89618)
+++ trunk/Tools/ChangeLog 2011-06-23 21:47:00 UTC (rev 89619)
@@ -1,3 +1,24 @@
+2011-06-23 Adam Roben <[email protected]>
+
+ Avoid fetching JSON data when possible on TestFailures page to determine if
+ old-run-webkit-tests exited early
+
+ As of r89610, results.html includes information about whether old-run-webkit-tests exited
+ early, so we don't need to look at JSON data to get this information for builds newer than
+ that.
+
+ Fixes <http://webkit.org/b/63281> TestFailures page fetches build JSON for every build,
+ which is slow and limits history to the last build master restart
+
+ Reviewed by David Kilzer.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js:
+ (Builder.prototype._getFailingTests): Moved code dealing with results.html into a new
+ function. If we're dealing with a build that has early-exit information in results.html,
+ don't bother fetching JSON data and go straight to parsing results.html. Otherwise first use
+ the JSON data to determine if old-run-webkit-tests exited early, and then parse results.html
+ (as before).
+
2011-06-23 Eric Seidel <[email protected]>
Reviewed by Adam Barth.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes