Modified version of cgal_test_with_cmake which:

- is cross-platform Unix/make and Cygwin/VisualC++
- concats all log files to cgal_test_with_cmake.log
- does not clean up object files and executables (too slow when called by developer)
This commit is contained in:
Laurent Saboret 2009-06-08 11:52:56 +00:00
parent c337944925
commit cb58a26a32
20 changed files with 771 additions and 509 deletions

18
.gitattributes vendored
View File

@ -2835,26 +2835,27 @@ Point_set_processing_3/doc_tex/Point_set_processing_3/pipeline.eps -text svneol=
Point_set_processing_3/doc_tex/Point_set_processing_3/pipeline.jpg -text svneol=unset#image/jpeg
Point_set_processing_3/doc_tex/Point_set_processing_3/simplification.tex -text
Point_set_processing_3/doc_tex/Point_set_processing_3/smoothing.tex -text
Point_set_processing_3/examples/Point_set_processing_3/cgal_test_with_cmake -text
Point_set_processing_3/examples/Point_set_processing_3/cgal_test_with_cmake.bat eol=crlf
Point_set_processing_3/examples/Point_set_processing_3/data/ChineseDragon-10kv.off -text svneol=unset#application/octet-stream
Point_set_processing_3/examples/Point_set_processing_3/data/camel.off -text svneol=unset#application/octet-stream
Point_set_processing_3/examples/Point_set_processing_3/data/oni.xyz -text
Point_set_processing_3/examples/Point_set_processing_3/data/sphere_20k.xyz -text
Point_set_processing_3/examples/Point_set_processing_3/normal_estimation.cmd eol=lf
Point_set_processing_3/examples/Point_set_processing_3/property_map_multiple_streams.cpp -text
Point_set_processing_3/examples/Point_set_processing_3/quick_test_suite.bat eol=crlf
Point_set_processing_3/examples/Point_set_processing_3/quick_test_suite.sh eol=lf
Point_set_processing_3/include/CGAL/Fast_orthogonal_k_neighbor_search.h -text
Point_set_processing_3/include/CGAL/compute_average_spacing.h -text
Point_set_processing_3/include/CGAL/jet_smooth_point_set.h -text
Point_set_processing_3/run_testsuite_with_cmake.bat eol=crlf
Point_set_processing_3/test/Point_set_processing_3/analysis_test.cmd eol=lf
Point_set_processing_3/test/Point_set_processing_3/analysis_test.cpp -text
Point_set_processing_3/test/Point_set_processing_3/cgal_test_with_cmake -text
Point_set_processing_3/test/Point_set_processing_3/cgal_test_with_cmake.bat eol=crlf
Point_set_processing_3/test/Point_set_processing_3/data/ChineseDragon-10kv.off -text svneol=unset#application/octet-stream
Point_set_processing_3/test/Point_set_processing_3/data/oni.pwn -text
Point_set_processing_3/test/Point_set_processing_3/data/sphere926.pwn -text
Point_set_processing_3/test/Point_set_processing_3/data/sphere_20k.xyz -text
Point_set_processing_3/test/Point_set_processing_3/normal_estimation_test.cmd eol=lf
Point_set_processing_3/test/Point_set_processing_3/quick_test_suite.bat eol=crlf
Point_set_processing_3/test/Point_set_processing_3/quick_test_suite.sh eol=lf
Point_set_processing_3/test/Point_set_processing_3/remove_outliers_test.cmd eol=lf
Point_set_processing_3/test/Point_set_processing_3/smoothing_test.cmd eol=lf
Point_set_processing_3/test/Point_set_processing_3/smoothing_test.cpp -text
@ -3969,19 +3970,20 @@ Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/output.t
Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/pipeline.eps -text svneol=unset#application/postscript
Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/pipeline.jpg -text svneol=unset#image/jpeg
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/APSS_reconstruction.cmd eol=lf
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/cgal_test_with_cmake -text
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/cgal_test_with_cmake.bat eol=crlf
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/data/camel-5kv.xyz -text svneol=unset#application/octet-stream
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/data/oni.xyz -text
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/poisson_reconstruction.cmd eol=lf
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/quick_test_suite.bat eol=crlf
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/quick_test_suite.sh eol=lf
Surface_reconstruction_points_3/run_testsuite_with_cmake.bat eol=crlf
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/APSS_reconstruction_test.cmd eol=lf
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/cgal_test_with_cmake -text
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/cgal_test_with_cmake.bat eol=crlf
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/data/ChineseDragon-10kv.off -text svneol=unset#application/octet-stream
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/data/oni.pwn -text
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/data/robocat_deci.off -text svneol=unset#application/octet-stream
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/data/sphere_20k.xyz -text
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/poisson_reconstruction_test.cmd eol=lf
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/quick_test_suite.bat eol=crlf
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/quick_test_suite.sh eol=lf
Testsuite/test/collect_cgal_testresults_from_cmake -text
Testsuite/test/makefile2 -text
Testsuite/test/run_testsuite_with_cmake -text

4
.gitignore vendored
View File

@ -348,7 +348,6 @@ Point_set_processing_3/examples/Point_set_processing_3/.settings
Point_set_processing_3/examples/Point_set_processing_3/AQtimeProject
Point_set_processing_3/examples/Point_set_processing_3/Makefile
Point_set_processing_3/examples/Point_set_processing_3/ProgramOutput.*
Point_set_processing_3/examples/Point_set_processing_3/cgal_test_with_cmake
Point_set_processing_3/examples/Point_set_processing_3/debug
Point_set_processing_3/examples/Point_set_processing_3/error.txt
Point_set_processing_3/examples/Point_set_processing_3/normal_estimation
@ -372,7 +371,6 @@ Point_set_processing_3/test/Point_set_processing_3/AQtimeProject
Point_set_processing_3/test/Point_set_processing_3/Makefile
Point_set_processing_3/test/Point_set_processing_3/ProgramOutput.*
Point_set_processing_3/test/Point_set_processing_3/analysis_test
Point_set_processing_3/test/Point_set_processing_3/cgal_test_with_cmake
Point_set_processing_3/test/Point_set_processing_3/debug
Point_set_processing_3/test/Point_set_processing_3/error.txt
Point_set_processing_3/test/Point_set_processing_3/normal_estimation_test
@ -675,7 +673,6 @@ Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/APSS_re
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/AQtimeProject
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/Makefile
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/ProgramOutput.*
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/cgal_test_with_cmake
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/debug
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/error.txt
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/poisson_reconstruction
@ -698,7 +695,6 @@ Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/APSS_recons
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/AQtimeProject
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/Makefile
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/ProgramOutput.*
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/cgal_test_with_cmake
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/debug
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/error.txt
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/poisson_reconstruction_test

View File

@ -0,0 +1,177 @@
#! /bin/sh
#
# This script is a modified version of cgal_test_with_cmake which:
# - is cross-platform Unix/make and Cygwin/VisualC++
# - concats all log files to cgal_test_with_cmake.log
# - does not clean up object files and executables (too slow when called by developer)
#
# 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_with_cmake
# - 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
ERRORFILE=error.txt
DO_RUN=y
case "$CMAKE_GENERATOR" in
Visual* ) # if VisualC++
solution=`ls *.sln`
MAKE_CMD="devenv ${solution} /Build Release /Project"
;;
* ) # if make
MAKE_CMD="make -fMakefile"
;;
esac
NEED_CLEAN=
#---------------------------------------------------------------------#
# configure
#---------------------------------------------------------------------#
configure()
{
echo "Configuring... "
if eval 'cmake "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \
-DCGAL_DIR="$CGAL_DIR" \
.' ; then
echo " succesful configuration" >> $ERRORFILE
else
echo " ERROR: configuration" >> $ERRORFILE
fi
}
#---------------------------------------------------------------------#
# find_executable <target>
# (different on Windows and Unix)
#---------------------------------------------------------------------#
find_executable()
{
PARAM_APPLICATION=""
[ -f ./release/$1.exe ] && PARAM_APPLICATION="./release/$1.exe"
[ -f ./x64/release/$1.exe ] && PARAM_APPLICATION="./x64/release/$1.exe"
[ -x ./$1 ] && PARAM_APPLICATION="./$1"
echo "$PARAM_APPLICATION"
}
#---------------------------------------------------------------------#
# compile_and_run <target>
#---------------------------------------------------------------------#
compile_and_run()
{
echo "Compiling $1 ... "
SUCCES="y"
if eval '${MAKE_CMD} $1' ; then
echo " succesful compilation of $1" >> $ERRORFILE
else
echo " ERROR: compilation of $1" >> $ERRORFILE
SUCCES=""
fi
if [ -n "$DO_RUN" ] ; then
if [ -n "${SUCCES}" ] ; then
OUTPUTFILE=ProgramOutput.$1.$PLATFORM
rm -f $OUTPUTFILE
COMMAND="`find_executable $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 " successful execution of $1" >> $ERRORFILE
else
echo " ERROR: execution of $1" >> $ERRORFILE
fi
else
echo " ERROR: not executed $1" >> $ERRORFILE
fi
fi
}
# Backup previous log file cgal_test_with_cmake.log
[ -f cgal_test_with_cmake.log ] && mv -f cgal_test_with_cmake.log cgal_test_with_cmake.log.bak
# redirect cgal_test_with_cmake output to log file cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo "- Compiler output from platform $PLATFORM" >> cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo >> cgal_test_with_cmake.log
(
#---------------------------------------------------------------------#
# remove the previous error file
#---------------------------------------------------------------------#
rm -f $ERRORFILE
touch $ERRORFILE
#---------------------------------------------------------------------#
# configure, compile and run the tests
#---------------------------------------------------------------------#
configure
if [ $# -ne 0 ] ; then
for file in $* ; do
compile_and_run $file
done
else
echo "Run all tests."
compile_and_run average_spacing_example
compile_and_run jet_smoothing_example
compile_and_run normal_estimation
compile_and_run normals_example
compile_and_run property_map
compile_and_run random_simplification_example
compile_and_run read_write_xyz_point_set_example
compile_and_run remove_outliers_example
# Do *not* call make clean (too slow when called by developer)
NEED_CLEAN=
fi
#
# The clean target generated by CMake under cygwin
# always fails for some reason
#
if [ -n "${NEED_CLEAN}" ]; then
if ! ( uname | grep -q "CYGWIN" ) ; then
${MAKE_CMD} -fMakefile clean
fi
fi
) 2>&1 | tee -a cgal_test_with_cmake.log
#---------------------------------------------------------------------#
# Catenate other log files to cgal_test_with_cmake.log
#---------------------------------------------------------------------#
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo "- Tests output for platform $PLATFORM" >> cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo >> cgal_test_with_cmake.log
cat ProgramOutput.*.$PLATFORM >> cgal_test_with_cmake.log
echo >> cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo "- Error output from platform $PLATFORM" >> cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo >> cgal_test_with_cmake.log
cat $ERRORFILE >> cgal_test_with_cmake.log

View File

@ -0,0 +1,12 @@
@echo off
rem Double-clickable version of cgal_test_with_cmake on Windows/Cygwin/VisualC++
rem Path to Cygwin and VisualC++ is hard-coded
PATH=c:\Applis\cygwin\bin;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;%PATH%
sh ./cgal_test_with_cmake
pause
rem Compare logs with Beyond Compare
"C:\Program Files\Beyond Compare 2\BC2.exe" ./cgal_test_with_cmake.log.bak ./cgal_test_with_cmake.log

View File

@ -1,12 +0,0 @@
@echo off
rem Double-clickable version of quick_test_suite.sh on Windows/Cygwin
rem Path to Cygwin is hard-coded
PATH=%PATH%;c:\Applis\cygwin\bin
sh ./quick_test_suite.sh
pause
rem Compare logs with Beyond Compare
"C:\Program Files\Beyond Compare 2\BC2.exe" ./quick_test_suite.log.bak ./quick_test_suite.log

View File

@ -1,116 +0,0 @@
#!/bin/bash
# This application is a cross-platform version of cgal_test.
# This is a script for the CGAL test suite. Such a script must obey
# the following rules:
#
# - 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
# - applications must be already compiled
ERRORFILE=error.txt
#---------------------------------------------------------------------#
# find_executable <target>
# (different on Windows and Unix)
#---------------------------------------------------------------------#
find_executable()
{
PARAM_APPLICATION=""
[ -f ./debug/$1.exe ] && PARAM_APPLICATION="./debug/$1.exe"
[ -f ./release/$1.exe ] && PARAM_APPLICATION="./release/$1.exe"
[ -f ./x64/debug/$1.exe ] && PARAM_APPLICATION="./x64/debug/$1.exe"
[ -f ./x64/release/$1.exe ] && PARAM_APPLICATION="./x64/release/$1.exe"
[ -x ./$1 ] && PARAM_APPLICATION="./$1"
echo "$PARAM_APPLICATION"
}
#---------------------------------------------------------------------#
# run <target>
#---------------------------------------------------------------------#
run()
{
# Find exe
COMMAND="`find_executable $1`"
if [ -f "$COMMAND" ]; then
# Add params
if [ -f $1.cmd ] ; then
COMMAND="$COMMAND `cat $1.cmd`"
fi
if [ -f $1.cin ] ; then
COMMAND="cat $1.cin | $COMMAND"
fi
# Run
echo "------------------------------------------------------------------"
echo "- Executing $1"
echo "------------------------------------------------------------------"
echo
ulimit -t 3600 2> /dev/null
if eval $COMMAND 2>&1 ; then
echo " successful execution of $1" >> $ERRORFILE
else
echo " ERROR: execution of $1" >> $ERRORFILE
fi
else
echo " ERROR: not executed $1" >> $ERRORFILE
fi
}
#---------------------------------------------------------------------#
# main
#---------------------------------------------------------------------#
# Backup previous log file
[ -f quick_test_suite.log ] && mv -f quick_test_suite.log quick_test_suite.log.bak
# start redirection to log file
(
#---------------------------------------------------------------------#
# remove the previous error file
#---------------------------------------------------------------------#
rm -f $ERRORFILE
touch $ERRORFILE
#---------------------------------------------------------------------#
# run the tests
#---------------------------------------------------------------------#
if [ $# -ne 0 ] ; then
for file in $* ; do
run $file
done
else
echo "Run all tests."
run average_spacing_example
run jet_smoothing_example
run normal_estimation
run property_map
run remove_outliers_example
run normals_example
run random_simplification_example
run read_write_xyz_point_set_example
fi
#---------------------------------------------------------------------#
# Recap results
#---------------------------------------------------------------------#
echo "------------------------------------------------------------------"
echo "- Results"
echo "------------------------------------------------------------------"
echo
cat $ERRORFILE
echo
rm -f $ERRORFILE
) 2>&1 | tee quick_test_suite.log

View File

@ -0,0 +1,10 @@
@echo off
rem Double-clickable version of run_testsuite_with_cmake on Windows/Cygwin
rem Path to Cygwin is hard-coded
PATH=c:\Applis\cygwin\bin;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;Z:\src\cgal\SVNROOT\trunk\Testsuite\test;%PATH%
sh -c "run_testsuite_with_cmake ; cat error.txt"
pause

View File

@ -0,0 +1,173 @@
#! /bin/sh
#
# This script is a modified version of cgal_test_with_cmake which:
# - is cross-platform Unix/make and Cygwin/VisualC++
# - concats all log files to cgal_test_with_cmake.log
# - does not clean up object files and executables (too slow when called by developer)
#
# 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_with_cmake
# - 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
ERRORFILE=error.txt
DO_RUN=y
case "$CMAKE_GENERATOR" in
Visual* ) # if VisualC++
solution=`ls *.sln`
MAKE_CMD="devenv ${solution} /Build Release /Project"
;;
* ) # if make
MAKE_CMD="make -fMakefile"
;;
esac
NEED_CLEAN=
#---------------------------------------------------------------------#
# configure
#---------------------------------------------------------------------#
configure()
{
echo "Configuring... "
if eval 'cmake "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \
-DCGAL_DIR="$CGAL_DIR" \
.' ; then
echo " succesful configuration" >> $ERRORFILE
else
echo " ERROR: configuration" >> $ERRORFILE
fi
}
#---------------------------------------------------------------------#
# find_executable <target>
# (different on Windows and Unix)
#---------------------------------------------------------------------#
find_executable()
{
PARAM_APPLICATION=""
[ -f ./release/$1.exe ] && PARAM_APPLICATION="./release/$1.exe"
[ -f ./x64/release/$1.exe ] && PARAM_APPLICATION="./x64/release/$1.exe"
[ -x ./$1 ] && PARAM_APPLICATION="./$1"
echo "$PARAM_APPLICATION"
}
#---------------------------------------------------------------------#
# compile_and_run <target>
#---------------------------------------------------------------------#
compile_and_run()
{
echo "Compiling $1 ... "
SUCCES="y"
if eval '${MAKE_CMD} $1' ; then
echo " succesful compilation of $1" >> $ERRORFILE
else
echo " ERROR: compilation of $1" >> $ERRORFILE
SUCCES=""
fi
if [ -n "$DO_RUN" ] ; then
if [ -n "${SUCCES}" ] ; then
OUTPUTFILE=ProgramOutput.$1.$PLATFORM
rm -f $OUTPUTFILE
COMMAND="`find_executable $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 " successful execution of $1" >> $ERRORFILE
else
echo " ERROR: execution of $1" >> $ERRORFILE
fi
else
echo " ERROR: not executed $1" >> $ERRORFILE
fi
fi
}
# Backup previous log file cgal_test_with_cmake.log
[ -f cgal_test_with_cmake.log ] && mv -f cgal_test_with_cmake.log cgal_test_with_cmake.log.bak
# redirect cgal_test_with_cmake output to log file cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo "- Compiler output from platform $PLATFORM" >> cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo >> cgal_test_with_cmake.log
(
#---------------------------------------------------------------------#
# remove the previous error file
#---------------------------------------------------------------------#
rm -f $ERRORFILE
touch $ERRORFILE
#---------------------------------------------------------------------#
# configure, compile and run the tests
#---------------------------------------------------------------------#
configure
if [ $# -ne 0 ] ; then
for file in $* ; do
compile_and_run $file
done
else
echo "Run all tests."
compile_and_run analysis_test
compile_and_run normal_estimation_test
compile_and_run remove_outliers_test
compile_and_run smoothing_test
# Do *not* call make clean (too slow when called by developer)
NEED_CLEAN=
fi
#
# The clean target generated by CMake under cygwin
# always fails for some reason
#
if [ -n "${NEED_CLEAN}" ]; then
if ! ( uname | grep -q "CYGWIN" ) ; then
${MAKE_CMD} -fMakefile clean
fi
fi
) 2>&1 | tee -a cgal_test_with_cmake.log
#---------------------------------------------------------------------#
# Catenate other log files to cgal_test_with_cmake.log
#---------------------------------------------------------------------#
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo "- Tests output for platform $PLATFORM" >> cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo >> cgal_test_with_cmake.log
cat ProgramOutput.*.$PLATFORM >> cgal_test_with_cmake.log
echo >> cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo "- Error output from platform $PLATFORM" >> cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo >> cgal_test_with_cmake.log
cat $ERRORFILE >> cgal_test_with_cmake.log

View File

@ -0,0 +1,12 @@
@echo off
rem Double-clickable version of cgal_test_with_cmake on Windows/Cygwin/VisualC++
rem Path to Cygwin and VisualC++ is hard-coded
PATH=c:\Applis\cygwin\bin;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;%PATH%
sh ./cgal_test_with_cmake
pause
rem Compare logs with Beyond Compare
"C:\Program Files\Beyond Compare 2\BC2.exe" ./cgal_test_with_cmake.log.bak ./cgal_test_with_cmake.log

View File

@ -1,12 +0,0 @@
@echo off
rem Double-clickable version of quick_test_suite.sh on Windows/Cygwin
rem Path to Cygwin is hard-coded
PATH=%PATH%;c:\Applis\cygwin\bin
sh ./quick_test_suite.sh
pause
rem Compare logs with Beyond Compare
"C:\Program Files\Beyond Compare 2\BC2.exe" ./quick_test_suite.log.bak ./quick_test_suite.log

View File

@ -1,112 +0,0 @@
#!/bin/bash
# This application is a cross-platform version of cgal_test.
# This is a script for the CGAL test suite. Such a script must obey
# the following rules:
#
# - 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
# - applications must be already compiled
ERRORFILE=error.txt
#---------------------------------------------------------------------#
# find_executable <target>
# (different on Windows and Unix)
#---------------------------------------------------------------------#
find_executable()
{
PARAM_APPLICATION=""
[ -f ./debug/$1.exe ] && PARAM_APPLICATION="./debug/$1.exe"
[ -f ./release/$1.exe ] && PARAM_APPLICATION="./release/$1.exe"
[ -f ./x64/debug/$1.exe ] && PARAM_APPLICATION="./x64/debug/$1.exe"
[ -f ./x64/release/$1.exe ] && PARAM_APPLICATION="./x64/release/$1.exe"
[ -x ./$1 ] && PARAM_APPLICATION="./$1"
echo "$PARAM_APPLICATION"
}
#---------------------------------------------------------------------#
# run <target>
#---------------------------------------------------------------------#
run()
{
# Find exe
COMMAND="`find_executable $1`"
if [ -f "$COMMAND" ]; then
# Add params
if [ -f $1.cmd ] ; then
COMMAND="$COMMAND `cat $1.cmd`"
fi
if [ -f $1.cin ] ; then
COMMAND="cat $1.cin | $COMMAND"
fi
# Run
echo "------------------------------------------------------------------"
echo "- Executing $1"
echo "------------------------------------------------------------------"
echo
ulimit -t 3600 2> /dev/null
if eval $COMMAND 2>&1 ; then
echo " successful execution of $1" >> $ERRORFILE
else
echo " ERROR: execution of $1" >> $ERRORFILE
fi
else
echo " ERROR: not executed $1" >> $ERRORFILE
fi
}
#---------------------------------------------------------------------#
# main
#---------------------------------------------------------------------#
# Backup previous log file
[ -f quick_test_suite.log ] && mv -f quick_test_suite.log quick_test_suite.log.bak
# start redirection to log file
(
#---------------------------------------------------------------------#
# remove the previous error file
#---------------------------------------------------------------------#
rm -f $ERRORFILE
touch $ERRORFILE
#---------------------------------------------------------------------#
# run the tests
#---------------------------------------------------------------------#
if [ $# -ne 0 ] ; then
for file in $* ; do
run $file
done
else
echo "Run all tests."
run analysis_test
run normal_estimation_test
run remove_outliers_test
run smoothing_test
fi
#---------------------------------------------------------------------#
# Recap results
#---------------------------------------------------------------------#
echo "------------------------------------------------------------------"
echo "- Results"
echo "------------------------------------------------------------------"
echo
cat $ERRORFILE
echo
rm -f $ERRORFILE
) 2>&1 | tee quick_test_suite.log

View File

@ -0,0 +1,172 @@
#! /bin/sh
#
# This script is a modified version of cgal_test_with_cmake which:
# - is cross-platform Unix/make and Cygwin/VisualC++
# - concats all log files to cgal_test_with_cmake.log
# - does not clean up object files and executables (too slow when called by developer)
#
# 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_with_cmake
# - 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
ERRORFILE=error.txt
DO_RUN=y
case "$CMAKE_GENERATOR" in
Visual* ) # if VisualC++
solution=`ls *.sln`
MAKE_CMD="devenv ${solution} /Build Release /Project"
;;
* ) # if make
MAKE_CMD="make -fMakefile"
;;
esac
NEED_CLEAN=
#---------------------------------------------------------------------#
# configure
#---------------------------------------------------------------------#
configure()
{
echo "Configuring... "
if eval 'cmake "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \
-DCGAL_DIR="$CGAL_DIR" \
.' ; then
echo " succesful configuration" >> $ERRORFILE
else
echo " ERROR: configuration" >> $ERRORFILE
fi
}
#---------------------------------------------------------------------#
# find_executable <target>
# (different on Windows and Unix)
#---------------------------------------------------------------------#
find_executable()
{
PARAM_APPLICATION=""
[ -f ./release/$1.exe ] && PARAM_APPLICATION="./release/$1.exe"
[ -f ./x64/release/$1.exe ] && PARAM_APPLICATION="./x64/release/$1.exe"
[ -x ./$1 ] && PARAM_APPLICATION="./$1"
echo "$PARAM_APPLICATION"
}
#---------------------------------------------------------------------#
# compile_and_run <target>
#---------------------------------------------------------------------#
compile_and_run()
{
echo "Compiling $1 ... "
SUCCES="y"
if eval '${MAKE_CMD} $1' ; then
echo " succesful compilation of $1" >> $ERRORFILE
else
echo " ERROR: compilation of $1" >> $ERRORFILE
SUCCES=""
fi
if [ -n "$DO_RUN" ] ; then
if [ -n "${SUCCES}" ] ; then
OUTPUTFILE=ProgramOutput.$1.$PLATFORM
rm -f $OUTPUTFILE
COMMAND="`find_executable $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 " successful execution of $1" >> $ERRORFILE
else
echo " ERROR: execution of $1" >> $ERRORFILE
fi
else
echo " ERROR: not executed $1" >> $ERRORFILE
fi
fi
}
# Backup previous log file cgal_test_with_cmake.log
[ -f cgal_test_with_cmake.log ] && mv -f cgal_test_with_cmake.log cgal_test_with_cmake.log.bak
# redirect cgal_test_with_cmake output to log file cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo "- Compiler output from platform $PLATFORM" >> cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo >> cgal_test_with_cmake.log
(
#---------------------------------------------------------------------#
# remove the previous error file
#---------------------------------------------------------------------#
rm -f $ERRORFILE
touch $ERRORFILE
#---------------------------------------------------------------------#
# configure, compile and run the tests
#---------------------------------------------------------------------#
configure
if [ $# -ne 0 ] ; then
for file in $* ; do
compile_and_run $file
done
else
echo "Run all tests."
compile_and_run APSS_reconstruction
compile_and_run poisson_reconstruction
compile_and_run poisson_reconstruction_example
# Do *not* call make clean (too slow when called by developer)
NEED_CLEAN=
fi
#
# The clean target generated by CMake under cygwin
# always fails for some reason
#
if [ -n "${NEED_CLEAN}" ]; then
if ! ( uname | grep -q "CYGWIN" ) ; then
${MAKE_CMD} -fMakefile clean
fi
fi
) 2>&1 | tee -a cgal_test_with_cmake.log
#---------------------------------------------------------------------#
# Catenate other log files to cgal_test_with_cmake.log
#---------------------------------------------------------------------#
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo "- Tests output for platform $PLATFORM" >> cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo >> cgal_test_with_cmake.log
cat ProgramOutput.*.$PLATFORM >> cgal_test_with_cmake.log
echo >> cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo "- Error output from platform $PLATFORM" >> cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo >> cgal_test_with_cmake.log
cat $ERRORFILE >> cgal_test_with_cmake.log

View File

@ -0,0 +1,12 @@
@echo off
rem Double-clickable version of cgal_test_with_cmake on Windows/Cygwin/VisualC++
rem Path to Cygwin and VisualC++ is hard-coded
PATH=c:\Applis\cygwin\bin;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;%PATH%
sh ./cgal_test_with_cmake
pause
rem Compare logs with Beyond Compare
"C:\Program Files\Beyond Compare 2\BC2.exe" ./cgal_test_with_cmake.log.bak ./cgal_test_with_cmake.log

View File

@ -1,12 +0,0 @@
@echo off
rem Double-clickable version of quick_test_suite.sh on Windows/Cygwin
rem Path to Cygwin is hard-coded
PATH=%PATH%;c:\Applis\cygwin\bin
sh ./quick_test_suite.sh
pause
rem Compare logs with Beyond Compare
"C:\Program Files\Beyond Compare 2\BC2.exe" ./quick_test_suite.log.bak ./quick_test_suite.log

View File

@ -1,111 +0,0 @@
#!/bin/bash
# This application is a cross-platform version of cgal_test.
# This is a script for the CGAL test suite. Such a script must obey
# the following rules:
#
# - 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
# - applications must be already compiled
ERRORFILE=error.txt
#---------------------------------------------------------------------#
# find_executable <target>
# (different on Windows and Unix)
#---------------------------------------------------------------------#
find_executable()
{
PARAM_APPLICATION=""
[ -f ./debug/$1.exe ] && PARAM_APPLICATION="./debug/$1.exe"
[ -f ./release/$1.exe ] && PARAM_APPLICATION="./release/$1.exe"
[ -f ./x64/debug/$1.exe ] && PARAM_APPLICATION="./x64/debug/$1.exe"
[ -f ./x64/release/$1.exe ] && PARAM_APPLICATION="./x64/release/$1.exe"
[ -x ./$1 ] && PARAM_APPLICATION="./$1"
echo "$PARAM_APPLICATION"
}
#---------------------------------------------------------------------#
# run <target>
#---------------------------------------------------------------------#
run()
{
# Find exe
COMMAND="`find_executable $1`"
if [ -f "$COMMAND" ]; then
# Add params
if [ -f $1.cmd ] ; then
COMMAND="$COMMAND `cat $1.cmd`"
fi
if [ -f $1.cin ] ; then
COMMAND="cat $1.cin | $COMMAND"
fi
# Run
echo "------------------------------------------------------------------"
echo "- Executing $1"
echo "------------------------------------------------------------------"
echo
ulimit -t 3600 2> /dev/null
if eval $COMMAND 2>&1 ; then
echo " successful execution of $1" >> $ERRORFILE
else
echo " ERROR: execution of $1" >> $ERRORFILE
fi
else
echo " ERROR: not executed $1" >> $ERRORFILE
fi
}
#---------------------------------------------------------------------#
# main
#---------------------------------------------------------------------#
# Backup previous log file
[ -f quick_test_suite.log ] && mv -f quick_test_suite.log quick_test_suite.log.bak
# start redirection to log file
(
#---------------------------------------------------------------------#
# remove the previous error file
#---------------------------------------------------------------------#
rm -f $ERRORFILE
touch $ERRORFILE
#---------------------------------------------------------------------#
# run the tests
#---------------------------------------------------------------------#
if [ $# -ne 0 ] ; then
for file in $* ; do
run $file
done
else
echo "Run all tests."
run APSS_reconstruction
run poisson_reconstruction
run poisson_reconstruction_example
fi
#---------------------------------------------------------------------#
# Recap results
#---------------------------------------------------------------------#
echo "------------------------------------------------------------------"
echo "- Results"
echo "------------------------------------------------------------------"
echo
cat $ERRORFILE
echo
rm -f $ERRORFILE
) 2>&1 | tee quick_test_suite.log

View File

@ -0,0 +1,10 @@
@echo off
rem Double-clickable version of run_testsuite_with_cmake on Windows/Cygwin
rem Path to Cygwin is hard-coded
PATH=c:\Applis\cygwin\bin;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;Z:\src\cgal\SVNROOT\trunk\Testsuite\test;%PATH%
sh -c "run_testsuite_with_cmake ; cat error.txt"
pause

View File

@ -0,0 +1,171 @@
#! /bin/sh
#
# This script is a modified version of cgal_test_with_cmake which:
# - is cross-platform Unix/make and Cygwin/VisualC++
# - concats all log files to cgal_test_with_cmake.log
# - does not clean up object files and executables (too slow when called by developer)
#
# 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_with_cmake
# - 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
ERRORFILE=error.txt
DO_RUN=y
case "$CMAKE_GENERATOR" in
Visual* ) # if VisualC++
solution=`ls *.sln`
MAKE_CMD="devenv ${solution} /Build Release /Project"
;;
* ) # if make
MAKE_CMD="make -fMakefile"
;;
esac
NEED_CLEAN=
#---------------------------------------------------------------------#
# configure
#---------------------------------------------------------------------#
configure()
{
echo "Configuring... "
if eval 'cmake "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \
-DCGAL_DIR="$CGAL_DIR" \
.' ; then
echo " succesful configuration" >> $ERRORFILE
else
echo " ERROR: configuration" >> $ERRORFILE
fi
}
#---------------------------------------------------------------------#
# find_executable <target>
# (different on Windows and Unix)
#---------------------------------------------------------------------#
find_executable()
{
PARAM_APPLICATION=""
[ -f ./release/$1.exe ] && PARAM_APPLICATION="./release/$1.exe"
[ -f ./x64/release/$1.exe ] && PARAM_APPLICATION="./x64/release/$1.exe"
[ -x ./$1 ] && PARAM_APPLICATION="./$1"
echo "$PARAM_APPLICATION"
}
#---------------------------------------------------------------------#
# compile_and_run <target>
#---------------------------------------------------------------------#
compile_and_run()
{
echo "Compiling $1 ... "
SUCCES="y"
if eval '${MAKE_CMD} $1' ; then
echo " succesful compilation of $1" >> $ERRORFILE
else
echo " ERROR: compilation of $1" >> $ERRORFILE
SUCCES=""
fi
if [ -n "$DO_RUN" ] ; then
if [ -n "${SUCCES}" ] ; then
OUTPUTFILE=ProgramOutput.$1.$PLATFORM
rm -f $OUTPUTFILE
COMMAND="`find_executable $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 " successful execution of $1" >> $ERRORFILE
else
echo " ERROR: execution of $1" >> $ERRORFILE
fi
else
echo " ERROR: not executed $1" >> $ERRORFILE
fi
fi
}
# Backup previous log file cgal_test_with_cmake.log
[ -f cgal_test_with_cmake.log ] && mv -f cgal_test_with_cmake.log cgal_test_with_cmake.log.bak
# redirect cgal_test_with_cmake output to log file cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo "- Compiler output from platform $PLATFORM" >> cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo >> cgal_test_with_cmake.log
(
#---------------------------------------------------------------------#
# remove the previous error file
#---------------------------------------------------------------------#
rm -f $ERRORFILE
touch $ERRORFILE
#---------------------------------------------------------------------#
# configure, compile and run the tests
#---------------------------------------------------------------------#
configure
if [ $# -ne 0 ] ; then
for file in $* ; do
compile_and_run $file
done
else
echo "Run all tests."
compile_and_run APSS_reconstruction_test
compile_and_run poisson_reconstruction_test
# Do *not* call make clean (too slow when called by developer)
NEED_CLEAN=
fi
#
# The clean target generated by CMake under cygwin
# always fails for some reason
#
if [ -n "${NEED_CLEAN}" ]; then
if ! ( uname | grep -q "CYGWIN" ) ; then
${MAKE_CMD} -fMakefile clean
fi
fi
) 2>&1 | tee -a cgal_test_with_cmake.log
#---------------------------------------------------------------------#
# Catenate other log files to cgal_test_with_cmake.log
#---------------------------------------------------------------------#
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo "- Tests output for platform $PLATFORM" >> cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo >> cgal_test_with_cmake.log
cat ProgramOutput.*.$PLATFORM >> cgal_test_with_cmake.log
echo >> cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo "- Error output from platform $PLATFORM" >> cgal_test_with_cmake.log
echo "------------------------------------------------------------------" >> cgal_test_with_cmake.log
echo >> cgal_test_with_cmake.log
cat $ERRORFILE >> cgal_test_with_cmake.log

View File

@ -0,0 +1,12 @@
@echo off
rem Double-clickable version of cgal_test_with_cmake on Windows/Cygwin/VisualC++
rem Path to Cygwin and VisualC++ is hard-coded
PATH=c:\Applis\cygwin\bin;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;%PATH%
sh ./cgal_test_with_cmake
pause
rem Compare logs with Beyond Compare
"C:\Program Files\Beyond Compare 2\BC2.exe" ./cgal_test_with_cmake.log.bak ./cgal_test_with_cmake.log

View File

@ -1,12 +0,0 @@
@echo off
rem Double-clickable version of quick_test_suite.sh on Windows/Cygwin
rem Path to Cygwin is hard-coded
PATH=%PATH%;c:\Applis\cygwin\bin
sh ./quick_test_suite.sh
pause
rem Compare logs with Beyond Compare
"C:\Program Files\Beyond Compare 2\BC2.exe" ./quick_test_suite.log.bak ./quick_test_suite.log

View File

@ -1,110 +0,0 @@
#!/bin/bash
# This application is a cross-platform version of cgal_test.
# This is a script for the CGAL test suite. Such a script must obey
# the following rules:
#
# - 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
# - applications must be already compiled
ERRORFILE=error.txt
#---------------------------------------------------------------------#
# find_executable <target>
# (different on Windows and Unix)
#---------------------------------------------------------------------#
find_executable()
{
PARAM_APPLICATION=""
[ -f ./debug/$1.exe ] && PARAM_APPLICATION="./debug/$1.exe"
[ -f ./release/$1.exe ] && PARAM_APPLICATION="./release/$1.exe"
[ -f ./x64/debug/$1.exe ] && PARAM_APPLICATION="./x64/debug/$1.exe"
[ -f ./x64/release/$1.exe ] && PARAM_APPLICATION="./x64/release/$1.exe"
[ -x ./$1 ] && PARAM_APPLICATION="./$1"
echo "$PARAM_APPLICATION"
}
#---------------------------------------------------------------------#
# run <target>
#---------------------------------------------------------------------#
run()
{
# Find exe
COMMAND="`find_executable $1`"
if [ -f "$COMMAND" ]; then
# Add params
if [ -f $1.cmd ] ; then
COMMAND="$COMMAND `cat $1.cmd`"
fi
if [ -f $1.cin ] ; then
COMMAND="cat $1.cin | $COMMAND"
fi
# Run
echo "------------------------------------------------------------------"
echo "- Executing $1"
echo "------------------------------------------------------------------"
echo
ulimit -t 3600 2> /dev/null
if eval $COMMAND 2>&1 ; then
echo " successful execution of $1" >> $ERRORFILE
else
echo " ERROR: execution of $1" >> $ERRORFILE
fi
else
echo " ERROR: not executed $1" >> $ERRORFILE
fi
}
#---------------------------------------------------------------------#
# main
#---------------------------------------------------------------------#
# Backup previous log file
[ -f quick_test_suite.log ] && mv -f quick_test_suite.log quick_test_suite.log.bak
# start redirection to log file
(
#---------------------------------------------------------------------#
# remove the previous error file
#---------------------------------------------------------------------#
rm -f $ERRORFILE
touch $ERRORFILE
#---------------------------------------------------------------------#
# run the tests
#---------------------------------------------------------------------#
if [ $# -ne 0 ] ; then
for file in $* ; do
run $file
done
else
echo "Run all tests."
run APSS_reconstruction_test
run poisson_reconstruction_test
fi
#---------------------------------------------------------------------#
# Recap results
#---------------------------------------------------------------------#
echo "------------------------------------------------------------------"
echo "- Results"
echo "------------------------------------------------------------------"
echo
cat $ERRORFILE
echo
rm -f $ERRORFILE
) 2>&1 | tee quick_test_suite.log