WineHQ: Flexible source links for winetest

Ferenc Wagner wferi at afavant.elte.hu
Tue Mar 16 19:23:19 CST 2004


ChangeLog:
  * Added two optional fields in report files: source and
  revision, for correct CVS links.
  * LXR links are nuked.

This patch changes the internal format of summary.txt-s, so
the data directory should be emptied and all data
resubmitted.  Hope it's OK. :)

Feri.

Index: dissect
===================================================================
RCS file: /home/wine/tools/winetest/dissect,v
retrieving revision 1.3
diff -u -r1.3 dissect
--- dissect	15 Mar 2004 18:31:01 -0000	1.3
+++ dissect	17 Mar 2004 01:14:33 -0000
@@ -128,24 +128,25 @@
 
 /Test output:\r?/ or mydie "no test header: $_";
 my $fragment = Digest::MD5->new;
-my ($unit, $test, $result);
+my ($unit, $test, $source, $rev, $result);
 $unit = undef;                  # state machine starts
 while (<IN>) {
     if (!defined $unit) {       # new test
         next if /^\s*$/;
-        /([_.a-z0-9]+):([_a-z]+) start\r?$/ or mydie "no start line:$.: $_";
-        ($unit,$test) = ($1,$2);
+        m|([_.a-z0-9]+):([_a-z]+) start( [/_.a-z0-9]+( [0-9]+[.0-9]*)?)?\r?$|
+          or mydie "no start line:$.: $_";
+        ($unit,$test,$source,$rev) = ($1,$2,$3||"-",$4||"-");
         open OUT, ">:raw", $tmpfile or mydie "can't open $tmpfile: $!\n";
     } elsif (s/$unit:$test done \(.*\)\r?$//) {
         chomp;                  # current test failed
-        $result = "failed";
+        $result = "failed - -";
         goto FINISH;
     } elsif (s/^($test: (\d+) tests executed, (\d+) marked as todo, (\d+) failures?\.)\r?$/$1/) {
         <IN>;                   # current test finished
         $result = "$2 $3 $4";
       FINISH:
         $fragment->add($_);
-        print SUM $fragment->b64digest," $unit $test $result\n";
+        print SUM $fragment->b64digest, " $unit $test $result $source $rev\n";
         print OUT;
         close OUT or mydie "error writing $tmpfile: $!\n";
         if (-s $tmpfile) {
Index: gather
===================================================================
RCS file: /home/wine/tools/winetest/gather,v
retrieving revision 1.2
diff -u -r1.2 gather
--- gather	20 Feb 2004 17:15:23 -0000	1.2
+++ gather	17 Mar 2004 01:14:33 -0000
@@ -96,16 +96,16 @@
         next;
     }
     while (<TEST>) {
-        my ($digest, $unit, $test, $count, $todo, $error) = split;
+        my ($digest, $unit, $test, $count, $todo, $error,
+            $source, $rev) = split;
         my $testname = "$unit:$test";
         my $srcdir = $unitdir{$unit} || $unit;
-        $alltests{$testname} = ["http://source.winehq.org/source/dlls/$srcdir/tests/$test.c?v=wine$release", # for real releases only
-                                "http://cvs.winehq.org/cvsweb/wine/dlls/$srcdir/tests/$test.c"]
-          unless exists $alltests{$testname};
-        if ($count eq "failed") {
-            $testref->{results}->{$testname} = ["failed"];
-        } else {
-            $testref->{results}->{$testname} = [$count, $todo, $error];
+        $testref->{results}->{$testname} = [$count, $todo, $error];
+        $alltests{$testname} = "http://cvs.winehq.org/cvsweb/wine/".
+            ($source ne "-"?$source:"dlls/$srcdir/tests/$test.c").
+            ($rev ne "-"?"#rev$rev":"")
+            unless exists $alltests{$testname};
+        if ($count ne "failed") {
             if (defined $group->{extrema}->{$testname}) {
                 my $extrema = $group->{extrema}->{$testname};
                 $extrema->[0] = $error if $error < $extrema->[0];
@@ -225,8 +225,7 @@
     print OUT <<"EOF";
     <tr>
       <td class="test">
-        <a class="cvs" href="$alltests{$testname}->[1]">CVS</a>
-        <a href="$alltests{$testname}->[0]">$testname</a></td>
+        <a href="$alltests{$testname}">$testname</a></td>
 EOF
     foreach my $group (@groups) {
         if (!exists $group->{tests}) {
@@ -289,8 +288,7 @@
         print OUT <<"EOF";
     <tr>
       <td class="test">
-        <a class="cvs" href="$alltests{$testname}->[1]">CVS</a>
-        <a href="$alltests{$testname}->[0]">$testname</a></td>
+        <a href="$alltests{$testname}">$testname</a></td>
 EOF
         singletest ($_, $testname) foreach (@{$group->{tests}});
     }
Index: summary.css
===================================================================
RCS file: /home/wine/tools/winetest/summary.css,v
retrieving revision 1.1
diff -u -r1.1 summary.css
--- summary.css	19 Feb 2004 22:00:34 -0000	1.1
+++ summary.css	17 Mar 2004 01:14:33 -0000
@@ -53,10 +53,6 @@
         padding-left: 0;
         padding-right: 0;
 }
-table.report td.test a.cvs {
-        color: red;
-        font-size: 50%;
-}
 table.report td.test :link {
 	color: blue;
 }



More information about the wine-patches mailing list