Title: [90121] trunk/Tools
- Revision
- 90121
- Author
- [email protected]
- Date
- 2011-06-30 08:30:32 -0700 (Thu, 30 Jun 2011)
Log 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.
Modified Paths
Diff
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js (90120 => 90121)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js 2011-06-30 15:30:18 UTC (rev 90120)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js 2011-06-30 15:30:32 UTC (rev 90121)
@@ -30,7 +30,7 @@
LayoutTestResultsLoader.prototype = {
start: function(buildName, callback, errorCallback) {
var cacheKey = 'LayoutTestResultsLoader.' + this._builder.name + '.' + buildName;
- const currentCachedDataVersion = 1;
+ const currentCachedDataVersion = 2;
if (PersistentCache.contains(cacheKey)) {
var cachedData = PersistentCache.get(cacheKey);
if (cachedData.version === currentCachedDataVersion) {
@@ -56,7 +56,7 @@
if (resultsHTMLSupportsTooManyFailuresInfo)
result.tooManyFailures = root.getElementsByClassName('stopped-running-early-message').length > 0;
- function testsForResultTable(regex) {
+ function parseResultTable(regex) {
var paragraph = Array.prototype.findFirst.call(root.querySelectorAll('p'), function(paragraph) {
return regex.test(paragraph.innerText);
});
@@ -64,22 +64,39 @@
return [];
var table = paragraph.nextElementSibling;
console.assert(table.nodeName === 'TABLE');
- return Array.prototype.map.call(table.querySelectorAll('td:first-child > a'), function(elem) {
- return elem.innerText;
+ return Array.prototype.map.call(table.rows, function(row) {
+ var links = row.getElementsByTagName('a');
+ var result = {
+ name: links[0].innerText,
+ };
+ for (var i = 1; i < links.length; ++i) {
+ var match = /^crash log \((.*)\)$/.exec(links[i].innerText);
+ if (!match)
+ continue;
+ result.crashingSymbol = match[1];
+ break;
+ }
+ return result;
});
}
- testsForResultTable(/did not match expected results/).forEach(function(name) {
- result.tests[name] = { failureType: 'fail' };
+ parseResultTable(/did not match expected results/).forEach(function(testData) {
+ result.tests[testData.name] = { failureType: 'fail' };
});
- testsForResultTable(/timed out/).forEach(function(name) {
- result.tests[name] = { failureType: 'timeout' };
+ parseResultTable(/timed out/).forEach(function(testData) {
+ result.tests[testData.name] = { failureType: 'timeout' };
});
- testsForResultTable(/tool to crash/).forEach(function(name) {
- result.tests[name] = { failureType: 'crash' };
+ parseResultTable(/tool to crash/).forEach(function(testData) {
+ result.tests[testData.name] = {
+ failureType: 'crash',
+ crashingSymbol: testData.crashingSymbol,
+ };
});
- testsForResultTable(/Web process to crash/).forEach(function(name) {
- result.tests[name] = { failureType: 'webprocess crash' };
+ parseResultTable(/Web process to crash/).forEach(function(testData) {
+ result.tests[testData.name] = {
+ failureType: 'webprocess crash',
+ crashingSymbol: testData.crashingSymbol,
+ };
});
PersistentCache.set(cacheKey, result);
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailures.css (90120 => 90121)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailures.css 2011-06-30 15:30:18 UTC (rev 90120)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailures.css 2011-06-30 15:30:32 UTC (rev 90121)
@@ -6,6 +6,10 @@
font-size: 0.9em;
}
+code {
+ font-size: 0.9em;
+}
+
ol {
list-style-type: none;
}
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js (90120 => 90121)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js 2011-06-30 15:30:18 UTC (rev 90120)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js 2011-06-30 15:30:32 UTC (rev 90121)
@@ -260,13 +260,22 @@
if (!diagnosticInfo)
return document.createTextNode(testResult.failureType);
- var textNode = document.createTextNode(diagnosticInfo.text);
+ var textAndCrashingSymbol = document.createDocumentFragment();
+ textAndCrashingSymbol.appendChild(document.createTextNode(diagnosticInfo.text));
+ if (testResult.crashingSymbol) {
+ var code = document.createElement('code');
+ code.appendChild(document.createTextNode(testResult.crashingSymbol));
+ textAndCrashingSymbol.appendChild(document.createTextNode(' ('));
+ textAndCrashingSymbol.appendChild(code);
+ textAndCrashingSymbol.appendChild(document.createTextNode(')'));
+ }
+
if (!('url' in diagnosticInfo))
- return textNode;
+ return textAndCrashingSymbol;
var link = document.createElement('a');
link.href = ""
- link.appendChild(textNode);
+ link.appendChild(textAndCrashingSymbol);
return link;
},
Modified: trunk/Tools/ChangeLog (90120 => 90121)
--- trunk/Tools/ChangeLog 2011-06-30 15:30:18 UTC (rev 90120)
+++ trunk/Tools/ChangeLog 2011-06-30 15:30:32 UTC (rev 90121)
@@ -1,5 +1,29 @@
2011-06-30 Adam Roben <[email protected]>
+ 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.
+
+2011-06-30 Adam Roben <[email protected]>
+
Use objects instead of strings to represent a test result in TestFailures code
This will eventually allow us to store more than just the type of failure for each test.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes