Roll out r89924 and r89925
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jun 2011 14:39:06 +0000 (14:39 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jun 2011 14:39:06 +0000 (14:39 +0000)
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@89926 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestHistoryAnalyzer.js
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Utilities.js
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js
Tools/ChangeLog

index 5dcc75a4eecb22f59d5a70b539afa32054de5a26..96bf594d1222405651a248732ca948db0b964159 100644 (file)
 
 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 @@ LayoutTestHistoryAnalyzer.prototype = {
                     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 @@ LayoutTestHistoryAnalyzer.prototype = {
     },
 
     _incorporateBuildHistory: function(buildNames, buildIndex, callback) {
-        var buildName = buildNames[buildIndex];
-        var self = this;
-        self._loader.start(buildName, function(tests, tooManyFailures) {
-            ++self._testRunsSinceLastChange;
+        var previousBuildName = Object.keys(this._history).last();
+        var nextBuildName = buildNames[buildIndex];
 
-            if (!Object.keys(self._currentlyFailing).length) {
-                for (var testName in tests)
-                    self._currentlyFailing[testName] = [{ build: buildName, result: tests[testName] }];
-            }
+        var self = this;
+        self._loader.start(nextBuildName, function(tests, tooManyFailures) {
+            self._history[nextBuildName] = {
+                tooManyFailures: tooManyFailures,
+                tests: {},
+            };
 
             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
index 00f49ea7794032badb5499e95b10510f4b613a2a..ff7356a03482a5de7d58f31a7813b4ab85ffbb8c 100644 (file)
@@ -103,12 +103,6 @@ function longestCommonPathPrefix(paths) {
     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]))
index 3eb5acbbaf1d186a25c0ea3c52a07cb89731aa05..15b9fee107ac6b7f89824bd7f215bba7da6efa08 100644 (file)
@@ -48,48 +48,9 @@ ViewController.prototype = {
 
     _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 @@ ViewController.prototype = {
                 if (passingBuildName || !stillFetchingData)
                     item.appendChild(self._domForNewAndExistingBugs(builder, buildName, passingBuildName, failingTestNames));
             });
-            */
 
             var header = document.createElement('h1');
             header.appendChild(document.createTextNode(builder.name));
index f58f00e37c7ef4d80f7166b4167326c823bd3863..8f342c15cafea9e63cd2e2d6f7c4c5745acc1123 100644 (file)
@@ -1,3 +1,13 @@
+2011-06-28  Adam Roben  <aroben@apple.com>
+
+        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  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.