Module: tools Branch: master Commit: 27cbeb672b21ea9694aa4d28442b6c00ec046896 URL: http://source.winehq.org/git/tools.git/?a=commit;h=27cbeb672b21ea9694aa4d284...
Author: Francois Gouget fgouget@free.fr Date: Fri Mar 14 17:31:24 2008 +0100
winetest: We have one test executable per dll, and each contains multiple unit tests. Align the variable names accordingly.
---
winetest/dissect | 20 ++++++++++---------- winetest/gather | 18 +++++++++--------- 2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/winetest/dissect b/winetest/dissect index 0d017fc..f3a0f13 100755 --- a/winetest/dissect +++ b/winetest/dissect @@ -151,27 +151,27 @@ if (/^Dll info:\r?$/) { }
/Test output:\r?/ or mydie "no test header: $_"; -my ($unit, $test, $source, $rev, $result); +my ($dll, $unit, $source, $rev, $result); my ($lines,$total, $todo, $failed, $skipped); -$unit = undef; # state machine starts +$dll = undef; # state machine starts $total = $todo = $failed = $skipped = 0; $lines = 0; while (<IN>) { - if (!defined $unit) { # new test + if (!defined $dll) { # new test next if /^\s*$/; m[([_.a-z0-9]+):([_a-z0-9]+) start ([/_.a-z0-9]+) (-|[.0-9]+)\r?$] or mydie "no start line:$.: $_"; - ($unit,$test,$source,$rev) = ($1,$2,$3,$4); + ($dll,$unit,$source,$rev) = ($1,$2,$3,$4); open OUT, ">:raw", $tmpfile or mydie "can't open $tmpfile: $!\n"; print OUT; - } elsif (/^(.*$test.*: (\d+) tests executed ((\d+) marked as todo, (\d+) failures?), (\d+) skipped.)\r?$/) { + } elsif (/^(.*$unit.*: (\d+) tests executed ((\d+) marked as todo, (\d+) failures?), (\d+) skipped.)\r?$/) { $lines++; $total += $2; $todo += $3; $failed += $4; $skipped += $5; print OUT; - } elsif (/$unit:$test done ((-?\d+))\r?$/) { + } elsif (/$dll:$unit done ((-?\d+))\r?$/) { chomp; # current test ended if ($lines==0) { $result = "failed $1 - -"; @@ -179,22 +179,22 @@ while (<IN>) { $result = "$total $todo $failed $skipped"; } FINISH: - print SUM "- $unit $test $result $source $rev\n"; + print SUM "- $dll $unit $result $source $rev\n"; print OUT; close OUT or mydie "error writing $tmpfile: $!\n"; if (-s $tmpfile) { - my $testfile = "$tmpdir/${unit}:${test}.txt"; + my $testfile = "$tmpdir/$dll:$unit.txt"; rename $tmpfile, $testfile or mydie "can't rename $tmpfile to $testfile: $!\n"; } - $unit = undef; + $dll = undef; $total = $todo = $failed = $skipped = 0; $lines = 0; } else { # current test output print OUT; } } -if (defined $unit) { +if (defined $dll) { # Either winetest crashed or the report file was cut off $_=""; if ($filesize == $maxfilesize) { diff --git a/winetest/gather b/winetest/gather index bf84b24..9f46589 100755 --- a/winetest/gather +++ b/winetest/gather @@ -102,13 +102,13 @@ foreach my $file (glob "$datadir/$build/*/summary.txt") { next; } while (<TEST>) { - my ($digest, $unit, $test, $count, $todo, $error, $skipped, + my ($digest, $dll, $unit, $count, $todo, $error, $skipped, $source, $rev) = split; - my $testname = "$unit:$test"; + my $testname = "$dll:$unit"; # Leave this in for older type reports - if ($test =~ /_dll_missing/) { + if ($unit =~ /_dll_missing/) { # Mark the dll as missing on this system - $testref->{dllmissing}->{$unit} = 1; + $testref->{dllmissing}->{$dll} = 1; next; } $testref->{results}->{$testname} = [$count, $todo, $error, $skipped]; @@ -159,7 +159,7 @@ foreach my $group (@groups) { if (!exists $test->{results}->{$testname}) { # Make sure missing tests are shown in the group results $group->{digests}->{$testname} = "differ"; - my ($dll, $subtest) = split(/:/, $testname); + my ($dll, $unit) = split(/:/, $testname); my $crash = $test->{crash}; my $filelimit = $test->{filelimit}; if (exists $test->{dllmissing}->{$dll}) { @@ -253,13 +253,13 @@ print OUT <<"EOF"; <table class="report"> <thead> <tr> - <th class="test">unit:test</th> + <th class="test">dll:unit_test</th> $header </tr> </thead> <tfoot> <tr> - <th class="test">unit:test</th> + <th class="test">dll:unit_test</th> $header </tr> </tfoot> @@ -392,13 +392,13 @@ EOF <table class="report"> <thead> <tr> - <th class="test">unit:test</th> + <th class="test">dll:unit_test</th> $header </tr> </thead> <tfoot> <tr> - <th class="test">unit:test</th> + <th class="test">dll:unit_test</th> $header </tr> </tfoot>