build.webkit.org/dashboard should have diff links in test results popovers
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Jan 2014 02:08:49 +0000 (02:08 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Jan 2014 02:08:49 +0000 (02:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=126986

Reviewed by Tim Horton.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js:
(Buildbot.prototype.layoutTestCrashLogURLForIteration):
(Buildbot.prototype.layoutTestStderrURLForIteration):
(Buildbot.prototype.layoutTestDiffURLForIteration):
(Buildbot.prototype.layoutTestPrettyDiffURLForIteration):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype.loadLayoutTestResults):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype._popoverContentForLayoutTestRegressions):

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

Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js
Tools/ChangeLog

index 67e5224..be4d9f6 100644 (file)
@@ -103,13 +103,26 @@ Buildbot.prototype = {
 
     layoutTestCrashLogURLForIteration: function(iteration, testPath)
     {
-        var crashLogPath = testPath.replace(/^(.*)\.(?:.*)$/, "$1-crash-log.txt");
-        return this.layoutTestResultsDirectoryURLForIteration(iteration) + "/" + crashLogPath;
+        var path = testPath.replace(/^(.*)\.(?:.*)$/, "$1-crash-log.txt");
+        return this.layoutTestResultsDirectoryURLForIteration(iteration) + "/" + path;
     },
 
     layoutTestStderrURLForIteration: function(iteration, testPath)
     {
-        var crashLogPath = testPath.replace(/^(.*)\.(?:.*)$/, "$1-stderr.txt");
-        return this.layoutTestResultsDirectoryURLForIteration(iteration) + "/" + crashLogPath;
+        var path = testPath.replace(/^(.*)\.(?:.*)$/, "$1-stderr.txt");
+        return this.layoutTestResultsDirectoryURLForIteration(iteration) + "/" + path;
+    },
+
+    layoutTestDiffURLForIteration: function(iteration, testPath)
+    {
+        var path = testPath.replace(/^(.*)\.(?:.*)$/, "$1-diff.txt");
+        return this.layoutTestResultsDirectoryURLForIteration(iteration) + "/" + path;
+    },
+
+    layoutTestPrettyDiffURLForIteration: function(iteration, testPath)
+    {
+        // pretty-patch may not be available, caller should check JSON results for has_pretty_patch attribute.
+        var path = testPath.replace(/^(.*)\.(?:.*)$/, "$1-pretty-diff.html");
+        return this.layoutTestResultsDirectoryURLForIteration(iteration) + "/" + path;
     }
 };
index 80ce0d4..7b4c8ed 100644 (file)
@@ -274,12 +274,22 @@ BuildbotIteration.prototype = {
 
                     if (predicate(value)) {
                         var item = {path: key};
+
+                        // FIXME (bug 127186): Crash log URL will be incorrect if crash only happened on retry (e.g. "TEXT CRASH").
+                        // It should point to retries subdirectory, but the information about which attempt failed gets lost here.
                         if (value.actual.contains("CRASH"))
                             item.crash = true;
                         if (value.actual.contains("TIMEOUT"))
                             item.timeout = true;
+
+                        // FIXME (bug 127186): Similarly, we don't have a good way to present results for something like "TIMEOUT TEXT",
+                        // not even UI wise. For now, only show a diff link if the first attempt has the diff.
+                        if (value.actual.split(" ")[0].contains("TEXT"))
+                            item.has_diff = true;
+
                         if (value.has_stderr)
                             item.has_stderr = true;
+
                         result.push(item);
                     }
 
@@ -301,6 +311,8 @@ BuildbotIteration.prototype = {
                 return;
             }
 
+            this.hasPrettyPatch = data.has_pretty_patch;
+
             this.layoutTestResults.regressions = collectResults(data.tests, function(info) { return info["report"] === "REGRESSION" });
             console.assert(data.num_regressions === this.layoutTestResults.regressions.length);
 
index ba866aa..28dd17e 100644 (file)
@@ -179,6 +179,24 @@ BuildbotTesterQueueView.prototype = {
                 rowElement.appendChild(failureKindElement);
             }
 
+            if (test.has_diff) {
+                var diffElement = document.createElement("a");
+                diffElement.className = "additional-link"
+                diffElement.textContent = "diff";
+                diffElement.href = iteration.queue.buildbot.layoutTestDiffURLForIteration(iteration, test.path);
+                diffElement.target = "_blank";
+                rowElement.appendChild(diffElement);
+
+                if (iteration.hasPrettyPatch) {
+                    var prettyDiffElement = document.createElement("a");
+                    prettyDiffElement.className = "additional-link"
+                    prettyDiffElement.textContent = "pretty\xa0diff";
+                    prettyDiffElement.href = iteration.queue.buildbot.layoutTestPrettyDiffURLForIteration(iteration, test.path);
+                    prettyDiffElement.target = "_blank";
+                    rowElement.appendChild(prettyDiffElement);
+                }
+            }
+
             if (test.has_stderr) {
                 var stderrElement = document.createElement("a");
                 stderrElement.className = "additional-link"
index 2bc302b..263fe78 100644 (file)
@@ -1,3 +1,20 @@
+2014-01-17  Alexey Proskuryakov  <ap@apple.com>
+
+        build.webkit.org/dashboard should have diff links in test results popovers
+        https://bugs.webkit.org/show_bug.cgi?id=126986
+
+        Reviewed by Tim Horton.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js:
+        (Buildbot.prototype.layoutTestCrashLogURLForIteration):
+        (Buildbot.prototype.layoutTestStderrURLForIteration):
+        (Buildbot.prototype.layoutTestDiffURLForIteration):
+        (Buildbot.prototype.layoutTestPrettyDiffURLForIteration):
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
+        (BuildbotIteration.prototype.loadLayoutTestResults):
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
+        (BuildbotTesterQueueView.prototype._popoverContentForLayoutTestRegressions):
+
 2014-01-17  Matthew Hanson  <matthew_hanson@apple.com>
 
         Add the bare minimum support for branches to the bot-watchers dashboard