Closed
Bug 747440
Opened 13 years ago
Closed 10 years ago
getParsedLog.php should inject screenshots from base64 PNGs in failed buildlogs
Categories
(Tree Management Graveyard :: TBPL, defect)
Tree Management Graveyard
TBPL
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: humph, Unassigned)
Details
(Keywords: sheriffing-P2)
Often there are base64 PNGs for screenshots of the build machine when a test failed. In build logs they look like:
82388 ERROR TEST-UNEXPECTED-FAIL | /tests/content/media/test/test_timeupdate_small_files.html | Test timed out.
args: ['arch', '-arch', 'i386', '/usr/sbin/screencapture', '-C', '-x', '-t', 'png', '/var/folders/Xr/Xr--yJnSEY0U11ET5NZuMU+++TM/-Tmp-/mozilla-test-fail_xWbqI7']
SCREENSHOT: data:image/png;base64,iVBORw0KGgoAAAANSU....\n
It would be nice if, at the top of the page, where we have Summary links for the failed tests, we injected <img>s with those dataurls as srcs, so you could just look at what happened.
Comment 1•13 years ago
|
||
*great* idea.
One tiny moderating detail: there can be a lot of big-ish images, so be sure to inject those img src at runtime on user request, rather than automatically, so we don't decode images we don't have to (decoding lots of big images can ultrajank your browser).
| Reporter | ||
Comment 2•13 years ago
|
||
Here's a start:
function renderScreenShots() {
var preTags = document.getElementsByTagName('pre'),
imgContainer = preTags[1],
log = preTags[2].textContent,
screenshotRegex = /^SCREENSHOT\: (data\:image\/png\;base64\,[^\n]+)\n/gm,
matches,
img;
while ((matches = screenshotRegex.exec(log)) !== null) {
img = new Image();
img.src = matches[1];
imgContainer.insertBefore(img, preTags[2]);
}
}
As a bookmarklet:
<a href="javascript:(function(){var preTags=document.getElementsByTagName('pre'),imgContainer=preTags[1],log=preTags[2].textContent,screenshotReg\
ex=/^SCREENSHOT\: (data\:image\/png\;base64\,[^\n]+)\n/gm,matches,img;while((matches=screenshotRegex.exec(log))!==null){img=new Image();img.src=m\
atches[1];imgContainer.insertBefore(img,preTags[2]);}})();">Extract Screenshots</a>
| Reporter | ||
Comment 3•13 years ago
|
||
NOTE: the build log uses <pre><pre>...build log body here...</pre></pre> (and one more <pre> previous to that in the head matter), so this is tightly coupled to that layout.
Updated•13 years ago
|
Whiteboard: [sheriff-want]
Updated•12 years ago
|
Keywords: sheriffing-untriaged
Whiteboard: [sheriff-want]
Updated•12 years ago
|
| Assignee | ||
Updated•11 years ago
|
Product: Webtools → Tree Management
| Assignee | ||
Updated•10 years ago
|
Product: Tree Management → Tree Management Graveyard
Comment 4•10 years ago
|
||
Bug 1151550 filed for Treeherder.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•