layout/tools/reftest/clean-reftest-output.pl

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rwxr-xr-x

Ignore runtime configuration files generated during quality assurance.

michael@0 1 #!/usr/bin/perl
michael@0 2 # vim: set shiftwidth=4 tabstop=8 autoindent expandtab:
michael@0 3 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 6
michael@0 7 # This script is intended to be run over the standard output of a
michael@0 8 # reftest run. It will extract the parts of the output run relevant to
michael@0 9 # reftest and HTML-ize the URLs.
michael@0 10
michael@0 11 use strict;
michael@0 12
michael@0 13 print <<EOM
michael@0 14 <html>
michael@0 15 <head>
michael@0 16 <title>reftest output</title>
michael@0 17 </head>
michael@0 18 <body>
michael@0 19 <pre>
michael@0 20 EOM
michael@0 21 ;
michael@0 22
michael@0 23 while (<>) {
michael@0 24 next unless /REFTEST/;
michael@0 25 chomp;
michael@0 26 chop if /\r$/;
michael@0 27 s,(TEST-)([^\|]*) \| ([^\|]*) \|(.*),\1\2: <a href="\3">\3</a>\4,;
michael@0 28 s,(IMAGE[^:]*): (data:.*),<a href="\2">\1</a>,;
michael@0 29 print;
michael@0 30 print "\n";
michael@0 31 }
michael@0 32
michael@0 33 print <<EOM
michael@0 34 </pre>
michael@0 35 </body>
michael@0 36 </html>
michael@0 37 EOM
michael@0 38 ;

mercurial