Teach TestFailures how to find test names in commit-log-editor-style commit messages
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jul 2011 16:09:24 +0000 (16:09 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jul 2011 16:09:24 +0000 (16:09 +0000)
TestFailures was relying on Trac turning the list of modified files in our commit messages
into an HTML list. But Trac only does this when the list of modified files is indented.
commit-log-editor doesn't indent the file list, so the list wasn't being turned into an HTML
list, which was confusing TestFailures.

TestFailures now does much simpler parsing of the commit message (i.e., just a substring
search) without relying at all on its structure.

Fixes <http://webkit.org/b/64173> TestFailures page fails to blame r90608 for breaking
fast/dom/HTMLProgressElement/progress-element-markup.html on Windows

Reviewed by David Kilzer.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js:
(Trac.prototype.getCommitDataForRevisionRange): Instead of trying to parse the commit
message, just return its text.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
(ViewController.prototype._domForRegressionRange): Instead of searching for test names in
each commit's list of modified files, just search for test names anywhere in the commit's
message.

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

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

index 88650b2..1c35e9f 100644 (file)
@@ -70,19 +70,13 @@ Trac.prototype = {
 
                 var container = document.createElement('div');
                 container.innerHTML = item.getElementsByTagName('description')[0].textContent;
-                var listItems = container.querySelectorAll('li');
-                var files = [];
-                for (var i = 0; i < listItems.length; ++i) {
-                    var match = /^([^:]+)/.exec(listItems[i].textContent);
-                    if (!match)
-                        continue;
-                    files.push(match[1]);
-                }
 
                 return {
                     revision: revision,
                     title: title,
-                    modifiedFiles: files,
+                    // FIXME: This isn't a very high-fidelity reproduction of the commit message,
+                    // but it's good enough for our purposes.
+                    message: container.innerText,
                 };
             });
 
index 36c53e2..6dd27a1 100644 (file)
@@ -204,10 +204,8 @@ ViewController.prototype = {
         self._trac.getCommitDataForRevisionRange('trunk', firstSuspectRevision, lastSuspectRevision, function(commits) {
             var failingTestNamesWithoutExtensions = failingTestNames.map(removePathExtension);
             var suspectCommits = commits.filter(function(commit) {
-                return commit.modifiedFiles.some(function(file) {
-                    return failingTestNamesWithoutExtensions.some(function(testName) {
-                        return file.indexOf(testName) >= 0;
-                    });
+                return failingTestNamesWithoutExtensions.some(function(testName) {
+                    return commit.message.contains(testName);
                 });
             });
 
index e5171d4..6a7757e 100644 (file)
@@ -1,3 +1,29 @@
+2011-07-08  Adam Roben  <aroben@apple.com>
+
+        Teach TestFailures how to find test names in commit-log-editor-style commit messages
+
+        TestFailures was relying on Trac turning the list of modified files in our commit messages
+        into an HTML list. But Trac only does this when the list of modified files is indented.
+        commit-log-editor doesn't indent the file list, so the list wasn't being turned into an HTML
+        list, which was confusing TestFailures.
+
+        TestFailures now does much simpler parsing of the commit message (i.e., just a substring
+        search) without relying at all on its structure.
+
+        Fixes <http://webkit.org/b/64173> TestFailures page fails to blame r90608 for breaking
+        fast/dom/HTMLProgressElement/progress-element-markup.html on Windows
+
+        Reviewed by David Kilzer.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js:
+        (Trac.prototype.getCommitDataForRevisionRange): Instead of trying to parse the commit
+        message, just return its text.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
+        (ViewController.prototype._domForRegressionRange): Instead of searching for test names in
+        each commit's list of modified files, just search for test names anywhere in the commit's
+        message.
+
 2011-07-08  Adam Barth  <abarth@webkit.org>
 
         sheriffbot is too spammy in IRC