Previous: Viewing with Emacs, Up: Regression
Extremely useful HTML Views of the regression tests may be produced using two perl scripts regression/regress.pl and regression/regress.plx.
There are many ways configuring Apache to permit CGI scripts, all of them are featured in Apache documentation, which can be found at http://httpd.apache.org/docs/2.0/howto/cgi.html
Below you will find one example.
This documentation assumes an Apache 2.0 included in Fedora Core distribution, but it should be fairly close to the config for other distributions.
First, you will need to configure Apache to run CGI scripts in the directory you wish to serve the html views from. In /etc/httpd/conf/httpd.conf there should be a line:
DocumentRoot "/var/www/html"
Search for a line <Directory "/path/to/directory">
, where
/path/to/directory
is the same as provided in DocumentRoot
,
then add ExecCGI
to list of Options
.
The whole section should look like:
<Directory "/var/www/html"> ... Options ... ExecCGI ... </Directory>
This allows CGI scripts to be executed in the directory used by regress.plx. Next, you need to tell Apache that .plx is a CGI script ending. Your httpd.conf file should contain a line:
AddHandler cgi-script ...
If there isn't already, add it; add .plx to the list of extensions, so line should look like:
AddHandler cgi-script ... .plx
You will also need to make sure you have the necessary modules loaded to run
CGI scripts; mod_cgi and mod_mime should be sufficient. Your httpd.conf
should have the relevant LoadModule cgi_module modules/mod_cgi.so
and
LoadModule mime_module modules/mod_mime.so
lines; uncomment them if
necessary.
Next, you need to put a copy of regress.plx in the DocumentRoot
directory /var/www/html
or it subdirectories where you plan to serve the
html views from.
You will also need to install the Perl module GD (http://search.cpan.org/dist/GD/), available from CPAN.
Finally, run regression/regress.pl to create the xml data used to generate the html views (to do all regression tests run regression/regress.pl -a 1); then, copy the html/ directory to the same directory as regress.plx resides in.
At this point, you should have a working copy of the html regression views.
Additional notes for Debian users: The Perl GD module can be installed
by apt-get install libgd-perl
. It may suffice to add this to
the apache2 configuration:
<Directory "/var/www/regression"> Options +ExecCGI AddHandler cgi-script .plx RedirectMatch ^/regression$ /regression/regress.plx </Directory>
and then make a link from /var/www/regression to the GNU Go
regression directory. The RedirectMatch
statement is only
needed to set up a shorter entry URL.