From: deal Date: Thu, 5 Jul 2001 12:21:39 +0000 (+0000) Subject: The script is now a mess, but it generates much nicer output! X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03eaa1092bdb7e22a195aeed43bbcae5b6bd968f;p=dealii-svn.git The script is now a mess, but it generates much nicer output! git-svn-id: https://svn.dealii.org/trunk@4820 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/common/scripts/report.pl b/deal.II/common/scripts/report.pl index b7b3c88035..1b29934ae8 100644 --- a/deal.II/common/scripts/report.pl +++ b/deal.II/common/scripts/report.pl @@ -1,20 +1,5 @@ -print <<'EOT' - - - - - - -Regression tests - - -

Regression tests

-

Results

-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' - -
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 "%02d", $i; + $date =~ /(\d+)-(\d+)-\d+/; + $default_year = $1; + $default_month = $2; + last; } -print "\n"; + + + +open REPORT_FILE, ">tests_report.html"; + +print REPORT_FILE <<"EOT" + + + + + + +Regression tests + + + + + + + + +EOT + ; + + +open HEAD_FILE, ">tests_report_head.html"; +print HEAD_FILE << 'EOT' + + + + + + +Regression tests head + + +

Regression tests

+

+Select results for one of the following months:
+EOT + ; + +open NAMES_FILE, ">tests_report_names.html"; +print NAMES_FILE << 'EOT' + + + + + + +Regression tests head + + +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 "

\n"; + print TABLE_FILE "\n"; + print TABLE_FILE "\n\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' - -
Date +print TABLE_FILE <<"EOT" + + + + + + +Regression tests for $year/$date + + + +

Results for $this_year/$this_month

+ +'; + print TABLE_FILE ''; } - print "\n"; + print TABLE_FILE "\n"; # store old month name for the next iteration of the loop $old_month = $this_month; } -print << 'EOT' +print TABLE_FILE << 'EOT'
Date EOT - ; + ; - for ($i=1;$i<$next_index;$i++) - { - printf "%02d", $i; - } - print "\n"; + for ($i=1;$i<$next_index;$i++) + { + printf TABLE_FILE "%02d", $i; } + print TABLE_FILE "\n"; + + + print HEAD_FILE ""; + print HEAD_FILE "$this_year/$this_month  \n"; } - print "
$date "; + print TABLE_FILE "
$date "; foreach $name (sort keys %testcase) { $_ = $results{$date}{$name}; - print ' ', $_, ' ', $_, '
+ + +EOT + ; -

Names of test programs

+print NAMES_FILE << 'EOT' +

Names of test programs

+ EOT ; @@ -111,15 +187,15 @@ EOT $col = 0; foreach $name (sort keys %testcase) { if ($col == 0) { - print "\n"; + print NAMES_FILE "\n"; } - print "
$testcase{$name} $name\n"; + print NAMES_FILE " $testcase{$name} $name\n"; # next column. if at end, wrap around $col = ($col+1)%4; } -print <<'EOT' +print NAMES_FILE <<'EOT'
@@ -127,3 +203,10 @@ EOT ; + +print HEAD_FILE << 'EOT' +

+ + +EOT + ;