temp. cgal_test modified to show why it fails

This commit is contained in:
Laurent Rineau 2007-02-23 13:23:53 +00:00
parent eb080638fc
commit 9336a18ee7
2 changed files with 85 additions and 0 deletions

1
.gitattributes vendored
View File

@ -684,6 +684,7 @@ Interpolation/doc_tex/Interpolation/nn_coords.gif -text svneol=unset#image/gif
Interpolation/doc_tex/Interpolation/nn_coords.ipe -text svneol=unset#application/postscript
Interpolation/doc_tex/Interpolation/nn_coords.pdf -text svneol=unset#application/pdf
Interpolation/doc_tex/Interpolation/nn_coords.xml svneol=native#text/xml
Interpolation/examples/Interpolation/cgal_test eol=lf
Intersections_2/test/Intersections_2/cgal_test eol=lf
Intersections_3/test/Intersections_3/cgal_test eol=lf
Jet_fitting_3/clean_tree.csh eol=lf

View File

@ -0,0 +1,84 @@
#! /bin/sh
# This is a script for the CGAL test suite. Such a script must obey
# the following rules:
#
# - the name of the script is cgal_test
# - for every target two one line messages are written to the file 'error.txt'
# the first one indicates if the compilation was successful
# the second one indicates if the execution was successful
# if one of the two was not successful, the line should start with 'ERROR:'
# - running the script should not require any user interaction
# - the script should clean up object files and executables
ERRORFILE=error.txt
#---------------------------------------------------------------------#
# compile_and_run <target>
#---------------------------------------------------------------------#
compile_and_run()
{
echo "Compiling $1 ... "
SUCCES="y"
if eval 'make CGAL_MAKEFILE=$CGAL_MAKEFILE \
TESTSUITE_CXXFLAGS="$TESTSUITE_CXXFLAGS" \
TESTSUITE_LDFLAGS="$TESTSUITE_LDFLAGS" $1' ; then
echo " succesful compilation of $1" >> $ERRORFILE
else
echo " ERROR: compilation of $1" >> $ERRORFILE
SUCCES=""
fi
if [ -n "${SUCCES}" ] ; then
OUTPUTFILE=ProgramOutput.$1.$PLATFORM
rm -f $OUTPUTFILE
COMMAND="./$1"
if [ -f $1.cmd ] ; then
COMMAND="$COMMAND `cat $1.cmd`"
fi
if [ -f $1.cin ] ; then
COMMAND="cat $1.cin | $COMMAND"
fi
echo "Executing $1 ... "
echo
ulimit -t 3600 2> /dev/null
if eval $COMMAND > $OUTPUTFILE 2>&1 ; then
echo " succesful execution of $1" >> $ERRORFILE
else
echo " ERROR: execution of $1" >> $ERRORFILE
fi
else
echo " ERROR: not executed $1" >> $ERRORFILE
fi
eval "make CGAL_MAKEFILE=$CGAL_MAKEFILE clean > /dev/null 2>&1 "
}
#---------------------------------------------------------------------#
# remove the previous error file
#---------------------------------------------------------------------#
rm -f $ERRORFILE
touch $ERRORFILE
#---------------------------------------------------------------------#
# compile and run the tests
#---------------------------------------------------------------------#
if [ $# -ne 0 ] ; then
for file in $* ; do
compile_and_run $file
done
else
compile_and_run interpolation_2
compile_and_run linear_interpolation_2
compile_and_run nn_coordinates_2
compile_and_run nn_coordinates_3
compile_and_run rn_coordinates_2
compile_and_run sibson_interpolation_2
compile_and_run surface_neighbor_coordinates_3
fi
printf "Last exit code: %s\n" "$?"
echo "Hello world."