diff --git a/.gitattributes b/.gitattributes index 004ff5d3886..ad55bb20bc9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1869,6 +1869,7 @@ Surface_mesher/examples/Surface_mesher/ImageIO/reech4x4.c -text Surface_mesher/examples/Surface_mesher/ImageIO/reech4x4.h -text Surface_mesher/examples/Surface_mesher/ImageIO/typedefs.h -text Surface_mesher/examples/Surface_mesher/NOTICE -text +Surface_mesher/examples/Surface_mesher/cgal_test -text Surface_mesher/examples/Surface_mesher/implicit_functions.h -text Surface_mesher/examples/Surface_mesher/inputs/ALSTOM_TEST4.off -text Surface_mesher/examples/Surface_mesher/inputs/boeing.off -text diff --git a/Surface_mesher/changes.txt b/Surface_mesher/changes.txt index fb8a78da844..729e8afd0b8 100644 --- a/Surface_mesher/changes.txt +++ b/Surface_mesher/changes.txt @@ -1,6 +1,8 @@ 17 March 2006 Laurent Rineai - modified examples/Surface_mesher/makefile, to have ImageIO compiled on -Sun + Sun +- added examples/Surface_mesher/cgal_test, so that the testsuite does not + try to compile and run examples/Surface_mesher/implicit_functions 15 March 2006 Laurent Rineau - Added macro CGAL_SURFACE_MESHER_DEBUG_CONSTRUCTORS to strace constructors diff --git a/Surface_mesher/examples/Surface_mesher/cgal_test b/Surface_mesher/examples/Surface_mesher/cgal_test new file mode 100755 index 00000000000..a5d48643b5e --- /dev/null +++ b/Surface_mesher/examples/Surface_mesher/cgal_test @@ -0,0 +1,77 @@ +#! /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 +#---------------------------------------------------------------------# + +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 1200 + 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 3d_image_surface_mesher + compile_and_run implicit_surface_mesher +fi +