Diff
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html (93151 => 93152)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html 2011-08-16 20:47:24 UTC (rev 93151)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html 2011-08-16 20:57:28 UTC (rev 93152)
@@ -56,6 +56,8 @@
<script src=""
<script src=""
<script src=""
+<script src=""
+<script src=""
<!-- FIXME: We should have tests for these files! -->
<script src=""
Added: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/summary.js (0 => 93152)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/summary.js (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/summary.js 2011-08-16 20:57:28 UTC (rev 93152)
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+(function() {
+
+var g_actions = new ui.notifications.Stream();
+var g_info = new ui.notifications.Stream();
+
+var g_updateTimerId = 0;
+var g_testFailures = new base.UpdateTracker();
+
+function update()
+{
+ // FIXME: This should be a button with a progress element.
+ var updating = new ui.notifications.Info("Updating ...");
+ g_info.push(updating);
+
+ // FIXME: Also provide information on bot failures.
+ base.callInParallel([model.updateRecentCommits, model.updateResultsByBuilder], function() {
+ model.analyzeUnexpectedFailures(function(failureAnalysis) {
+ var key = failureAnalysis.newestPassingRevision + "+" + failureAnalysis.oldestFailingRevision;
+ var failure = g_testFailures.get(key);
+ if (!failure) {
+ failure = g_actions.push(new ui.notifications.TestFailures());
+ model.commitDataListForRevisionRange(failureAnalysis.newestPassingRevision + 1, failureAnalysis.oldestFailingRevision).forEach(function(commitData) {
+ failure.addCommitData(commitData);
+ });
+ }
+ failure.addFailureAnalysis(failureAnalysis);
+ g_testFailures.update(key, failure);
+ }, function() {
+ g_testFailures.purge(function(failure) {
+ failure.dismiss();
+ });
+ updating.dismiss();
+ });
+ });
+}
+
+$(document).ready(function() {
+ g_updateTimerId = window.setInterval(update, config.kUpdateFrequency);
+ document.body.insertBefore(g_actions, document.body.firstChild);
+ document.body.insertBefore(g_info, document.body.firstChild);
+ update();
+});
+
+})();
Property changes on: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/summary.js
___________________________________________________________________
Added: svn:eol-style
Added: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications.js (0 => 93152)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications.js (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications.js 2011-08-16 20:57:28 UTC (rev 93152)
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+var ui = ui || {};
+ui.notifications = ui.notifications || {};
+
+(function(){
+
+ui.notifications.Stream = base.extends('ol', {
+ init: function()
+ {
+ this.className = 'notifications';
+ },
+ push: function(notification)
+ {
+ this.insertBefore(notification, this.firstChild);
+ return notification;
+ }
+});
+
+var Notification = base.extends('li', {
+ init: function()
+ {
+ this._what = this.appendChild(document.createElement('div'));
+ this._what.className = 'what';
+ $(this).hide().fadeIn('fast');
+ },
+ dismiss: function()
+ {
+ // FIXME: These fade in/out effects are lame.
+ $(this).fadeOut(function()
+ {
+ this.parentNode && this.parentNode.removeChild(this);
+ });
+ }
+});
+
+ui.notifications.Info = base.extends(Notification, {
+ init: function(message)
+ {
+ this._what.textContent = message;
+ }
+});
+
+var Time = base.extends('time', {
+ init: function()
+ {
+ this.updateTime("Just Now");
+ },
+ updateTime: function(time)
+ {
+ // FIXME: Implement displaying actual time.
+ // FIXME: Implement relative time.
+ this.textContent = time;
+ }
+});
+
+ui.notifications.FailingTest = base.extends('li', {
+ init: function(failureAnalysis)
+ {
+ // FIXME: Show type of failure and where it's failing.
+ this.textContent = failureAnalysis.testName;
+ }
+})
+
+var Cause = base.extends('li', {
+ init: function()
+ {
+ this._description = this.appendChild(document.createElement('div'));
+ this._description.className = 'description';
+ var actions = this.appendChild(document.createElement('ul'));
+ actions.className = 'actions';
+ // FIXME: Actions should do something.
+ actions.appendChild(document.createElement('li')).innerHTML = '<button>Roll out</button>';
+ }
+});
+
+ui.notifications.SuspiciousCommit = base.extends(Cause, {
+ init: function(commitData)
+ {
+ var linkToRevision = this._description.appendChild(document.createElement('a'));
+ // FIXME: Set href.
+ linkToRevision.href = '';
+ linkToRevision.textContent = commitData.revision;
+ // FIXME: Reviewer could be unknown.
+ // FIXME: Provide opportunities to style title/author/reviewer separately.
+ this._description.appendChild(document.createTextNode(commitData.title + ' ' + commitData.author + ' (' + commitData.reviewer + ')'));
+ }
+});
+
+ui.notifications.TestFailures = base.extends(Notification, {
+ init: function()
+ {
+ this._time = this.insertBefore(new Time(), this.firstChild);
+ var problem = this._what.appendChild(document.createElement('div'));
+ problem.className = 'problem';
+ this._tests = problem.appendChild(document.createElement('ul'));
+ this._tests.className = 'effects';
+ this._causes = problem.appendChild(document.createElement('ul'));
+ this._causes.className = 'causes';
+ },
+ addFailureAnalysis: function(failureAnalysis)
+ {
+ // FIXME: Add in order.
+ // FIXME: Don't add more than once.
+ // FIXME: Retrieve date from failureAnalysis and set this._time.
+ return this._tests.appendChild(new ui.notifications.FailingTest(failureAnalysis));
+ },
+ addCommitData: function(commitData)
+ {
+ return this._causes.appendChild(new ui.notifications.SuspiciousCommit(commitData));
+ }
+});
+
+})();
Property changes on: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications.js
___________________________________________________________________
Added: svn:eol-style
Added: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js (0 => 93152)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js 2011-08-16 20:57:28 UTC (rev 93152)
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+(function () {
+
+module('ui.notifications');
+
+test('ui.notifications.Stream', 5, function() {
+ var stream = new ui.notifications.Stream();
+ equal(stream.tagName, 'OL');
+ equal(stream.className, 'notifications');
+ stream.push(document.createElement('li')).textContent = 'o-matic';
+ equal(stream.childElementCount, 1);
+ stream.push(document.createElement('li')).textContent = 'garden-';
+ equal(stream.childElementCount, 2);
+ equal(stream.textContent, 'garden-o-matic');
+});
+
+test('ui.notifications.Info', 3, function() {
+ var info = new ui.notifications.Info('info');
+ equal(info.tagName, 'LI');
+ equal(info.innerHTML, '<div class="what">info</div>');
+ // FIXME: Really need to figure out how to mock/test animated removal.
+ ok(info.dismiss);
+});
+
+test('ui.notifications.FailingTest', 2, function() {
+ var failingTest = new ui.notifications.FailingTest({testName: 'test'});
+ equal(failingTest.tagName, 'LI');
+ equal(failingTest.innerHTML, 'test');
+});
+
+test('ui.notifications.SuspiciousCommit', 2, function() {
+ var suspiciousCommit = new ui.notifications.SuspiciousCommit({revision: 1, title: "title", author: "author", reviewer: "reviewer"});
+ equal(suspiciousCommit.tagName, 'LI');
+ equal(suspiciousCommit.innerHTML, '<div class="description"><a href="" author (reviewer)</div><ul class="actions"><li><button>Roll out</button></li></ul>');
+});
+
+test('ui.notifications.TestFailures', 4, function() {
+ var testFailures = new ui.notifications.TestFailures();
+ equal(testFailures.tagName, 'LI');
+ equal(testFailures.innerHTML, '<time>Just Now</time><div class="what"><div class="problem"><ul class="effects"></ul><ul class="causes"></ul></div></div>');
+ testFailures.addFailureAnalysis({testName: 'test'});
+ equal(testFailures.innerHTML, '<time>Just Now</time><div class="what"><div class="problem"><ul class="effects"><li>test</li></ul><ul class="causes"></ul></div></div>');
+ testFailures.addCommitData({revision: 1, title: "title", author: "author", reviewer: "reviewer"});
+ equal(testFailures.innerHTML, '<time>Just Now</time><div class="what"><div class="problem"><ul class="effects"><li>test</li></ul><ul class="causes"><li><div class="description"><a href="" author (reviewer)</div><ul class="actions"><li><button>Roll out</button></li></ul></li></ul></div></div>');
+});
+
+}());
Property changes on: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js
___________________________________________________________________
Added: svn:eol-style
Added: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/styles/summary.css (0 => 93152)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/styles/summary.css (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/styles/summary.css 2011-08-16 20:57:28 UTC (rev 93152)
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+ol.notifications {
+ list-style: none;
+ padding: 0;
+}
+
+ol.notifications ul {
+ list-style: none;
+ padding: 0;
+}
+
+ol.notifications>li {
+ display: -webkit-box;
+ width: 100%;
+ padding: 10px 0;
+ border: 1px solid LightGray;
+}
+
+ol.notifications>li>time {
+ padding: 0 0 0 10px;
+ text-align: right;
+ width: 100px;
+}
+
+ol.notifications>li>div.what {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ padding: 0 10px;
+ -webkit-box-flex: 1;
+}
+
+ol.notifications>li ul.causes>li {
+ padding: 10px;
+ border: 1px solid Red;
+}
+
+ol.notifications>li ul.causes>li ul.actions {
+ text-align: right;
+}
+
+ol.notifications>li ul.causes>li li {
+ padding: 10px 0 0 0;
+ display: inline;
+}
\ No newline at end of file
Property changes on: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/styles/summary.css
___________________________________________________________________
Added: svn:eol-style
Added: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/summary.html (0 => 93152)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/summary.html (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/summary.html 2011-08-16 20:57:28 UTC (rev 93152)
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<!--
+Copyright (C) 2011 Google Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+
+The favicons are from the awesome famfamfam.com, which is the website of Mark
+James, a web developer from Birmingham, UK.
+-->
+<html>
+<head>
+<title>Garden-O-Matic Summary View</title>
+<link rel="stylesheet" href=""
+</head>
+<body>
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+</body>
+</html>
Property changes on: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/summary.html
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Tools/ChangeLog (93151 => 93152)
--- trunk/Tools/ChangeLog 2011-08-16 20:47:24 UTC (rev 93151)
+++ trunk/Tools/ChangeLog 2011-08-16 20:57:28 UTC (rev 93152)
@@ -1,3 +1,17 @@
+2011-08-16 Dimitri Glazkov <dglaz...@chromium.org>
+
+ garden-o-matic needs a summary view with actions for each problem.
+ https://bugs.webkit.org/show_bug.cgi?id=66144
+
+ Reviewed by Adam Barth.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html: Added notifications tests.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/summary.js: Added.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications.js: Added.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js: Added.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/styles/summary.css: Added.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/summary.html: Added.
+
2011-08-16 Dean Jackson <d...@apple.com>
Adding Ted "hober" O'Connor as a non-committing contributor.