From 1623097ed675664eef0e51bd3e57552c5596cc5d Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 30 Dec 2020 14:48:04 +0100 Subject: [PATCH 1/5] Don't force cmake options if INIT_FILE is defined --- .../cgal_test_with_cmake | 44 ++++++++++++------- .../test/Surface_sweep_2/cgal_test_base | 38 ++++++++++------ 2 files changed, 54 insertions(+), 28 deletions(-) diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake index c1183a846d8..099686a5d81 100755 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake @@ -128,23 +128,37 @@ TRIM=35 configure() { echo "Configuring... " - rm -rf CMakeCache.txt CMakeFiles/ - echo "cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ - -DCGAL_DIR=\"$CGAL_DIR\" \ - -DCGAL_CXX_FLAGS:STRING=\"$TESTSUITE_CXXFLAGS -I../../include\" \ - -DCGAL_EXE_LINKER_FLAGS=\"$TESTSUITE_LDFLAGS\" \ - -DCMAKE_BUILD_TYPE=NOTFOUND \ - ." - if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ - -DCGAL_DIR="$CGAL_DIR" \ - -DCGAL_CXX_FLAGS:STRING="$TESTSUITE_CXXFLAGS -I../../include" \ - -DCGAL_EXE_LINKER_FLAGS="$TESTSUITE_LDFLAGS" \ - -DCMAKE_BUILD_TYPE=NOTFOUND \ - .' ; then + if [ -f "$INIT_FILE" ] + then + if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ + -DCGAL_DIR="$CGAL_DIR" \ + -DCGAL_CXX_FLAGS:STRING="$CGAL_CXX_FLAGS $TESTSUITE_CXXFLAGS -I../../include" \ + -DCGAL_EXE_LINKER_FLAGS="$CGAL_EXE_LINKER_FLAGS $TESTSUITE_LDFLAGS" \ + .' ; then - echo " successful configuration" >> $ERRORFILE + echo " successful configuration" >> $ERRORFILE + else + echo " ERROR: configuration" >> $ERRORFILE + fi else - echo " ERROR: configuration" >> $ERRORFILE + rm -rf CMakeCache.txt CMakeFiles/ + echo "cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ + - DCGAL_DIR=\"$CGAL_DIR\" \ + - DCGAL_CXX_FLAGS:STRING=\"$TESTSUITE_CXXFLAGS -I../../include\" \ + - DCGAL_EXE_LINKER_FLAGS=\"$TESTSUITE_LDFLAGS\" \ + - DCMAKE_BUILD_TYPE=NOTFOUND \ + . " + if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ + -DCGAL_DIR="$CGAL_DIR" \ + -DCGAL_CXX_FLAGS:STRING="$TESTSUITE_CXXFLAGS -I../../include" \ + -DCGAL_EXE_LINKER_FLAGS="$TESTSUITE_LDFLAGS" \ + -DCMAKE_BUILD_TYPE=NOTFOUND \ + .' ; then + + echo " successful configuration" >> $ERRORFILE + else + echo " ERROR: configuration" >> $ERRORFILE + fi fi } diff --git a/Surface_sweep_2/test/Surface_sweep_2/cgal_test_base b/Surface_sweep_2/test/Surface_sweep_2/cgal_test_base index 59f380da802..f816494641d 100755 --- a/Surface_sweep_2/test/Surface_sweep_2/cgal_test_base +++ b/Surface_sweep_2/test/Surface_sweep_2/cgal_test_base @@ -28,21 +28,33 @@ fi configure() { - echo "Configuring... " + echo "Configuring... " - rm CMakeCache.txt + rm CMakeCache.txt + if [ -f "$INIT_FILE" ] + then + if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ + -DCGAL_DIR="$CGAL_DIR" \ + -DCGAL_CXX_FLAGS:STRING="$CGAL_CXX_FLAGS $TESTSUITE_CXXFLAGS" \ + -DCGAL_EXE_LINKER_FLAGS="CGAL_EXE_LINKER_FLAGS $TESTSUITE_LDFLAGS" \ + .' ; then + echo " successful configuration" >> $ERRORFILE + else + echo " ERROR: configuration" >> $ERRORFILE + fi + else + if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ + -DCGAL_DIR="$CGAL_DIR" \ + -DCGAL_CXX_FLAGS:STRING="$TESTSUITE_CXXFLAGS" \ + -DCGAL_EXE_LINKER_FLAGS="$TESTSUITE_LDFLAGS" \ + -DCMAKE_BUILD_TYPE=NOTFOUND \ + .' ; then - if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ - -DCGAL_DIR="$CGAL_DIR" \ - -DCGAL_CXX_FLAGS:STRING="$TESTSUITE_CXXFLAGS" \ - -DCGAL_EXE_LINKER_FLAGS="$TESTSUITE_LDFLAGS" \ - -DCMAKE_BUILD_TYPE=NOTFOUND \ - .' ; then - - echo " successful configuration" >> $ERRORFILE - else - echo " ERROR: configuration" >> $ERRORFILE - fi + echo " successful configuration" >> $ERRORFILE + else + echo " ERROR: configuration" >> $ERRORFILE + fi + fi } compile() From 1ee14b23bc676d6135944e734ad2fb18f7add50e Mon Sep 17 00:00:00 2001 From: Maxime GIMENO Date: Thu, 14 Jan 2021 10:32:34 +0100 Subject: [PATCH 2/5] Update Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake Co-authored-by: Laurent Rineau --- .../test/Arrangement_on_surface_2/cgal_test_with_cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake index 099686a5d81..befa82faa0a 100755 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake @@ -143,10 +143,10 @@ configure() else rm -rf CMakeCache.txt CMakeFiles/ echo "cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ - - DCGAL_DIR=\"$CGAL_DIR\" \ - - DCGAL_CXX_FLAGS:STRING=\"$TESTSUITE_CXXFLAGS -I../../include\" \ - - DCGAL_EXE_LINKER_FLAGS=\"$TESTSUITE_LDFLAGS\" \ - - DCMAKE_BUILD_TYPE=NOTFOUND \ + -DCGAL_DIR=\"$CGAL_DIR\" \ + -DCGAL_CXX_FLAGS:STRING=\"$TESTSUITE_CXXFLAGS -I../../include\" \ + -DCGAL_EXE_LINKER_FLAGS=\"$TESTSUITE_LDFLAGS\" \ + -DCMAKE_BUILD_TYPE=NOTFOUND \ . " if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ -DCGAL_DIR="$CGAL_DIR" \ From 1eb035085d49d9ac9d1ab393ae1a48428d1c8ac2 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 28 Jan 2021 10:53:28 +0100 Subject: [PATCH 3/5] Fix Surface_sweep_2 tests --- .../test/Surface_sweep_2/cgal_test_base | 84 +++++++++---------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/Surface_sweep_2/test/Surface_sweep_2/cgal_test_base b/Surface_sweep_2/test/Surface_sweep_2/cgal_test_base index f816494641d..20ec132f55b 100755 --- a/Surface_sweep_2/test/Surface_sweep_2/cgal_test_base +++ b/Surface_sweep_2/test/Surface_sweep_2/cgal_test_base @@ -36,7 +36,7 @@ configure() if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ -DCGAL_DIR="$CGAL_DIR" \ -DCGAL_CXX_FLAGS:STRING="$CGAL_CXX_FLAGS $TESTSUITE_CXXFLAGS" \ - -DCGAL_EXE_LINKER_FLAGS="CGAL_EXE_LINKER_FLAGS $TESTSUITE_LDFLAGS" \ + -DCGAL_EXE_LINKER_FLAGS="$CGAL_EXE_LINKER_FLAGS $TESTSUITE_LDFLAGS" \ .' ; then echo " successful configuration" >> $ERRORFILE else @@ -78,12 +78,12 @@ compile() compile_and_run() { - + echo "---$1---" # running general test if compile $1 $2 $3 ; then - echo " compilation of $1 succeeded" >> $ERRORFILE + echo " compilation of $1 succeeded" >> $ERRORFILE SUBCURVES="" run $1 $2 $3 $4 SUBCURVES="subcurves" @@ -100,14 +100,14 @@ clean_tests() { if [ "${TEST_WITH_CMAKE}" != "FALSE" ]; then # - # The clean target generated by CMake under cygwin + # The clean target generated by CMake under cygwin # always fails for some reason # - if ! ( uname | grep -q "CYGWIN" ) ; then - "${MAKE_CMD}" -f Makefile clean - fi + if ! ( uname | grep -q "CYGWIN" ) ; then + "${MAKE_CMD}" -f Makefile clean + fi else - eval "${MAKE_CMD} clean > /dev/null 2>&1" + eval "${MAKE_CMD} clean > /dev/null 2>&1" fi } @@ -117,7 +117,7 @@ compile_and_run_sweep() # running general test if compile $1 $2 $3 ; then - echo " compilation of $1 succeeded" >> $ERRORFILE + echo " compilation of $1 succeeded" >> $ERRORFILE run $1 $2 $3 $4 else echo " ERROR: compilation of $1 failed" >> $ERRORFILE @@ -134,28 +134,28 @@ run() for DATAFILE in ${datafiles} do if [ -d $DATAFILE ]; then - echo "$DATEFILE is a directory" + echo "$DATEFILE is a directory" continue fi if [ -f $1 ] ; then DATANAME=`basename $DATAFILE` - if [ $SUBCURVES="subcurves" ] ; then - OUTPUTFILE=ProgramOutput.$3.$1.$DATANAME.$SUBCURVES.$PLATFORM.$2 + if [ $SUBCURVES="subcurves" ] ; then + OUTPUTFILE=ProgramOutput.$3.$1.$DATANAME.$SUBCURVES.$PLATFORM.$2 else - OUTPUTFILE=ProgramOutput.$3.$1.$DATANAME.$PLATFORM.$2 - fi - rm -f $OUTPUTFILE - COMMAND="./$1 $DATAFILE $SUBCURVES" - echo "Executing $1 $DATANAME $SUBCURVES ... " - echo - if eval $COMMAND > $OUTPUTFILE 2>&1 ; then - echo " execution of $1 $DATAFILE $SUBCURVES succeeded" >> $ERRORFILE - else - echo " ERROR: execution of $1 $DATAFILE $SUBCURVES failed" >> $ERRORFILE - fi + OUTPUTFILE=ProgramOutput.$3.$1.$DATANAME.$PLATFORM.$2 + fi + rm -f $OUTPUTFILE + COMMAND="./$1 $DATAFILE $SUBCURVES" + echo "Executing $1 $DATANAME $SUBCURVES ... " + echo + if eval $COMMAND > $OUTPUTFILE 2>&1 ; then + echo " execution of $1 $DATAFILE $SUBCURVES succeeded" >> $ERRORFILE + else + echo " ERROR: execution of $1 $DATAFILE $SUBCURVES failed" >> $ERRORFILE + fi else - echo " ERROR: could not execute $1 $DATAFILE $SUBCURVES" >> $ERRORFILE + echo " ERROR: could not execute $1 $DATAFILE $SUBCURVES" >> $ERRORFILE fi done @@ -178,33 +178,33 @@ run_io() for DATAFILE in ${datafiles} do - + if [ -d $DATAFILE ]; then - echo "$DATEFILE is a directory" + echo "$DATEFILE is a directory" continue fi - + IOFILE="${iofiles}`basename ${DATAFILE}`_${SUFFIO}" echo $IOFILE - + if [ -f $1 ] ; then rm -f arr.txt - + DATANAME=`basename $DATAFILE` - IONAME=`basename $IOFILE` + IONAME=`basename $IOFILE` OUTPUTFILE=ProgramOutput.$3.$1.$DATANAME.$PLATFORM.$2 - rm -f $OUTPUTFILE - COMMAND="./$1 $IOFILE $DATAFILE" - echo "Executing $1 $IONAME $DATANAME ... " - echo - if eval $COMMAND > $OUTPUTFILE 2>&1 ; then - echo " execution of $1 $DATAFILE succeeded" >> $ERRORFILE - else - echo " ERROR: execution of $1 $DATAFILE failed" >> $ERRORFILE - fi + rm -f $OUTPUTFILE + COMMAND="./$1 $IOFILE $DATAFILE" + echo "Executing $1 $IONAME $DATANAME ... " + echo + if eval $COMMAND > $OUTPUTFILE 2>&1 ; then + echo " execution of $1 $DATAFILE succeeded" >> $ERRORFILE + else + echo " ERROR: execution of $1 $DATAFILE failed" >> $ERRORFILE + fi else - echo " ERROR: could not execute $1 $DATAFILE " >> $ERRORFILE + echo " ERROR: could not execute $1 $DATAFILE " >> $ERRORFILE fi done @@ -224,8 +224,8 @@ touch $ERRORFILE if [ $# -ne 0 ] ; then case $1 in - -cmake) TEST_WITH_CMAKE="TRUE" ;; - *)TEST_WITH_CMAKE="FALSE" ;; + -cmake) TEST_WITH_CMAKE="TRUE" ;; + *)TEST_WITH_CMAKE="FALSE" ;; esac else TEST_WITH_CMAKE="FALSE" From 99751661bed8b57b4df97adfaf66933942c08da2 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 8 Feb 2021 11:21:10 +0100 Subject: [PATCH 4/5] Another try for aos2 --- .../cgal_test_with_cmake | 377 +++++++++--------- 1 file changed, 189 insertions(+), 188 deletions(-) diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake index befa82faa0a..7c96355065a 100755 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake @@ -128,38 +128,39 @@ TRIM=35 configure() { echo "Configuring... " - if [ -f "$INIT_FILE" ] - then - if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ - -DCGAL_DIR="$CGAL_DIR" \ - -DCGAL_CXX_FLAGS:STRING="$CGAL_CXX_FLAGS $TESTSUITE_CXXFLAGS -I../../include" \ - -DCGAL_EXE_LINKER_FLAGS="$CGAL_EXE_LINKER_FLAGS $TESTSUITE_LDFLAGS" \ - .' ; then + rm -rf CMakeCache.txt CMakeFiles/ - echo " successful configuration" >> $ERRORFILE - else - echo " ERROR: configuration" >> $ERRORFILE - fi +if [ -f "$INIT_FILE" ] +then + if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ + -DCGAL_DIR="$CGAL_DIR" \ + -DCGAL_CXX_FLAGS:STRING="$CGAL_CXX_FLAGS $TESTSUITE_CXXFLAGS -I../../include" \ + -DCGAL_EXE_LINKER_FLAGS="$CGAL_EXE_LINKER_FLAGS $TESTSUITE_LDFLAGS" \ + .' ; then + + echo " successful configuration" >> $ERRORFILE else - rm -rf CMakeCache.txt CMakeFiles/ - echo "cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ + echo " ERROR: configuration" >> $ERRORFILE + fi +else + echo "cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ -DCGAL_DIR=\"$CGAL_DIR\" \ -DCGAL_CXX_FLAGS:STRING=\"$TESTSUITE_CXXFLAGS -I../../include\" \ -DCGAL_EXE_LINKER_FLAGS=\"$TESTSUITE_LDFLAGS\" \ -DCMAKE_BUILD_TYPE=NOTFOUND \ - . " - if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ - -DCGAL_DIR="$CGAL_DIR" \ - -DCGAL_CXX_FLAGS:STRING="$TESTSUITE_CXXFLAGS -I../../include" \ - -DCGAL_EXE_LINKER_FLAGS="$TESTSUITE_LDFLAGS" \ - -DCMAKE_BUILD_TYPE=NOTFOUND \ - .' ; then + ." + if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ + -DCGAL_DIR="$CGAL_DIR" \ + -DCGAL_CXX_FLAGS:STRING="$TESTSUITE_CXXFLAGS -I../../include" \ + -DCGAL_EXE_LINKER_FLAGS="$TESTSUITE_LDFLAGS" \ + -DCMAKE_BUILD_TYPE=NOTFOUND \ + .' ; then - echo " successful configuration" >> $ERRORFILE - else - echo " ERROR: configuration" >> $ERRORFILE - fi + echo " successful configuration" >> $ERRORFILE + else + echo " ERROR: configuration" >> $ERRORFILE fi +fi } compile_test_with_flags() @@ -412,77 +413,77 @@ execute_commands_old_structure() commands_indicator[CONSTRUCTOR]=1 i=1 if [ $# -gt 2 ] ; then - for arg in $* ; do - if [ $i -gt 2 ] ; then - commands_indicator[$arg]=0 - fi - let "i+=1" - done + for arg in $* ; do + if [ $i -gt 2 ] ; then + commands_indicator[$arg]=0 + fi + let "i+=1" + done fi if [ ${commands_indicator[$COMPARE]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/compare.pt data/empty.zero \ - data/empty.zero data/compare $2 + run_trapped_test test_traits \ + data/compare.pt data/empty.zero \ + data/empty.zero data/compare $2 fi if [ ${commands_indicator[$VERTEX]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/vertex.pt data/$1/vertex.xcv \ - data/empty.zero data/$1/vertex $2 + run_trapped_test test_traits \ + data/$1/vertex.pt data/$1/vertex.xcv \ + data/empty.zero data/$1/vertex $2 fi if [ ${commands_indicator[$IS_VERTICAL]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/empty.zero data/$1/is_vertical.xcv data/empty.zero \ - data/$1/is_vertical $2 + run_trapped_test test_traits \ + data/empty.zero data/$1/is_vertical.xcv data/empty.zero \ + data/$1/is_vertical $2 fi if [ ${commands_indicator[$COMPARE_Y_AT_X]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/compare_y_at_x.pt data/$1/compare_y_at_x.xcv \ - data/empty.zero data/$1/compare_y_at_x $2 + run_trapped_test test_traits \ + data/$1/compare_y_at_x.pt data/$1/compare_y_at_x.xcv \ + data/empty.zero data/$1/compare_y_at_x $2 fi if [ ${commands_indicator[$COMPARE_Y_AT_X_LEFT]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/compare_y_at_x_left.pt data/$1/compare_y_at_x_left.xcv \ - data/empty.zero data/$1/compare_y_at_x_left $2 + run_trapped_test test_traits \ + data/$1/compare_y_at_x_left.pt data/$1/compare_y_at_x_left.xcv \ + data/empty.zero data/$1/compare_y_at_x_left $2 fi if [ ${commands_indicator[$COMPARE_Y_AT_X_RIGHT]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/compare_y_at_x_right.pt data/$1/compare_y_at_x_right.xcv \ - data/empty.zero data/$1/compare_y_at_x_right $2 + run_trapped_test test_traits \ + data/$1/compare_y_at_x_right.pt data/$1/compare_y_at_x_right.xcv \ + data/empty.zero data/$1/compare_y_at_x_right $2 fi if [ ${commands_indicator[$MAKE_X_MONOTONE]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/empty.zero data/$1/make_x_monotone.xcv \ - data/$1/make_x_monotone.cv data/$1/make_x_monotone $2 + run_trapped_test test_traits \ + data/empty.zero data/$1/make_x_monotone.xcv \ + data/$1/make_x_monotone.cv data/$1/make_x_monotone $2 fi if [ ${commands_indicator[$INTERSECT]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/intersect.pt data/$1/intersect.xcv \ - data/empty.zero data/$1/intersect $2 + run_trapped_test test_traits \ + data/$1/intersect.pt data/$1/intersect.xcv \ + data/empty.zero data/$1/intersect $2 fi if [ ${commands_indicator[$SPLIT]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/split.pt data/$1/split.xcv \ - data/empty.zero data/$1/split $2 + run_trapped_test test_traits \ + data/$1/split.pt data/$1/split.xcv \ + data/empty.zero data/$1/split $2 fi if [ ${commands_indicator[$ARE_MERGEABLE]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/empty.zero data/$1/are_mergeable.xcv \ - data/empty.zero data/$1/are_mergeable $2 + run_trapped_test test_traits \ + data/empty.zero data/$1/are_mergeable.xcv \ + data/empty.zero data/$1/are_mergeable $2 fi if [ ${commands_indicator[$MERGE]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/empty.zero data/$1/merge.xcv \ - data/empty.zero data/$1/merge $2 + run_trapped_test test_traits \ + data/empty.zero data/$1/merge.xcv \ + data/empty.zero data/$1/merge $2 fi if [ ${commands_indicator[$ASSERTIONS]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/assertions.pt data/$1/assertions.xcv \ - data/empty.zero data/$1/assertions $2 + run_trapped_test test_traits \ + data/$1/assertions.pt data/$1/assertions.xcv \ + data/empty.zero data/$1/assertions $2 fi if [ ${commands_indicator[$CONSTRUCTOR]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/empty.zero data/$1/constructor.xcv \ - data/$1/constructor.cv data/$1/constructor $2 + run_trapped_test test_traits \ + data/empty.zero data/$1/constructor.xcv \ + data/$1/constructor.cv data/$1/constructor $2 fi } @@ -525,120 +526,120 @@ execute_commands_new_structure() commands_indicator[TRIM]=0 i=1 if [ $# -gt 2 ] ; then - for arg in $* ; do - if [ $i -gt 2 ] ; then - commands_indicator[$arg]=1 - fi - let "i+=1" - done + for arg in $* ; do + if [ $i -gt 2 ] ; then + commands_indicator[$arg]=1 + fi + let "i+=1" + done fi if [ ${commands_indicator[$COMPARE]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare $2 fi if [ ${commands_indicator[$VERTEX]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/vertex $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/vertex $2 fi if [ ${commands_indicator[$IS_VERTICAL]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/is_vertical $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/is_vertical $2 fi if [ ${commands_indicator[$COMPARE_X_AT_LIMIT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_x_at_limit $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_x_at_limit $2 fi if [ ${commands_indicator[$COMPARE_X_NEAR_LIMIT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_x_near_limit $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_x_near_limit $2 fi if [ ${commands_indicator[$COMPARE_X_ON_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_x_on_boundary $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_x_on_boundary $2 fi if [ ${commands_indicator[$COMPARE_X_NEAR_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_x_near_boundary $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_x_near_boundary $2 fi if [ ${commands_indicator[$COMPARE_Y_NEAR_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_y_near_boundary $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_y_near_boundary $2 fi if [ ${commands_indicator[$PARAMETER_SPACE_X]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/parameter_space_x $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/parameter_space_x $2 fi if [ ${commands_indicator[$PARAMETER_SPACE_Y]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/parameter_space_y $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/parameter_space_y $2 fi if [ ${commands_indicator[$COMPARE_Y_AT_X]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_y_at_x $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_y_at_x $2 fi if [ ${commands_indicator[$COMPARE_Y_AT_X_LEFT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_y_at_x_left $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_y_at_x_left $2 fi if [ ${commands_indicator[$COMPARE_Y_AT_X_RIGHT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_y_at_x_right $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_y_at_x_right $2 fi if [ ${commands_indicator[$MAKE_X_MONOTONE]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/make_x_monotone $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/make_x_monotone $2 fi if [ ${commands_indicator[$INTERSECT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/intersect $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/intersect $2 fi if [ ${commands_indicator[$SPLIT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/split $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/split $2 fi if [ ${commands_indicator[$ARE_MERGEABLE]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/are_mergeable $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/are_mergeable $2 fi if [ ${commands_indicator[$MERGE]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/merge $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/merge $2 fi if [ ${commands_indicator[$ASSERTIONS]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/assertions $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/assertions $2 fi if [ ${commands_indicator[$CONSTRUCTOR]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/constructor $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/constructor $2 fi if [ ${commands_indicator[$EQUAL]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/equal $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/equal $2 fi if [ ${commands_indicator[$PUSH_BACK]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/push_back $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/push_back $2 fi if [ ${commands_indicator[$PUSH_FRONT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/push_front $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/push_front $2 fi if [ ${commands_indicator[$NUMBER_OF_POINTS]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/number_of_points $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/number_of_points $2 fi if [ ${commands_indicator[$COMPARE_ENDPOINTS_XY]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_endpoints_xy $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_endpoints_xy $2 fi if [ ${commands_indicator[$CONSTRUCT_OPPOSITE]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/construct_opposite $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/construct_opposite $2 fi if [ ${commands_indicator[$TRIM]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/trim $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/trim $2 fi } @@ -668,100 +669,100 @@ execute_commands_traits_adaptor() i=1 if [ $# -gt 2 ] ; then - for arg in $* ; do - if [ $i -gt 2 ] ; then - commands_indicator[$arg]=1 - fi - let "i+=1" - done + for arg in $* ; do + if [ $i -gt 2 ] ; then + commands_indicator[$arg]=1 + fi + let "i+=1" + done fi if [ ${commands_indicator[$PARAMETER_SPACE_X]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/parameter_space_x $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/parameter_space_x $2 fi if [ ${commands_indicator[$PARAMETER_SPACE_Y]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/parameter_space_y $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/parameter_space_y $2 fi if [ ${commands_indicator[$COMPARE_X_AT_LIMIT]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_x_at_limit $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/compare_x_at_limit $2 fi if [ ${commands_indicator[$COMPARE_X_NEAR_LIMIT]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_x_near_limit $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/compare_x_near_limit $2 fi if [ ${commands_indicator[$COMPARE_X_ON_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_x_on_boundary $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/compare_x_on_boundary $2 fi if [ ${commands_indicator[$COMPARE_X_NEAR_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_x_near_boundary $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/compare_x_near_boundary $2 fi if [ ${commands_indicator[$COMPARE_Y_NEAR_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_y_near_boundary $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/compare_y_near_boundary $2 fi if [ ${commands_indicator[$COMPARE_Y_AT_X_LEFT]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_y_at_x_left $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/compare_y_at_x_left $2 fi if [ ${commands_indicator[$ARE_MERGEABLE]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/are_mergeable $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/are_mergeable $2 fi if [ ${commands_indicator[$MERGE]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/merge $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/merge $2 fi if [ ${commands_indicator[X_ON_IDENTIFICATION]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/x_on_idintification $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/x_on_idintification $2 fi if [ ${commands_indicator[Y_ON_IDENTIFICATION]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/x_on_idintification $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/x_on_idintification $2 fi if [ ${commands_indicator[IS_BOUNDED]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/is_bounded $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/is_bounded $2 fi if [ ${commands_indicator[IS_IN_X_RANGE]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/is_in_x_range $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/is_in_x_range $2 fi if [ ${commands_indicator[COMPARE_Y_POSITION]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_y_position $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/compare_y_position $2 fi if [ ${commands_indicator[IS_BETWEEN_CW]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/is_between_cw $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/is_between_cw $2 fi if [ ${commands_indicator[COMPARE_CW_AROUND_POINT]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_cw_around_point $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/compare_cw_around_point $2 fi } @@ -1670,8 +1671,8 @@ touch $ERRORFILE if [ $# -ne 0 ] ; then case $1 in - -cmake) TEST_WITH_CMAKE="TRUE" ;; - *)TEST_WITH_CMAKE="FALSE" ;; + -cmake) TEST_WITH_CMAKE="TRUE" ;; + *)TEST_WITH_CMAKE="FALSE" ;; esac else TEST_WITH_CMAKE="FALSE" From 48aff9e9a157ee3a481d5625e728f88f68fcfe48 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 19 Feb 2021 11:17:20 +0100 Subject: [PATCH 5/5] Fix indentation --- .../cgal_test_with_cmake | 383 +++++++++--------- .../test/Surface_sweep_2/cgal_test_base | 82 ++-- 2 files changed, 232 insertions(+), 233 deletions(-) diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake index 7c96355065a..2b9a9aee225 100755 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake @@ -129,38 +129,37 @@ configure() { echo "Configuring... " rm -rf CMakeCache.txt CMakeFiles/ + if [ -f "$INIT_FILE" ] + then + if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ + -DCGAL_DIR="$CGAL_DIR" \ + -DCGAL_CXX_FLAGS:STRING="$CGAL_CXX_FLAGS $TESTSUITE_CXXFLAGS -I../../include" \ + -DCGAL_EXE_LINKER_FLAGS="$CGAL_EXE_LINKER_FLAGS $TESTSUITE_LDFLAGS" \ + .' ; then -if [ -f "$INIT_FILE" ] -then - if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ - -DCGAL_DIR="$CGAL_DIR" \ - -DCGAL_CXX_FLAGS:STRING="$CGAL_CXX_FLAGS $TESTSUITE_CXXFLAGS -I../../include" \ - -DCGAL_EXE_LINKER_FLAGS="$CGAL_EXE_LINKER_FLAGS $TESTSUITE_LDFLAGS" \ - .' ; then - - echo " successful configuration" >> $ERRORFILE + echo " successful configuration" >> $ERRORFILE + else + echo " ERROR: configuration" >> $ERRORFILE + fi else - echo " ERROR: configuration" >> $ERRORFILE - fi -else - echo "cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ - -DCGAL_DIR=\"$CGAL_DIR\" \ - -DCGAL_CXX_FLAGS:STRING=\"$TESTSUITE_CXXFLAGS -I../../include\" \ - -DCGAL_EXE_LINKER_FLAGS=\"$TESTSUITE_LDFLAGS\" \ - -DCMAKE_BUILD_TYPE=NOTFOUND \ - ." - if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ - -DCGAL_DIR="$CGAL_DIR" \ - -DCGAL_CXX_FLAGS:STRING="$TESTSUITE_CXXFLAGS -I../../include" \ - -DCGAL_EXE_LINKER_FLAGS="$TESTSUITE_LDFLAGS" \ - -DCMAKE_BUILD_TYPE=NOTFOUND \ - .' ; then + echo "cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ + -DCGAL_DIR=\"$CGAL_DIR\" \ + -DCGAL_CXX_FLAGS:STRING=\"$TESTSUITE_CXXFLAGS -I../../include\" \ + -DCGAL_EXE_LINKER_FLAGS=\"$TESTSUITE_LDFLAGS\" \ + -DCMAKE_BUILD_TYPE=NOTFOUND \ + ." + if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ + -DCGAL_DIR="$CGAL_DIR" \ + -DCGAL_CXX_FLAGS:STRING="$TESTSUITE_CXXFLAGS -I../../include" \ + -DCGAL_EXE_LINKER_FLAGS="$TESTSUITE_LDFLAGS" \ + -DCMAKE_BUILD_TYPE=NOTFOUND \ + .' ; then - echo " successful configuration" >> $ERRORFILE - else - echo " ERROR: configuration" >> $ERRORFILE + echo " successful configuration" >> $ERRORFILE + else + echo " ERROR: configuration" >> $ERRORFILE + fi fi -fi } compile_test_with_flags() @@ -413,77 +412,77 @@ execute_commands_old_structure() commands_indicator[CONSTRUCTOR]=1 i=1 if [ $# -gt 2 ] ; then - for arg in $* ; do - if [ $i -gt 2 ] ; then - commands_indicator[$arg]=0 - fi - let "i+=1" - done + for arg in $* ; do + if [ $i -gt 2 ] ; then + commands_indicator[$arg]=0 + fi + let "i+=1" + done fi if [ ${commands_indicator[$COMPARE]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/compare.pt data/empty.zero \ - data/empty.zero data/compare $2 + run_trapped_test test_traits \ + data/compare.pt data/empty.zero \ + data/empty.zero data/compare $2 fi if [ ${commands_indicator[$VERTEX]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/vertex.pt data/$1/vertex.xcv \ - data/empty.zero data/$1/vertex $2 + run_trapped_test test_traits \ + data/$1/vertex.pt data/$1/vertex.xcv \ + data/empty.zero data/$1/vertex $2 fi if [ ${commands_indicator[$IS_VERTICAL]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/empty.zero data/$1/is_vertical.xcv data/empty.zero \ - data/$1/is_vertical $2 + run_trapped_test test_traits \ + data/empty.zero data/$1/is_vertical.xcv data/empty.zero \ + data/$1/is_vertical $2 fi if [ ${commands_indicator[$COMPARE_Y_AT_X]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/compare_y_at_x.pt data/$1/compare_y_at_x.xcv \ - data/empty.zero data/$1/compare_y_at_x $2 + run_trapped_test test_traits \ + data/$1/compare_y_at_x.pt data/$1/compare_y_at_x.xcv \ + data/empty.zero data/$1/compare_y_at_x $2 fi if [ ${commands_indicator[$COMPARE_Y_AT_X_LEFT]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/compare_y_at_x_left.pt data/$1/compare_y_at_x_left.xcv \ - data/empty.zero data/$1/compare_y_at_x_left $2 + run_trapped_test test_traits \ + data/$1/compare_y_at_x_left.pt data/$1/compare_y_at_x_left.xcv \ + data/empty.zero data/$1/compare_y_at_x_left $2 fi if [ ${commands_indicator[$COMPARE_Y_AT_X_RIGHT]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/compare_y_at_x_right.pt data/$1/compare_y_at_x_right.xcv \ - data/empty.zero data/$1/compare_y_at_x_right $2 + run_trapped_test test_traits \ + data/$1/compare_y_at_x_right.pt data/$1/compare_y_at_x_right.xcv \ + data/empty.zero data/$1/compare_y_at_x_right $2 fi if [ ${commands_indicator[$MAKE_X_MONOTONE]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/empty.zero data/$1/make_x_monotone.xcv \ - data/$1/make_x_monotone.cv data/$1/make_x_monotone $2 + run_trapped_test test_traits \ + data/empty.zero data/$1/make_x_monotone.xcv \ + data/$1/make_x_monotone.cv data/$1/make_x_monotone $2 fi if [ ${commands_indicator[$INTERSECT]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/intersect.pt data/$1/intersect.xcv \ - data/empty.zero data/$1/intersect $2 + run_trapped_test test_traits \ + data/$1/intersect.pt data/$1/intersect.xcv \ + data/empty.zero data/$1/intersect $2 fi if [ ${commands_indicator[$SPLIT]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/split.pt data/$1/split.xcv \ - data/empty.zero data/$1/split $2 + run_trapped_test test_traits \ + data/$1/split.pt data/$1/split.xcv \ + data/empty.zero data/$1/split $2 fi if [ ${commands_indicator[$ARE_MERGEABLE]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/empty.zero data/$1/are_mergeable.xcv \ - data/empty.zero data/$1/are_mergeable $2 + run_trapped_test test_traits \ + data/empty.zero data/$1/are_mergeable.xcv \ + data/empty.zero data/$1/are_mergeable $2 fi if [ ${commands_indicator[$MERGE]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/empty.zero data/$1/merge.xcv \ - data/empty.zero data/$1/merge $2 + run_trapped_test test_traits \ + data/empty.zero data/$1/merge.xcv \ + data/empty.zero data/$1/merge $2 fi if [ ${commands_indicator[$ASSERTIONS]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/assertions.pt data/$1/assertions.xcv \ - data/empty.zero data/$1/assertions $2 + run_trapped_test test_traits \ + data/$1/assertions.pt data/$1/assertions.xcv \ + data/empty.zero data/$1/assertions $2 fi if [ ${commands_indicator[$CONSTRUCTOR]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/empty.zero data/$1/constructor.xcv \ - data/$1/constructor.cv data/$1/constructor $2 + run_trapped_test test_traits \ + data/empty.zero data/$1/constructor.xcv \ + data/$1/constructor.cv data/$1/constructor $2 fi } @@ -526,120 +525,120 @@ execute_commands_new_structure() commands_indicator[TRIM]=0 i=1 if [ $# -gt 2 ] ; then - for arg in $* ; do - if [ $i -gt 2 ] ; then - commands_indicator[$arg]=1 - fi - let "i+=1" - done + for arg in $* ; do + if [ $i -gt 2 ] ; then + commands_indicator[$arg]=1 + fi + let "i+=1" + done fi if [ ${commands_indicator[$COMPARE]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare $2 fi if [ ${commands_indicator[$VERTEX]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/vertex $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/vertex $2 fi if [ ${commands_indicator[$IS_VERTICAL]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/is_vertical $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/is_vertical $2 fi if [ ${commands_indicator[$COMPARE_X_AT_LIMIT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_x_at_limit $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_x_at_limit $2 fi if [ ${commands_indicator[$COMPARE_X_NEAR_LIMIT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_x_near_limit $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_x_near_limit $2 fi if [ ${commands_indicator[$COMPARE_X_ON_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_x_on_boundary $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_x_on_boundary $2 fi if [ ${commands_indicator[$COMPARE_X_NEAR_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_x_near_boundary $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_x_near_boundary $2 fi if [ ${commands_indicator[$COMPARE_Y_NEAR_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_y_near_boundary $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_y_near_boundary $2 fi if [ ${commands_indicator[$PARAMETER_SPACE_X]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/parameter_space_x $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/parameter_space_x $2 fi if [ ${commands_indicator[$PARAMETER_SPACE_Y]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/parameter_space_y $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/parameter_space_y $2 fi if [ ${commands_indicator[$COMPARE_Y_AT_X]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_y_at_x $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_y_at_x $2 fi if [ ${commands_indicator[$COMPARE_Y_AT_X_LEFT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_y_at_x_left $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_y_at_x_left $2 fi if [ ${commands_indicator[$COMPARE_Y_AT_X_RIGHT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_y_at_x_right $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_y_at_x_right $2 fi if [ ${commands_indicator[$MAKE_X_MONOTONE]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/make_x_monotone $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/make_x_monotone $2 fi if [ ${commands_indicator[$INTERSECT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/intersect $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/intersect $2 fi if [ ${commands_indicator[$SPLIT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/split $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/split $2 fi if [ ${commands_indicator[$ARE_MERGEABLE]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/are_mergeable $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/are_mergeable $2 fi if [ ${commands_indicator[$MERGE]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/merge $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/merge $2 fi if [ ${commands_indicator[$ASSERTIONS]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/assertions $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/assertions $2 fi if [ ${commands_indicator[$CONSTRUCTOR]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/constructor $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/constructor $2 fi if [ ${commands_indicator[$EQUAL]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/equal $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/equal $2 fi if [ ${commands_indicator[$PUSH_BACK]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/push_back $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/push_back $2 fi if [ ${commands_indicator[$PUSH_FRONT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/push_front $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/push_front $2 fi if [ ${commands_indicator[$NUMBER_OF_POINTS]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/number_of_points $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/number_of_points $2 fi if [ ${commands_indicator[$COMPARE_ENDPOINTS_XY]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_endpoints_xy $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/compare_endpoints_xy $2 fi if [ ${commands_indicator[$CONSTRUCT_OPPOSITE]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/construct_opposite $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/construct_opposite $2 fi if [ ${commands_indicator[$TRIM]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/trim $2 + run_trapped_test test_traits data/$1/points \ + data/$1/xcurves data/$1/curves data/$1/trim $2 fi } @@ -669,100 +668,100 @@ execute_commands_traits_adaptor() i=1 if [ $# -gt 2 ] ; then - for arg in $* ; do - if [ $i -gt 2 ] ; then - commands_indicator[$arg]=1 - fi - let "i+=1" - done + for arg in $* ; do + if [ $i -gt 2 ] ; then + commands_indicator[$arg]=1 + fi + let "i+=1" + done fi if [ ${commands_indicator[$PARAMETER_SPACE_X]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/parameter_space_x $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/parameter_space_x $2 fi if [ ${commands_indicator[$PARAMETER_SPACE_Y]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/parameter_space_y $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/parameter_space_y $2 fi if [ ${commands_indicator[$COMPARE_X_AT_LIMIT]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_x_at_limit $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/compare_x_at_limit $2 fi if [ ${commands_indicator[$COMPARE_X_NEAR_LIMIT]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_x_near_limit $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/compare_x_near_limit $2 fi if [ ${commands_indicator[$COMPARE_X_ON_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_x_on_boundary $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/compare_x_on_boundary $2 fi if [ ${commands_indicator[$COMPARE_X_NEAR_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_x_near_boundary $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/compare_x_near_boundary $2 fi if [ ${commands_indicator[$COMPARE_Y_NEAR_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_y_near_boundary $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/compare_y_near_boundary $2 fi if [ ${commands_indicator[$COMPARE_Y_AT_X_LEFT]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_y_at_x_left $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/compare_y_at_x_left $2 fi if [ ${commands_indicator[$ARE_MERGEABLE]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/are_mergeable $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/are_mergeable $2 fi if [ ${commands_indicator[$MERGE]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/merge $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/merge $2 fi if [ ${commands_indicator[X_ON_IDENTIFICATION]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/x_on_idintification $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/x_on_idintification $2 fi if [ ${commands_indicator[Y_ON_IDENTIFICATION]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/x_on_idintification $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/x_on_idintification $2 fi if [ ${commands_indicator[IS_BOUNDED]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/is_bounded $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/is_bounded $2 fi if [ ${commands_indicator[IS_IN_X_RANGE]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/is_in_x_range $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/is_in_x_range $2 fi if [ ${commands_indicator[COMPARE_Y_POSITION]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_y_position $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/compare_y_position $2 fi if [ ${commands_indicator[IS_BETWEEN_CW]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/is_between_cw $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/is_between_cw $2 fi if [ ${commands_indicator[COMPARE_CW_AROUND_POINT]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_cw_around_point $2 + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/compare_cw_around_point $2 fi } @@ -1671,8 +1670,8 @@ touch $ERRORFILE if [ $# -ne 0 ] ; then case $1 in - -cmake) TEST_WITH_CMAKE="TRUE" ;; - *)TEST_WITH_CMAKE="FALSE" ;; + -cmake) TEST_WITH_CMAKE="TRUE" ;; + *)TEST_WITH_CMAKE="FALSE" ;; esac else TEST_WITH_CMAKE="FALSE" diff --git a/Surface_sweep_2/test/Surface_sweep_2/cgal_test_base b/Surface_sweep_2/test/Surface_sweep_2/cgal_test_base index 20ec132f55b..52f282475ee 100755 --- a/Surface_sweep_2/test/Surface_sweep_2/cgal_test_base +++ b/Surface_sweep_2/test/Surface_sweep_2/cgal_test_base @@ -78,12 +78,12 @@ compile() compile_and_run() { - + echo "---$1---" # running general test if compile $1 $2 $3 ; then - echo " compilation of $1 succeeded" >> $ERRORFILE + echo " compilation of $1 succeeded" >> $ERRORFILE SUBCURVES="" run $1 $2 $3 $4 SUBCURVES="subcurves" @@ -100,14 +100,14 @@ clean_tests() { if [ "${TEST_WITH_CMAKE}" != "FALSE" ]; then # - # The clean target generated by CMake under cygwin + # The clean target generated by CMake under cygwin # always fails for some reason # - if ! ( uname | grep -q "CYGWIN" ) ; then - "${MAKE_CMD}" -f Makefile clean - fi + if ! ( uname | grep -q "CYGWIN" ) ; then + "${MAKE_CMD}" -f Makefile clean + fi else - eval "${MAKE_CMD} clean > /dev/null 2>&1" + eval "${MAKE_CMD} clean > /dev/null 2>&1" fi } @@ -117,7 +117,7 @@ compile_and_run_sweep() # running general test if compile $1 $2 $3 ; then - echo " compilation of $1 succeeded" >> $ERRORFILE + echo " compilation of $1 succeeded" >> $ERRORFILE run $1 $2 $3 $4 else echo " ERROR: compilation of $1 failed" >> $ERRORFILE @@ -134,28 +134,28 @@ run() for DATAFILE in ${datafiles} do if [ -d $DATAFILE ]; then - echo "$DATEFILE is a directory" + echo "$DATEFILE is a directory" continue fi if [ -f $1 ] ; then DATANAME=`basename $DATAFILE` - if [ $SUBCURVES="subcurves" ] ; then - OUTPUTFILE=ProgramOutput.$3.$1.$DATANAME.$SUBCURVES.$PLATFORM.$2 + if [ $SUBCURVES="subcurves" ] ; then + OUTPUTFILE=ProgramOutput.$3.$1.$DATANAME.$SUBCURVES.$PLATFORM.$2 else - OUTPUTFILE=ProgramOutput.$3.$1.$DATANAME.$PLATFORM.$2 - fi - rm -f $OUTPUTFILE - COMMAND="./$1 $DATAFILE $SUBCURVES" - echo "Executing $1 $DATANAME $SUBCURVES ... " - echo - if eval $COMMAND > $OUTPUTFILE 2>&1 ; then - echo " execution of $1 $DATAFILE $SUBCURVES succeeded" >> $ERRORFILE - else - echo " ERROR: execution of $1 $DATAFILE $SUBCURVES failed" >> $ERRORFILE - fi + OUTPUTFILE=ProgramOutput.$3.$1.$DATANAME.$PLATFORM.$2 + fi + rm -f $OUTPUTFILE + COMMAND="./$1 $DATAFILE $SUBCURVES" + echo "Executing $1 $DATANAME $SUBCURVES ... " + echo + if eval $COMMAND > $OUTPUTFILE 2>&1 ; then + echo " execution of $1 $DATAFILE $SUBCURVES succeeded" >> $ERRORFILE + else + echo " ERROR: execution of $1 $DATAFILE $SUBCURVES failed" >> $ERRORFILE + fi else - echo " ERROR: could not execute $1 $DATAFILE $SUBCURVES" >> $ERRORFILE + echo " ERROR: could not execute $1 $DATAFILE $SUBCURVES" >> $ERRORFILE fi done @@ -178,33 +178,33 @@ run_io() for DATAFILE in ${datafiles} do - + if [ -d $DATAFILE ]; then - echo "$DATEFILE is a directory" + echo "$DATEFILE is a directory" continue fi - + IOFILE="${iofiles}`basename ${DATAFILE}`_${SUFFIO}" echo $IOFILE - + if [ -f $1 ] ; then rm -f arr.txt - + DATANAME=`basename $DATAFILE` - IONAME=`basename $IOFILE` + IONAME=`basename $IOFILE` OUTPUTFILE=ProgramOutput.$3.$1.$DATANAME.$PLATFORM.$2 - rm -f $OUTPUTFILE - COMMAND="./$1 $IOFILE $DATAFILE" - echo "Executing $1 $IONAME $DATANAME ... " - echo - if eval $COMMAND > $OUTPUTFILE 2>&1 ; then - echo " execution of $1 $DATAFILE succeeded" >> $ERRORFILE - else - echo " ERROR: execution of $1 $DATAFILE failed" >> $ERRORFILE - fi + rm -f $OUTPUTFILE + COMMAND="./$1 $IOFILE $DATAFILE" + echo "Executing $1 $IONAME $DATANAME ... " + echo + if eval $COMMAND > $OUTPUTFILE 2>&1 ; then + echo " execution of $1 $DATAFILE succeeded" >> $ERRORFILE + else + echo " ERROR: execution of $1 $DATAFILE failed" >> $ERRORFILE + fi else - echo " ERROR: could not execute $1 $DATAFILE " >> $ERRORFILE + echo " ERROR: could not execute $1 $DATAFILE " >> $ERRORFILE fi done @@ -224,8 +224,8 @@ touch $ERRORFILE if [ $# -ne 0 ] ; then case $1 in - -cmake) TEST_WITH_CMAKE="TRUE" ;; - *)TEST_WITH_CMAKE="FALSE" ;; + -cmake) TEST_WITH_CMAKE="TRUE" ;; + *)TEST_WITH_CMAKE="FALSE" ;; esac else TEST_WITH_CMAKE="FALSE"