]> https://gitweb.dealii.org/ - dealii.git/commitdiff
The script is now a mess, but it generates much nicer output!
authordeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 5 Jul 2001 12:21:39 +0000 (12:21 +0000)
committerdeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 5 Jul 2001 12:21:39 +0000 (12:21 +0000)
git-svn-id: https://svn.dealii.org/trunk@4820 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/common/scripts/report.pl

index b7b3c88035fd7d4086bb959fcd92e5b3c3993204..1b29934ae8b559958f5a3f60b085ad179d58afdb 100644 (file)
@@ -1,20 +1,5 @@
-print <<'EOT'
-<HTML>
-<head>
-    <link href="screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
-    <link href="print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
-    <meta name="author" content="The deal.II authors">
-    <meta name="keywords" content="deal.II"></head>
-<title>Regression tests</title>
-</head>
-<body>
-<h1>Regression tests</h1>
-<h2>Results</h2>
-EOT
-    ;
-
-
-# read in list of test results
+############################################################
+# first read in list of test results
 while (<>)
 {
     $dir = $1 if (m/=====Report: ([^ ]+)/);
@@ -46,62 +31,153 @@ foreach $name (sort keys %testcase) {
 }
 
 
-print <<'EOT'
-<table>
-<tr><th>Date
-EOT
-    ;
 
-for ($i=1;$i<$next_index;$i++)
+
+###########################################################
+# then generate output for the three frames and the panels for 
+# the different months
+
+# first get last active months for the default panel
+foreach $date (sort {$b cmp $a} keys %results)
 {
-    printf "<th><small>%02d</small>", $i;
+    $date =~ /(\d+)-(\d+)-\d+/;
+    $default_year  = $1;
+    $default_month = $2;
+    last;
 }
-print "\n";
+
+
+
+open REPORT_FILE, ">tests_report.html";
+
+print REPORT_FILE <<"EOT"
+<HTML>
+<head>
+    <link href="screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
+    <link href="print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
+    <meta name="author" content="The deal.II authors">
+    <meta name="keywords" content="deal.II"></head>
+<title>Regression tests</title>
+</head>
+
+<frameset rows="120,*,300" border=2>
+<frame name="report_head"    src="tests_report_head.html"    frameborder="yes">
+<frame name="report_results" src="tests_report_${default_year}_${default_month}.html" frameborder="yes">
+<frame name="report_names"   src="tests_report_names.html"   frameborder="yes">
+</frameset>
+</html>
+EOT
+    ;
+
+
+open HEAD_FILE, ">tests_report_head.html";
+print HEAD_FILE << 'EOT'
+<HTML>
+<head>
+    <link href="screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
+    <link href="print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
+    <meta name="author" content="The deal.II authors">
+    <meta name="keywords" content="deal.II"></head>
+<title>Regression tests head</title>
+</head>
+<body>
+<h1 align="center">Regression tests</h1>
+<p align="center">
+Select results for one of the following months:<br>
+EOT
+    ;
+
+open NAMES_FILE, ">tests_report_names.html";
+print NAMES_FILE << 'EOT'
+<HTML>
+<head>
+    <link href="screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
+    <link href="print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
+    <meta name="author" content="The deal.II authors">
+    <meta name="keywords" content="deal.II"></head>
+<title>Regression tests head</title>
+</head>
+<body>
+EOT
+    ;
+
+
 
 
 # finally output a table of results
 foreach $date (sort {$b cmp $a} keys %results)
 {
-    # if this is not the first iteration, and if the month has changed,
-    # then put in a break into the table to avoid overly long tables
-    # which browsers take infinitely long to render
+    # if the month has changed (or if this is the first month we deal
+    # with), open a new file and write the file and table heads. also write
+    # a note into the head panel
+    #
+    # if this is not the first month, then put in a break into the table
+    # to avoid overly long tables which browsers take infinitely
+    # long to render
     $date =~ /(\d+)-(\d+)-\d+/;
     $this_year  = $1;
     $this_month = $2;
     if ($this_month != $old_month) {
        if (defined $old_month) {
-           print "</table>\n";
+           print TABLE_FILE "</table>\n";
+           print TABLE_FILE "</body>\n</html>\n";
+           close TABLE_FILE;
+       }
+       $file = "tests_report_${this_year}_$this_month.html";
+       use Cwd;
+       $dir = cwd();
+       open TABLE_FILE, ">$file" or die "Can't open output file $file in $dir\n";
 
-           print <<'EOT'
-               <table>
-               <tr><th>Date
+print TABLE_FILE <<"EOT"
+<HTML>
+<head>
+    <link href="screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
+    <link href="print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
+    <meta name="author" content="The deal.II authors">
+    <meta name="keywords" content="deal.II"></head>
+<title>Regression tests for $year/$date</title>
+</head>
+<body>
+
+<h3 align="center">Results for $this_year/$this_month</h3>
+<table>
+<tr><th>Date
 EOT
-                           ;
+    ;
 
-           for ($i=1;$i<$next_index;$i++)
-           {
-               printf "<th><small>%02d</small>", $i;
-           }
-           print "\n";
+       for ($i=1;$i<$next_index;$i++)
+       {
+           printf TABLE_FILE "<th><small>%02d</small>", $i;
        }
+       print TABLE_FILE "\n";
+
+
+       print HEAD_FILE "<a href=\"$file\" target=\"report_results\">";
+       print HEAD_FILE "$this_year/$this_month</a>&nbsp;&nbsp;\n";
     }
 
-    print "<tr><td>$date  ";
+    print TABLE_FILE "<tr><td>$date  ";
     foreach $name (sort keys %testcase)
     {
        $_ = $results{$date}{$name};
-       print '<td> ', $_, '</td>';
+       print TABLE_FILE '<td> ', $_, '</td>';
     }
-    print "</tr></td>\n";
+    print TABLE_FILE "</tr></td>\n";
 
     # store old month name for the next iteration of the loop
     $old_month = $this_month;
 }
 
-print << 'EOT'
+print TABLE_FILE << 'EOT'
 </table>
+</body>
+</html>
+EOT
+    ;
 
-<h2>Names of test programs</h2>
+print NAMES_FILE << 'EOT'
+<h3 align="center">Names of test programs</h3>
+<small>
 <table>
 EOT
     ;
@@ -111,15 +187,15 @@ EOT
 $col = 0;
 foreach $name (sort keys %testcase) {
     if ($col == 0) {
-       print "<tr>\n";
+       print NAMES_FILE "<tr>\n";
     }
-    print "   <td>$testcase{$name} <td>$name\n";
+    print NAMES_FILE "   <td><small>$testcase{$name}</small> <td><small>$name</small>\n";
 
     # next column. if at end, wrap around
     $col = ($col+1)%4;
 }
 
-print <<'EOT'
+print NAMES_FILE <<'EOT'
 </table>
 </body>
 </html>
@@ -127,3 +203,10 @@ EOT
     ;
 
 
+
+print HEAD_FILE << 'EOT'
+</p>
+</body>
+</html>
+EOT
+    ;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.