Changeset 90639 in webkit


Ignore:
Timestamp:
Jul 8, 2011 9:09:24 AM (13 years ago)
Author:
Adam Roben
Message:

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.

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js

    r90153 r90639  
    7171                var container = document.createElement('div');
    7272                container.innerHTML = item.getElementsByTagName('description')[0].textContent;
    73                 var listItems = container.querySelectorAll('li');
    74                 var files = [];
    75                 for (var i = 0; i < listItems.length; ++i) {
    76                     var match = /^([^:]+)/.exec(listItems[i].textContent);
    77                     if (!match)
    78                         continue;
    79                     files.push(match[1]);
    80                 }
    8173
    8274                return {
    8375                    revision: revision,
    8476                    title: title,
    85                     modifiedFiles: files,
     77                    // FIXME: This isn't a very high-fidelity reproduction of the commit message,
     78                    // but it's good enough for our purposes.
     79                    message: container.innerText,
    8680                };
    8781            });
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js

    r90594 r90639  
    205205            var failingTestNamesWithoutExtensions = failingTestNames.map(removePathExtension);
    206206            var suspectCommits = commits.filter(function(commit) {
    207                 return commit.modifiedFiles.some(function(file) {
    208                     return failingTestNamesWithoutExtensions.some(function(testName) {
    209                         return file.indexOf(testName) >= 0;
    210                     });
     207                return failingTestNamesWithoutExtensions.some(function(testName) {
     208                    return commit.message.contains(testName);
    211209                });
    212210            });
  • trunk/Tools/ChangeLog

    r90636 r90639  
     12011-07-08  Adam Roben  <aroben@apple.com>
     2
     3        Teach TestFailures how to find test names in commit-log-editor-style commit messages
     4
     5        TestFailures was relying on Trac turning the list of modified files in our commit messages
     6        into an HTML list. But Trac only does this when the list of modified files is indented.
     7        commit-log-editor doesn't indent the file list, so the list wasn't being turned into an HTML
     8        list, which was confusing TestFailures.
     9
     10        TestFailures now does much simpler parsing of the commit message (i.e., just a substring
     11        search) without relying at all on its structure.
     12
     13        Fixes <http://webkit.org/b/64173> TestFailures page fails to blame r90608 for breaking
     14        fast/dom/HTMLProgressElement/progress-element-markup.html on Windows
     15
     16        Reviewed by David Kilzer.
     17
     18        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js:
     19        (Trac.prototype.getCommitDataForRevisionRange): Instead of trying to parse the commit
     20        message, just return its text.
     21
     22        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
     23        (ViewController.prototype._domForRegressionRange): Instead of searching for test names in
     24        each commit's list of modified files, just search for test names anywhere in the commit's
     25        message.
     26
    1272011-07-08  Adam Barth  <abarth@webkit.org>
    228
Note: See TracChangeset for help on using the changeset viewer.