Changeset 90121 in webkit


Ignore:
Timestamp:
Jun 30, 2011, 8:30:32 AM (14 years ago)
Author:
Adam Roben
Message:

Include the crashing symbol in crash logs links on TestFailures

Fixes <http://webkit.org/b/63465> Links to crash logs on TestFailures page should include
the crashing symbol (like links in results.html do)

Reviewed by David Kilzer.

  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js:

(LayoutTestResultsLoader.prototype.start): Bumped the cache version because we now store
crashing symbols for crashing tests. Renamed testsForResultTable to parseResultTable because
it now returns more than just the test names. Specifically, it now looks for crash log links
and extracts the crashing symbol name from them. Updated callers of parseResultTable to
match its new behavior. Changed to store the crashing symbol along with the failure type in
the data we pass to the callback for tests which crashed.

  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailures.css:

(code): Make <code> elements a little smaller because their contents can be quite long.

  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:

(ViewController.prototype._domForFailureDiagnosis): Include the crashing symbol inside a
<code> element in the link, if there is a crashing symbol.

Location:
trunk/Tools
Files:
4 edited

Legend:

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

    r90120 r90121  
    3131    start: function(buildName, callback, errorCallback) {
    3232        var cacheKey = 'LayoutTestResultsLoader.' + this._builder.name + '.' + buildName;
    33         const currentCachedDataVersion = 1;
     33        const currentCachedDataVersion = 2;
    3434        if (PersistentCache.contains(cacheKey)) {
    3535            var cachedData = PersistentCache.get(cacheKey);
     
    5757                    result.tooManyFailures = root.getElementsByClassName('stopped-running-early-message').length > 0;
    5858
    59                 function testsForResultTable(regex) {
     59                function parseResultTable(regex) {
    6060                    var paragraph = Array.prototype.findFirst.call(root.querySelectorAll('p'), function(paragraph) {
    6161                        return regex.test(paragraph.innerText);
     
    6565                    var table = paragraph.nextElementSibling;
    6666                    console.assert(table.nodeName === 'TABLE');
    67                     return Array.prototype.map.call(table.querySelectorAll('td:first-child > a'), function(elem) {
    68                         return elem.innerText;
     67                    return Array.prototype.map.call(table.rows, function(row) {
     68                        var links = row.getElementsByTagName('a');
     69                        var result = {
     70                            name: links[0].innerText,
     71                        };
     72                        for (var i = 1; i < links.length; ++i) {
     73                            var match = /^crash log \((.*)\)$/.exec(links[i].innerText);
     74                            if (!match)
     75                                continue;
     76                            result.crashingSymbol = match[1];
     77                            break;
     78                        }
     79                        return result;
    6980                    });
    7081                }
    7182
    72                 testsForResultTable(/did not match expected results/).forEach(function(name) {
    73                     result.tests[name] = { failureType: 'fail' };
     83                parseResultTable(/did not match expected results/).forEach(function(testData) {
     84                    result.tests[testData.name] = { failureType: 'fail' };
    7485                });
    75                 testsForResultTable(/timed out/).forEach(function(name) {
    76                     result.tests[name] = { failureType: 'timeout' };
     86                parseResultTable(/timed out/).forEach(function(testData) {
     87                    result.tests[testData.name] = { failureType: 'timeout' };
    7788                });
    78                 testsForResultTable(/tool to crash/).forEach(function(name) {
    79                     result.tests[name] = { failureType: 'crash' };
     89                parseResultTable(/tool to crash/).forEach(function(testData) {
     90                    result.tests[testData.name] = {
     91                        failureType: 'crash',
     92                        crashingSymbol: testData.crashingSymbol,
     93                    };
    8094                });
    81                 testsForResultTable(/Web process to crash/).forEach(function(name) {
    82                     result.tests[name] = { failureType: 'webprocess crash' };
     95                parseResultTable(/Web process to crash/).forEach(function(testData) {
     96                    result.tests[testData.name] = {
     97                        failureType: 'webprocess crash',
     98                        crashingSymbol: testData.crashingSymbol,
     99                    };
    83100                });
    84101
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailures.css

    r90115 r90121  
    44    right: 5px;
    55    color: #888;
     6    font-size: 0.9em;
     7}
     8
     9code {
    610    font-size: 0.9em;
    711}
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js

    r90120 r90121  
    261261            return document.createTextNode(testResult.failureType);
    262262
    263         var textNode = document.createTextNode(diagnosticInfo.text);
     263        var textAndCrashingSymbol = document.createDocumentFragment();
     264        textAndCrashingSymbol.appendChild(document.createTextNode(diagnosticInfo.text));
     265        if (testResult.crashingSymbol) {
     266            var code = document.createElement('code');
     267            code.appendChild(document.createTextNode(testResult.crashingSymbol));
     268            textAndCrashingSymbol.appendChild(document.createTextNode(' ('));
     269            textAndCrashingSymbol.appendChild(code);
     270            textAndCrashingSymbol.appendChild(document.createTextNode(')'));
     271        }
     272
    264273        if (!('url' in diagnosticInfo))
    265             return textNode;
     274            return textAndCrashingSymbol;
    266275
    267276        var link = document.createElement('a');
    268277        link.href = diagnosticInfo.url;
    269         link.appendChild(textNode);
     278        link.appendChild(textAndCrashingSymbol);
    270279        return link;
    271280    },
  • trunk/Tools/ChangeLog

    r90120 r90121  
     12011-06-30  Adam Roben  <aroben@apple.com>
     2
     3        Include the crashing symbol in crash logs links on TestFailures
     4
     5        Fixes <http://webkit.org/b/63465> Links to crash logs on TestFailures page should include
     6        the crashing symbol (like links in results.html do)
     7
     8        Reviewed by David Kilzer.
     9
     10        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js:
     11        (LayoutTestResultsLoader.prototype.start): Bumped the cache version because we now store
     12        crashing symbols for crashing tests. Renamed testsForResultTable to parseResultTable because
     13        it now returns more than just the test names. Specifically, it now looks for crash log links
     14        and extracts the crashing symbol name from them. Updated callers of parseResultTable to
     15        match its new behavior. Changed to store the crashing symbol along with the failure type in
     16        the data we pass to the callback for tests which crashed.
     17
     18        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailures.css:
     19        (code): Make <code> elements a little smaller because their contents can be quite long.
     20
     21        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
     22        (ViewController.prototype._domForFailureDiagnosis): Include the crashing symbol inside a
     23        <code> element in the link, if there is a crashing symbol.
     24
    1252011-06-30  Adam Roben  <aroben@apple.com>
    226
Note: See TracChangeset for help on using the changeset viewer.