[Commits] [svn:einsteintoolkit] www/release-info/ (Rev. 547)

knarf at cct.lsu.edu knarf at cct.lsu.edu
Sat Apr 16 23:46:51 CDT 2011


User: knarf
Date: 2011/04/16 11:46 PM

Modified:
 /release-info/
  parse_testsuite_results.cgi

Log:
 collapse info for thorns with completely passing testsuites

File Changes:

Directory: /release-info/
=========================

File [modified]: parse_testsuite_results.cgi
Delta lines: +42 -13
===================================================================
--- release-info/parse_testsuite_results.cgi	2011-04-14 11:44:57 UTC (rev 546)
+++ release-info/parse_testsuite_results.cgi	2011-04-17 04:46:51 UTC (rev 547)
@@ -78,6 +78,10 @@
         $results{$thorn}{$test}{$host}{$nprocs}{$nthreads} = ();
       }
       $results{$thorn}{$test}{$host}{$nprocs}{$nthreads}{"result"} = $result;
+      $results{$thorn}{$test}{$host}{$nprocs}{$nthreads}{"success"} = 0;
+      if ( $result =~ /Success/ ) {
+        $results{$thorn}{$test}{$host}{$nprocs}{$nthreads}{"success"} = 1;
+      }
       $results{$thorn}{$test}{$host}{$nprocs}{$nthreads}{"details"} = $details;
     } else {
       print "Not understood: $testline\n";
@@ -88,7 +92,9 @@
 # prepare output
 my %allhosts = ();
 my %alltests = ();
+my %thorn_passed = ();
 foreach my $thorn (sort(keys(%results))) {
+  $thorn_passed{$thorn} = 1;
   if (!defined($alltests{$thorn})) {
     $alltests{$thorn} = ();
   }
@@ -103,10 +109,19 @@
           if (!defined($allhosts{$host}{$nprocs})) {
             $allhosts{$host}{$nprocs} = ();
           }
-          $allhosts{$host}{$nprocs}{$nthreads} = {"success" => 0,
-                                                  "fail"    => 0,
-                                                  "ran"     => 0};
+          if (!defined($allhosts{$host}{$nprocs}{$nthreads}{"success"})) {
+            $allhosts{$host}{$nprocs}{$nthreads} = {"success" => 0,
+                                                    "fail"    => 0,
+                                                    "ran"     => 0};
           }
+          if (!$results{$thorn}{$test}{$host}{$nprocs}{$nthreads}{"success"}) {
+            $thorn_passed{$thorn} = 0;
+            $allhosts{$host}{$nprocs}{$nthreads}{"fail"}++;
+          } else {
+            $allhosts{$host}{$nprocs}{$nthreads}{"success"}++;
+          }
+          $allhosts{$host}{$nprocs}{$nthreads}{"ran"}++;
+        }
       }
     }
   }
@@ -134,9 +149,26 @@
 }
 $table_entries .= "</tr>\n";
 
+# main table body
 my $tr = "<tr>";
 foreach my $thorn (sort(keys(%alltests))) {
   my $nr_tests = scalar(keys(%{$alltests{$thorn}}));
+  # collapse tests of thorns passing all testsuites
+  if ($thorn_passed{$thorn} and defined($ignore)) {
+    $table_entries .= "$tr <td>$thorn</td>\n    <td>all tests passed ($nr_tests)</td>";
+    foreach my $host (sort(keys(%allhosts))) {
+      foreach my $nprocs (sort(keys(%{$allhosts{$host}}))) {
+        foreach my $nthreads (sort(keys(%{$allhosts{$host}{$nprocs}}))) {
+          if (!defined($ignore) or "$nprocs,$nthreads" !~ /$ignore/) {
+            my $bg = 1;
+            if ($nprocs != "1") { $bg = 2;}
+            $table_entries .= "<td class='c$bg'>&nbsp;</td>";
+          }}}
+    }
+    $table_entries .= "</tr>\n"; $tr="<tr>";
+  }
+  # full info for thorns with failing testsuites
+  else {
   $table_entries .= "$tr <td rowspan='$nr_tests'>$thorn</td>\n"; $tr="    ";
   foreach my $test (sort(keys(%{$alltests{$thorn}}))) {
     $table_entries .= " $tr<td>$test</td>";
@@ -149,18 +181,14 @@
         my $bg = 1;
         if ($nprocs != "1") { $bg = 2;}
         #
-        if (!defined($ignore) or "$nprocs,$nthreads" !~ /$ignore/)
-        {
+        if (!defined($ignore) or "$nprocs,$nthreads" !~ /$ignore/) {
           if (defined($results{$thorn}{$test}{$host}) and
               defined($results{$thorn}{$test}{$host}{$nprocs}) and
               defined($results{$thorn}{$test}{$host}{$nprocs}{$nthreads})) {
-            $allhosts{$host}{$nprocs}{$nthreads}{"ran"}++;
             my $popup = "<span class=\"info\">$host ${nprocs}p/${nthreads}t</span>";
-            if ($results{$thorn}{$test}{$host}{$nprocs}{$nthreads}{"result"} =~ /Success/) {
-              $allhosts{$host}{$nprocs}{$nthreads}{"success"}++;
+            if ($results{$thorn}{$test}{$host}{$nprocs}{$nthreads}{"success"}) {
               $table_entries .= "<td class='c$bg$green'>√$popup</td>";
             } else {
-              $allhosts{$host}{$nprocs}{$nthreads}{"fail"}++;
               my $details = $results{$thorn}{$test}{$host}{$nprocs}{$nthreads}{"details"};
               my $entry = "<b>$details</b>";
               if ($details =~ /(\d+) files compared, (\d+) differ, (\d+) differ significantly/) {
@@ -180,7 +208,7 @@
      }
     }
     $table_entries .= "</tr>\n"; $tr="<tr>";
-  }
+  }}
 }
 
 # Things for the top of the table
@@ -231,8 +259,9 @@
    foreach my $nthreads (sort(keys(%{$allhosts{$host}{$nprocs}}))) {
     if (!defined($ignore) or "$nprocs,$nthreads" !~ /$ignore/)
     {
-      $table_entries_h .= "<td class='c".(($nprocs=="1")?1:2)."'><b>".$allhosts{$host}{$nprocs}{$nthreads}{"fail"}."</b>/".
-                                                         $allhosts{$host}{$nprocs}{$nthreads}{"ran"}."</td>";
+      $table_entries_h .= "<td class='c".(($nprocs=="1")?1:2)."'><b>".
+                          $allhosts{$host}{$nprocs}{$nthreads}{"fail"}."</b>/".
+                          $allhosts{$host}{$nprocs}{$nthreads}{"ran"}."</td>";
      }
    }
   }
@@ -293,7 +322,7 @@
 CSS
 print "<p><a href='parse_testsuite_results.php".
       (defined($ignore)?"?show_all=1'>Show all":"'>Hide some").
-      "</a> process/thread combinations.</p>\n";
+      "</a> information.</p>\n";
 
 print "<table border='1'>$table_entries</table>\n";
 



More information about the Commits mailing list