Title: [89926] trunk/Tools
Revision
89926
Author
[email protected]
Date
2011-06-28 07:39:06 -0700 (Tue, 28 Jun 2011)

Log Message

Roll out r89924 and r89925

I didn't mean to commit them!

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestHistoryAnalyzer.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Utilities.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestHistoryAnalyzer.js (89925 => 89926)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestHistoryAnalyzer.js	2011-06-28 14:34:34 UTC (rev 89925)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestHistoryAnalyzer.js	2011-06-28 14:39:06 UTC (rev 89926)
@@ -25,13 +25,8 @@
 
 function LayoutTestHistoryAnalyzer(builder) {
     this._builder = builder;
+    this._history = {};
     this._loader = new LayoutTestResultsLoader(builder);
-
-    this._currentlyFailing = {};
-    this._lastSeenFailing = {};
-    this._lastSeenPassing = {};
-    this._possiblyFlaky = {};
-    this._testRunsSinceLastChange = 0;
 }
 
 LayoutTestHistoryAnalyzer.prototype = {
@@ -67,7 +62,7 @@
                     var nextIndex = buildIndex + 1;
                     if (nextIndex >= buildNames.length)
                         callAgain = false;
-                    callback(self._currentlyFailing, self._lastSeenFailing, self._lastSeenPassing, self._possiblyFlaky, buildNames[buildIndex], callAgain);
+                    callback(self._history, callAgain);
                     if (!callAgain)
                         return;
                     setTimeout(function() { inner(nextIndex) }, 0);
@@ -78,57 +73,26 @@
     },
 
     _incorporateBuildHistory: function(buildNames, buildIndex, callback) {
-        var buildName = buildNames[buildIndex];
+        var previousBuildName = Object.keys(this._history).last();
+        var nextBuildName = buildNames[buildIndex];
+
         var self = this;
-        self._loader.start(buildName, function(tests, tooManyFailures) {
-            ++self._testRunsSinceLastChange;
+        self._loader.start(nextBuildName, function(tests, tooManyFailures) {
+            self._history[nextBuildName] = {
+                tooManyFailures: tooManyFailures,
+                tests: {},
+            };
 
-            if (!Object.keys(self._currentlyFailing).length) {
-                for (var testName in tests)
-                    self._currentlyFailing[testName] = [{ build: buildName, result: tests[testName] }];
-            }
-
             for (var testName in tests) {
-                if (testName in self._possiblyFlaky) {
-                    self._possiblyFlaky[testName].push({ build: buildName, result: tests[testName] });
-                    continue;
+                if (previousBuildName) {
+                    if (!(testName in self._history[previousBuildName].tests))
+                        continue;
+                    delete self._history[previousBuildName].tests[testName];
                 }
-
-                if (testName in self._lastSeenPassing) {
-                    self._possiblyFlaky[testName] = self._lastSeenPassing[testName];
-                    delete self._lastSeenPassing[testName];
-                    self._possiblyFlaky[testName].push({ build: buildName, result: tests[testName] });
-                    self._testRunsSinceLastChange = 0;
-                    continue;
-                }
-
-                if (!(testName in self._lastSeenFailing))
-                    self._lastSeenFailing[testName] = [];
-                self._lastSeenFailing[testName].push({ build: buildName, result: tests[testName] });
+                self._history[nextBuildName].tests[testName] = tests[testName];
             }
 
-            var anyOriginalTestsWereFailing = Object.keys(self._currentlyFailing).some(function(testName) { return testName in self._lastSeenFailing });
-
-            for (var testName in self._lastSeenFailing) {
-                if (testName in tests)
-                    continue;
-                self._lastSeenPassing[testName] = self._lastSeenFailing[testName];
-                delete self._lastSeenFailing[testName];
-                self._lastSeenPassing[testName].push({ build: buildName, result: 'pass' });
-            }
-
-            for (var testName in self._possiblyFlaky) {
-                if (testName in tests)
-                    continue;
-                self._possiblyFlaky[testName].push({ build: buildName, result: 'pass' });
-            }
-
-            var anyOriginalTestsAreFailing = Object.keys(self._currentlyFailing).some(function(testName) { return testName in self._lastSeenFailing });
-
-            if (anyOriginalTestsWereFailing && !anyOriginalTestsAreFailing)
-                self._testRunsSinceLastChange = 0;
-
-            callback(anyOriginalTestsAreFailing || self._testRunsSinceLastChange < 5);
+            callback(Object.keys(self._history[nextBuildName].tests).length);
         },
         function(tests) {
             // Some tests failed, but we couldn't fetch results.html (perhaps because the test

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Utilities.js (89925 => 89926)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Utilities.js	2011-06-28 14:34:34 UTC (rev 89925)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Utilities.js	2011-06-28 14:39:06 UTC (rev 89926)
@@ -103,12 +103,6 @@
     return result.join(separator);
 }
 
-function sorted(array) {
-    var newArray = array.slice();
-    newArray.sort();
-    return newArray;
-}
-
 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 (89925 => 89926)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js	2011-06-28 14:34:34 UTC (rev 89925)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js	2011-06-28 14:39:06 UTC (rev 89926)
@@ -48,48 +48,9 @@
 
     _displayBuilder: function(builder) {
         var self = this;
-        (new LayoutTestHistoryAnalyzer(builder)).start(function(currentlyFailing, lastSeenFailing, lastSeenPassing, possiblyFlaky, buildName, stillFetchingData) {
-            var list = document.createElement('ul');
+        (new LayoutTestHistoryAnalyzer(builder)).start(function(history, stillFetchingData) {
+            var list = document.createElement('ol');
             list.id = 'failure-history';
-            var item = document.createElement('li');
-            list.appendChild(item);
-            item.appendChild(document.createTextNode(buildName));
-
-            var lists = {
-                'Currently Failing': currentlyFailing,
-                'Last Seen Failing': lastSeenFailing,
-                'Last Seen Passing': lastSeenPassing,
-                'Possibly Flaky': possiblyFlaky,
-            };
-
-            for (var listLabel in lists) {
-                var item = document.createElement('li');
-                list.appendChild(item);
-                item.appendChild(document.createTextNode(listLabel));
-                var testList = document.createElement('ol');
-                item.appendChild(testList);
-
-                var testNames = sorted(Object.keys(lists[listLabel]));
-                testList.appendChildren(testNames.map(function(test) {
-                    var item = document.createElement('li');
-                    item.appendChild(document.createTextNode(test));
-                    var list = document.createElement('ol');
-                    item.appendChild(list);
-                    list.appendChildren(lists[listLabel][test].reduce(function(reduced, currentValue, index) {
-                        if (index && currentValue.result === reduced.last().result)
-                            return reduced;
-                        return reduced.concat(currentValue);
-                    }, []).map(function(result) {
-                        var item = document.createElement('li');
-                        item.appendChild(document.createTextNode(result.build + ': ' + result.result));
-                        return item;
-                    }));
-                    return item;
-                }));
-                if (!stillFetchingData && testNames.length)
-                    item.appendChild(self._domForNewAndExistingBugs(builder, buildName, null, testNames));
-            }
-            /*
             Object.keys(history).forEach(function(buildName, buildIndex, buildNameArray) {
                 var failingTestNames = Object.keys(history[buildName].tests);
                 if (!failingTestNames.length)
@@ -124,7 +85,6 @@
                 if (passingBuildName || !stillFetchingData)
                     item.appendChild(self._domForNewAndExistingBugs(builder, buildName, passingBuildName, failingTestNames));
             });
-            */
 
             var header = document.createElement('h1');
             header.appendChild(document.createTextNode(builder.name));

Modified: trunk/Tools/ChangeLog (89925 => 89926)


--- trunk/Tools/ChangeLog	2011-06-28 14:34:34 UTC (rev 89925)
+++ trunk/Tools/ChangeLog	2011-06-28 14:39:06 UTC (rev 89926)
@@ -1,3 +1,13 @@
+2011-06-28  Adam Roben  <[email protected]>
+
+        Roll out r89924 and r89925
+
+        I didn't mean to commit them!
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestHistoryAnalyzer.js:
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Utilities.js:
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
+
 2011-06-27  Adam Barth  <[email protected]>
 
         Reviewed by Eric Seidel.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to