1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/tools/reftest/clean-reftest-output.pl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,38 @@ 1.4 +#!/usr/bin/perl 1.5 +# vim: set shiftwidth=4 tabstop=8 autoindent expandtab: 1.6 +# This Source Code Form is subject to the terms of the Mozilla Public 1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.9 + 1.10 +# This script is intended to be run over the standard output of a 1.11 +# reftest run. It will extract the parts of the output run relevant to 1.12 +# reftest and HTML-ize the URLs. 1.13 + 1.14 +use strict; 1.15 + 1.16 +print <<EOM 1.17 +<html> 1.18 +<head> 1.19 +<title>reftest output</title> 1.20 +</head> 1.21 +<body> 1.22 +<pre> 1.23 +EOM 1.24 +; 1.25 + 1.26 +while (<>) { 1.27 + next unless /REFTEST/; 1.28 + chomp; 1.29 + chop if /\r$/; 1.30 + s,(TEST-)([^\|]*) \| ([^\|]*) \|(.*),\1\2: <a href="\3">\3</a>\4,; 1.31 + s,(IMAGE[^:]*): (data:.*),<a href="\2">\1</a>,; 1.32 + print; 1.33 + print "\n"; 1.34 +} 1.35 + 1.36 +print <<EOM 1.37 +</pre> 1.38 +</body> 1.39 +</html> 1.40 +EOM 1.41 +;