This file is indexed.

/usr/share/deal.II/scripts/report-regression-tests.pl is in libdeal.ii-dev 6.3.1-1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
############################################################
# first read in list of test results
while (<>)
{
    $dir = $1 if (m/=====Report: ([^ ]+)/);
    if (/([\d-]+) ([\d:]*) ([+-]) (.*)/)
    {
	$date   = $1;
	$time   = $2;
	$result = $3;
	$name   = $4;

	$total_testcases{$date}++;

	if ($result eq '+') {
	    $results{$date}{$dir.':'.$name} 
	    = '<img src="pictures/ok.gif" size="1">';
	}
	else
	{
	    $results{$date}{$dir.':'.$name}
	    = '<img src="pictures/fail.gif" size="1">';
	    $failed_testcases{$date}++;
	};
    }
}


# 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++;
}




###########################################################
# then generate output for the three frames and the panels for 
# the different months

# first get last active month for the default panel
foreach $date (sort {$b cmp $a} keys %results)
{
    $date =~ /(\d+)-(\d+)-\d+/;
    $default_year  = $1;
    $default_month = $2;
    last;
}



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="20%,40%,40%" 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
$number_of_present_month = 0;
foreach $date (sort {$b cmp $a} keys %results)
{
    # 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) {
	$number_of_present_month++;

	if (defined $old_month) {
	    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 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 <th> Fail
EOT
    ;

	for ($i=1;$i<$next_index;$i++)
	{
	    printf TABLE_FILE "<th><small>%02d</small>", $i;
	}
	print TABLE_FILE "\n";

	
	# only write up to 8 months in a row into the month
	# listing. if more, insert a linebreak
	if (($number_of_present_month % 8 == 0) &&
	    ($number_of_present_month != 0)) 
	{
	    print HEAD_FILE "<br>\n";
	}
	# now write link to month file
	print HEAD_FILE "<a href=\"$file\" target=\"report_results\">";
	print HEAD_FILE "${this_year}/${this_month}</a>&nbsp;&nbsp;\n";
    }

    print TABLE_FILE "<tr><td>$date  ";

    $failed_testcases{$date} = 0 if (!defined $failed_testcases{$date});

    print TABLE_FILE "<td><b style=\"color:blue;\">" if ($failed_testcases{$date} == 0);
    print TABLE_FILE "<td><b style=\"color:red;\">" if ($failed_testcases{$date} != 0);

    print TABLE_FILE "$failed_testcases{$date}/$total_testcases{$date}</b></td>";

    foreach $name (sort keys %testcase)
    {
	$_ = $results{$date}{$name};
	print TABLE_FILE '<td> ', $_, '</td>';
    }
    print TABLE_FILE "</tr></td>\n";

    # store old month name for the next iteration of the loop
    $old_month = $this_month;
}

print TABLE_FILE << 'EOT'
</table>
</body>
</html>
EOT
    ;

print NAMES_FILE << 'EOT'
<h3 align="center">Names of test programs</h3>
<small>
<table>
EOT
    ;


# output the list of test cases. always put four in a row
$col = 0;
foreach $name (sort keys %testcase) {
    if ($col == 0) {
	print NAMES_FILE "<tr>\n";
    }
    print NAMES_FILE "   <td><small>$testcase{$name}</small></td>",
                     "   <td><small>$name</small></td>\n";

    # next column. if at end, wrap around
    $col = ($col+1)%4;

    if ($col == 0) {
	print NAMES_FILE "</tr>\n";
    }
}

print NAMES_FILE <<'EOT'
</table>
</body>
</html>
EOT
    ;



print HEAD_FILE << 'EOT'
</p>
</body>
</html>
EOT
    ;