Diff
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js (91617 => 91618)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js 2011-07-22 23:26:54 UTC (rev 91617)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js 2011-07-22 23:30:14 UTC (rev 91618)
@@ -27,21 +27,67 @@
(function() {
+function findUsingRegExp(string, regexp)
+{
+ var match = regexp.exec(string);
+ if (match)
+ return match[1];
+ return null;
+}
+
+function findReviewer(message)
+{
+ var regexp = /Reviewed by ([^.]+)/;
+ return findUsingRegExp(message, regexp);
+}
+
+function findBugID(message)
+{
+ var regexp = /\/show_bug.cgi\?id=(\d+)/;
+ return parseInt(findUsingRegExp(message, regexp), 10);
+}
+
+function findRevision(title)
+{
+ var regexp = /^Revision (\d+):/;
+ return parseInt(findUsingRegExp(title, regexp), 10);
+}
+
+function findSummary(message)
+{
+ var lines = message.split('\n');
+ for (var i = 0; i < lines.length; ++i) {
+ var line = lines[i]
+ if (findBugID(line))
+ continue;
+ if (findReviewer(line))
+ continue;
+ if (line.length > 0)
+ return line;
+ }
+}
+
+// FIXME: Consider exposing this method for unit testing.
function parseCommitData(responseXML)
{
var commits = Array.prototype.map.call(responseXML.getElementsByTagName('item'), function(item) {
var title = item.getElementsByTagName('title')[0].textContent;
- var revision = parseInt(/^Revision (\d+):/.exec(title)[1], 10);
+ var author = item.getElementsByTagName('author')[0].textContent;
+ // FIXME: This isn't a very high-fidelity reproduction of the commit message,
+ // but it's good enough for our purposes.
var container = document.createElement('div');
container.innerHTML = item.getElementsByTagName('description')[0].textContent;
+ var message = container.innerText;
return {
- revision: revision,
- title: title,
- // FIXME: This isn't a very high-fidelity reproduction of the commit message,
- // but it's good enough for our purposes.
- message: container.innerText,
+ 'revision': findRevision(title),
+ 'title': title,
+ 'summary': findSummary(message),
+ 'author': author,
+ 'reviewer': findReviewer(message),
+ 'bugID': findBugID(message),
+ 'message': message,
};
});
@@ -82,6 +128,19 @@
return config.kTracURL + '/log/' + path + '?' + $.param(queryParameters);
};
+trac.recentCommitData = function(path, limit, callback)
+{
+ var url = "" + '/log/' + path + '?' + $.param({
+ 'verbose': 'on',
+ 'format': 'rss',
+ 'limit': limit,
+ });
+
+ $.get(url, function(commitData) {
+ callback(parseCommitData(commitData));
+ });
+};
+
trac.commitDataForRevisionRange = function(path, startRevision, endRevision, callback)
{
var key = [path, startRevision, endRevision].join('\n');
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/config.js (91617 => 91618)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/config.js 2011-07-22 23:26:54 UTC (rev 91617)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/config.js 2011-07-22 23:30:14 UTC (rev 91618)
@@ -31,6 +31,7 @@
config.kTracURL = 'http://trac.webkit.org';
+config.kRevisionAttr = 'data-revision';
config.kTestNameAttr = 'data-test-name';
config.kBuilderNameAttr = 'data-builder-name';
config.kFailureCountAttr = 'data-failure-count';
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html (91617 => 91618)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html 2011-07-22 23:26:54 UTC (rev 91617)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html 2011-07-22 23:30:14 UTC (rev 91618)
@@ -12,6 +12,7 @@
<body>
<div class="butterbar"><span class="status">Loading...</span></div>
<div class="alert"><span class="status"></span></div>
+<div class="recent-history"></div>
<div class="results">
<div class="content"></div>
<div class="toolbar">
@@ -34,6 +35,7 @@
<script src=""
<script src=""
<script src=""
+<script src=""
<script src=""
<script src=""
<script src=""
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.css (91617 => 91618)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.css 2011-07-22 23:26:54 UTC (rev 91617)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.css 2011-07-22 23:30:14 UTC (rev 91618)
@@ -134,6 +134,25 @@
margin: 0px 5px;
}
+/*** recent-history ***/
+
+.recent-history {
+ width: 300px;
+ float: left;
+}
+
+.changelog .entry {
+ margin: 10px 5px;
+}
+
+.changelog .details, .changelog .details a {
+ color: #555;
+}
+
+.changelog .author {
+ font-style: italic;
+}
+
/*** results-summary ***/
.results .toolbar {
@@ -144,7 +163,7 @@
table.results-summary {
width: auto;
table-layout: auto;
- margin: 5px auto;
+ margin: 5px;
border: 1px solid #c6c6c6;
}
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js (91617 => 91618)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js 2011-07-22 23:26:54 UTC (rev 91617)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js 2011-07-22 23:30:14 UTC (rev 91618)
@@ -1,9 +1,12 @@
(function() {
+var kFastLoadingDEBUG = false;
+
var g_updateTimerId = 0;
var g_resultsDetailsIterator = null;
var kBuildFailedAlertType = 'build-failed';
+var kCommitLogLength = 20;
function dismissButterbar()
{
@@ -99,14 +102,16 @@
var testSummary = ui.summarizeTest(testName, resultNodesByBuilder);
var builderNameList = base.keys(resultNodesByBuilder);
- results.unifyRegressionRanges(builderNameList, testName, function(oldestFailingRevision, newestPassingRevision) {
- $('.when', testSummary).append(ui.summarizeRegressionRange(oldestFailingRevision, newestPassingRevision));
- });
+ if (!kFastLoadingDEBUG) {
+ results.unifyRegressionRanges(builderNameList, testName, function(oldestFailingRevision, newestPassingRevision) {
+ $('.when', testSummary).append(ui.summarizeRegressionRange(oldestFailingRevision, newestPassingRevision));
+ });
- results.countFailureOccurances(builderNameList, testName, function(failureCount) {
- $(testSummary).attr(config.kFailureCountAttr, failureCount);
- $('.how-many', testSummary).text(ui.failureCount(failureCount));
- });
+ results.countFailureOccurances(builderNameList, testName, function(failureCount) {
+ $(testSummary).attr(config.kFailureCountAttr, failureCount);
+ $('.how-many', testSummary).text(ui.failureCount(failureCount));
+ });
+ }
callback(testSummary);
}
@@ -284,6 +289,15 @@
checkout.rebaseline(builderName, testName, failureTypeList, dismissButterbar);
}
+function updateRecentCommits()
+{
+ trac.recentCommitData('trunk', kCommitLogLength, function(commitDataList) {
+ var recentHistory = $('.recent-history');
+ recentHistory.empty();
+ recentHistory.append(ui.commitLog(commitDataList));
+ });
+}
+
function checkBuilderStatuses()
{
results.fetchBuildersWithCompileErrors(function(builderNameList) {
@@ -299,6 +313,7 @@
{
displayOnButterbar('Loading...');
updateResultsSummary(dismissButterbar);
+ updateRecentCommits();
checkBuilderStatuses();
}
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ui.js (91617 => 91618)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ui.js 2011-07-22 23:26:54 UTC (rev 91617)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ui.js 2011-07-22 23:30:14 UTC (rev 91618)
@@ -144,4 +144,24 @@
return block;
};
+ui.commitLog = function(commitDataList)
+{
+ var block = $('<div class="changelog"></div>');
+
+ $.each(commitDataList, function(index, commitData) {
+ var entry = $('<div class="entry"><div class="summary"></div><div class="details"><a target="_blank" class="revision"></a> <span class="author"></span> <span class="reviewer-container">(Reviewer: <span class="reviewer"></span>)</span></div></div>');
+ entry.attr(config.kRevisionAttr, commitData.revision);
+ $('.summary', entry).text(commitData.summary);
+ $('.revision', entry).attr('href', trac.changesetURL(commitData.revision)).text(displayNameForRevision(commitData.revision));
+ $('.author', entry).text(commitData.author);
+ if (commitData.reviewer)
+ $('.reviewer', entry).text(commitData.reviewer);
+ else
+ $('.reviewer-container', entry).detach();
+ block.append(entry);
+ });
+
+ return block;
+};
+
})();
Modified: trunk/Tools/ChangeLog (91617 => 91618)
--- trunk/Tools/ChangeLog 2011-07-22 23:26:54 UTC (rev 91617)
+++ trunk/Tools/ChangeLog 2011-07-22 23:30:14 UTC (rev 91618)
@@ -1,3 +1,27 @@
+2011-07-22 Adam Barth <aba...@webkit.org>
+
+ garden-o-matic should know what patches are landing
+ https://bugs.webkit.org/show_bug.cgi?id=64978
+
+ Reviewed by Dimitri Glazkov.
+
+ This patch adds a display of the recently committed patches to
+ garden-o-matic. The UI needs iteration, but this patch establishes the
+ plumbing.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js:
+ - Teach trac how to extract more information from the commit log.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/config.js:
+ - Add a data attribute for storing the revision.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:
+ - Add a container for the recent commit history.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.css:
+ - CSS for displaying non-ugly commit history.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js:
+ - Wire up trac to the UI container.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ui.js:
+ - A basic, compact display for a list of commits.
+
2011-07-22 Ojan Vafai <o...@chromium.org>
Fix bug when switching from layout-tests to another test-type if