diff --git a/ChangeLog b/ChangeLog index 922d611bd..db2a01d04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-01-03 Vladimir Vukicevic + + * test/make-html.pl: Clean up output some; show only images that + fail, otherwise just show pass/fail squares. + 2005-12-30 Emmanuel Pacaud * src/cairo-svg-surface.c (_cairo_svg_surface_create_for_document): no diff --git a/test/make-html.pl b/test/make-html.pl index 7d7cf2521..f4bbb8c88 100755 --- a/test/make-html.pl +++ b/test/make-html.pl @@ -29,6 +29,19 @@ ## html to stdout that can be used to view all the test results at once. ## +# some config options: + +# show reference images +my $config_show_ref = 0; + +# show fail images +my $config_show_fail = 1; + +# show all results, even passes +my $config_show_all = 0; + +# end of config options + my $tests = {}; my $teststats = {}; @@ -73,29 +86,38 @@ sub printl { printl ''; printl 'Cairo Test Results'; printl ''; printl ''; printl ''; -print ''; +print ''; +print '' if $config_show_ref; + foreach my $target (@targets) { print ''; } printl ''; -print ''; +print ''; +print '' if $config_show_ref; + foreach my $target (@targets) { print ''; } printl ''; @@ -125,10 +147,9 @@ sub testfiles { foreach my $test (sort(keys %$tests)) { foreach my $format (@formats) { - print ''; + my $testline = ""; - my $testref = testref($test, $format); - print ""; + my $num_failed = 0; foreach my $target (@targets) { my $tgtdata = $tests->{$test}->{$target}; @@ -136,23 +157,47 @@ foreach my $test (sort(keys %$tests)) { my $testres = $tgtdata->{$format}; if ($testres) { my %testfiles = testfiles($test, $target, $format); - print ""; - } elsif ($testres eq "FAIL" || $testres eq "XFAIL") { - print "

"; - print ""; + if ($config_show_all) { + $testline .= ""; + } + } elsif ($testres eq "FAIL") { + $num_failed++; + + if ($config_show_fail || $config_show_all) { + $testline .= ""; + $testline .= "
"; + $testline .= ""; + } + } elsif ($testres eq "XFAIL") { + #nothing + if ($config_show_all) { + $testline .= ""; + $testline .= "
"; + $testline .= ""; + } } - print ""; + + $testline .= ""; } else { - print ''; + $testline .= ''; } } else { - print ''; + $testline .= ''; } } + my $testref = testref($test, $format); + print ''; + + if ($config_show_ref) { + print ""; + } + + print $testline; + print "\n"; } }
TestRef
TestRef', $target, '
'; - print 'PASS: ', $teststats->{$target}->{"PASS"}, '
'; - print 'FAIL: ', $teststats->{$target}->{"FAIL"}, '
'; - print 'XFAIL: ', $teststats->{$target}->{"XFAIL"}, '
'; - print 'UNTESTED: ', $teststats->{$target}->{"UNTESTED"}; + print '', $teststats->{$target}->{"PASS"}, '/'; + print '', $teststats->{$target}->{"FAIL"}, '/'; + print '', $teststats->{$target}->{"XFAIL"}, '/'; + print '', $teststats->{$target}->{"UNTESTED"}; ''; print '
', $test, ' (', $format, ')"; + $testline .= ""; $stats{$target}{$testres}++; if ($testres eq "PASS") { - print "
', "", $test, ' (', $format, ')