#! /bin/sh # # version: 1.0 # author: Susan Hert # # This script creates a WWW page with a table of test suite results. # # Usage: # create_test_page if [ $# -ne 2 ] ; then echo "Usage: $0 " exit 1 else VERSION="$1" TARGET_DIR="$2" fi if [ -f docdirs ]; then PART_DIRS=`cat docdirs` else PART_DIRS="" fi WWWPAGE="$VERSION.manual_test.html" PARTS_TABLE_COLSPAN=7 PACKAGE_TABLE_COLSPAN=6 print_makeindex_test_result() { if [ ! -f wrapper.ilg ] ; then echo "?" else if grep '[1-9][0-9]* rejected' wrapper.ilg > /dev/null ; then echo "n" elif grep '[1-9][0-9]* warnings' wrapper.ilg > /dev/null ; then echo "w" else echo "y" fi fi } print_bibtex_test_result() { if [ ! -f wrapper.blg ] ; then echo "?" else if grep 'error message' wrapper.blg > /dev/null ; then echo "n" elif grep 'warnings' wrapper.blg > /dev/null ; then echo "w" else echo "y" fi fi } print_latex_test_result() { if [ ! -f wrapper.log ] ; then echo "?" else if grep '^!' wrapper.log > /dev/null; then echo "n" elif grep 'LaTeX Warning' wrapper.log > /dev/null; then echo "w" else echo "y" fi fi } print_html_test_result() { if [ ! -f html/to_html.log ] ; then echo "?" else if grep 'Error' html/to_html.log > /dev/null; then echo "n" elif grep "Unknown" html/to_html.log > /dev/null ; then echo "n" elif grep "an't" html/to_html.log > /dev/null ; then echo "n" elif grep "ot found" html/to_html.log > /dev/null ; then echo "n" elif grep "ref:" html/to_html.log > /dev/null; then echo "n" elif grep '\\[a-m,o-z,A-Z][a-Z]+\\[a-z,A-Z]' html/to_html.log > /dev/null; then echo "n" else echo "y" fi fi } print_parts_table() { /bin/cat << EOF

EOF for DIR in $PART_DIRS; do if [ -d $DIR ]; then cd $DIR case "$DIR" in *installation) NAME=installation; PART_NAME="Installation";; *general) NAME=general_intro; PART_NAME="General Introduction";; *kernel) NAME=kernel; PART_NAME="2D and 3D Kernel";; *kernel_d) NAME=kernel_d; PART_NAME="dD Kernel";; *basic) NAME=basic_lib; PART_NAME="Basic Library";; *support) NAME=support_lib; PART_NAME="Support Library";; *use_of_stl) NAME=use_of_stl; PART_NAME="Use of STL";; *) NAME=wrapper; echo "UNKNOWN manual part; using name $DIR"; PART_NAME=$DIR;; esac echo "

" echo "" RESULT=`print_makeindex_test_result` if [ $RESULT = "y" ]; then echo "" elif [ $RESULT = "w" ]; then echo "" elif [ $RESULT = "n" ]; then echo "" else echo "" fi RESULT=`print_bibtex_test_result` if [ $RESULT = "y" ]; then echo "" elif [ $RESULT = "w" ]; then echo "" elif [ $RESULT = "n" ]; then echo "" else echo "" fi RESULT=`print_latex_test_result` if [ $RESULT = "y" ]; then echo "" elif [ $RESULT = "w" ]; then echo "" else echo "" fi echo "" RESULT=`print_html_test_result` if [ $RESULT = "y" ]; then echo "" elif [ $RESULT = "w" ]; then echo "" else echo "" fi echo "" echo "" cd .. fi done echo "
Reference Manual Test Results $VERSION
Part makeindex bibtex LaTeX ps cc_manual_to_html HTML
$PART_NAME \ $RESULT \ $RESULT \ $RESULT$RESULT \ $RESULT \ $RESULT \ $RESULT$RESULT \ $RESULT \ $RESULT \ $RESULTps \ $RESULT \ $RESULT \ $RESULTHTML
" echo "

" } print_packages_table() { /bin/cat << EOF

EOF for DIR in $PART_DIRS; do case $DIR in *installation) PART_NAME="Installation";; *general) PART_NAME="General Introduction";; *kernel) PART_NAME="2D and 3D Kernel";; *kernel_d) PART_NAME="dD Kernel";; *basic) PART_NAME="Basic Library";; *support) PART_NAME="Support Library";; *use_of_stl) PART_NAME="Use of STL";; *) echo "UNKNOWN manual part; using name $DIR"; PART_NAME=$DIR;; esac if [ -f $DIR/docdirs ]; then create_package_table $DIR fi done echo "
Individual Package/Directory Test Results $VERSION
Part Package or Directory makeindex LaTeX cc_manual_to_html
" echo "

" } print_resultpage() { /bin/cat << EOF CGAL Reference Manual Test Results

CGAL Reference Manual Test Results

This page shows the results of running scripts to create the reference manual for $VERSION. The conversion of each package's contribution to the manual was tested separately, first for problems with LaTeX and makeindex and then for problems during the HTML conversion using cc_manual_to_html. In the table below a 'y' means no blatant errors occurred, which may be loosely interpreted as 'success', a 'w' means there was a warning, and a 'n' means 'failure'. LaTeX log files for individual packages and directories have not been scanned for warnings since it is very unlikely that with this partitioned test any package would make it through without a warning. The log files for the makeindex, bibtex, LaTeX, and HTML conversions can to retrieved by clicking on the associated result indicators.

Please note:

  • Due to the separate testing of each package, some references in the LaTeX manual may remain unresolved by the individual directory/package tests. Please check the log files for the appropriate part of the manual to see if all references were finally resolved.
  • Only when all packages have a 'y" in the LaTeX column will the table of contents for the full manual be correct.
  • The detection of errors is not exact. You should look at the log files even when a "y" appears suggesting that everything is OK.
  • A (rather rudimentary) test for broken picture links is also performed. Follow the link to your chapter(s) to see if there are pictures that couldn't be found.


EOF print_parts_table print_packages_table /bin/cat << EOF
Author: Susan Hert hert@mpi-sb.mpg.de EOF } /bin/rm -f $WWWPAGE print_resultpage > $WWWPAGE