]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
report generator
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 25 Apr 2001 09:28:48 +0000 (09:28 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 25 Apr 2001 09:28:48 +0000 (09:28 +0000)
git-svn-id: https://svn.dealii.org/trunk@4482 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/common/scripts/report.pl [new file with mode: 0644]

diff --git a/deal.II/common/scripts/report.pl b/deal.II/common/scripts/report.pl
new file mode 100644 (file)
index 0000000..f23a5b1
--- /dev/null
@@ -0,0 +1,82 @@
+print <<'EOT'
+<HTML>
+<head>
+<title>Regression tests</title>
+</head>
+<body>
+<h1>Regression tests</h1>
+<h2>Results</h2>
+<table>
+<tr><th>Date
+EOT
+    ;
+
+
+# read in list of test results
+while (<>)
+{
+    $dir = $1 if (m/=====Report: ([^ ]+)/);
+    if (/([\d-]+) ([\d:]*) ([+-]) (.*)/)
+    {
+       $date   = $1;
+       $time   = $2;
+       $result = $3;
+       $name   = $4;
+
+       $results{$date}{$dir.':'.$name} = '<img src="pictures/ok.gif">'
+           if ($result eq '+');
+       $results{$date}{$dir.':'.$name} = '<img src="pictures/fail.gif">'
+           if ($result eq '-');
+    }
+}
+
+
+# generate a list of test case names and assign a number
+# in alphabetical order to them
+foreach $date (keys %results) {
+    foreach $name (keys %{ $results{$date} }) {
+       $testcase{$name} = 0;
+    }
+}
+$next_index = 1;
+foreach $name (sort keys %testcase) {
+    $testcase{$name} = $next_index++;
+}
+
+for ($i=1;$i<$next_index;$i++)
+{
+    printf "<th>%02d", $i;
+}
+
+# finally output a table of results
+foreach $date (sort {$b cmp $a} keys %results)
+{
+    print "<tr><td>$date  ";
+    foreach $name (sort keys %testcase)
+    {
+       $_ = $results{$date}{$name};
+       print '<th> ', $_;
+    }
+    print "\n";
+}
+
+print << 'EOT'
+</table>
+
+<h2>Names of test programs</h2>
+<table>
+EOT
+    ;
+
+
+# output the list of test cases
+foreach $name (sort keys %testcase) {
+    print "<tr><td>$testcase{$name} <td>$name\n";
+}
+
+print <<'EOT'
+</table>
+</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.