diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index e7d6ee42564..561dc6b0c64 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -44,7 +44,7 @@ if(ANDROID) find_program(adb_executable adb) endif() if(CGAL_RUN_TESTS_THROUGH_SSH) - set(CGAL_REMOTE_TEST_DIR_PREFIX /home/pi/CGAL/ CACHE PATH "Path to the directory where the tests will be executed in a remote testsuite.")) + set(CGAL_REMOTE_TEST_DIR_PREFIX /home/pi/CGAL/ CACHE PATH "Path to the directory where the tests will be executed in a remote testsuite.") find_program(ssh_executable ssh) find_program(scp_executable scp) endif() diff --git a/Scripts/developer_scripts/global_run_testsuite.sh b/Scripts/developer_scripts/autotest_cgal_with_ctest similarity index 75% rename from Scripts/developer_scripts/global_run_testsuite.sh rename to Scripts/developer_scripts/autotest_cgal_with_ctest index d6ca2e3be76..f4b6604cd86 100644 --- a/Scripts/developer_scripts/global_run_testsuite.sh +++ b/Scripts/developer_scripts/autotest_cgal_with_ctest @@ -20,9 +20,8 @@ export CGAL_URL="https://cgal.geometryfactory.com/CGAL/Members/Releases" export UPLOAD_RESULT_DESTINATION="cgaltest@cgaltest.geometryfactory.com:incoming" export LATEST_LOCATION="${CGAL_URL}/LATEST" export TAR="tar" -export GZIP="gzip" export GUNZIP="gunzip" -export COMPRESSOR="${GZIP}" +export COMPRESSOR="gzip" export CONSOLE_OUTPUT="y" export CGAL_ROOT=`pwd` export USE_TARGZ="n" @@ -34,7 +33,6 @@ export LIST_TEST_PACKAGES="" export ACTUAL_LOGFILE="" export CGAL_DIR="" USE_LATEST_UNZIPPED="" -WITH_DOCKER="n" # ---------------------------------------------------------------------------------------- # Downloads the file "LATEST" whose contents indicates which release to test @@ -135,6 +133,7 @@ unzip_cgal() fi log "${ACTUAL_LOGFILE}" "untarring CGAL" + ${DECOMPRESSOR} -c "${CGAL_ZIPFILE}" > /dev/null ${DECOMPRESSOR} -c "${CGAL_ZIPFILE}" | ${TAR} xf - >> "${ACTUAL_LOGFILE}" 2>&1 if [ ${?} != 0 ]; then error "Could not untar CGAL" @@ -184,10 +183,6 @@ do echo "Compiled test/ directory will be kept." KEEP_TESTS="y" ;; - "-d") - echo "The testsuite will be launched through docker" - WITH_DOCKER="y" - ;; *) CGAL_LOCATION=$arg esac @@ -229,39 +224,43 @@ fi #reset CGAL-DIR with the updated CGAL-I CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-I"` CGAL_RELEASE_ID=$(cat last_release_id) -if [ "${WITH_DOCKER}" = "y" ]; then - #launch docker container - echo "export SHOW_PROGRESS=$SHOW_PROGRESS"> env.sh - echo "export KEEP_TESTS=$KEEP_TESTS">> env.sh - echo "export DO_NOT_UPLOAD=$DO_NOT_UPLOAD">> env.sh - echo "export DO_NOT_TEST=$DO_NOT_TEST">> env.sh - echo "export SCP=$SCP">> env.sh - echo "export WGET=$WGET">> env.sh - echo "export WGET_OPTS=\"$WGET_OPTS\"">> env.sh - echo "export CURL=$CURL">> env.sh - echo "export CURL_OPTS=\"$CURL_OPTS\"">> env.sh - echo "export CGAL_URL=$CGAL_URL">> env.sh - echo "export UPLOAD_RESULT_DESTINATION=$UPLOAD_RESULT_DESTINATION">> env.sh - echo "export LATEST_LOCATION=$LATEST_LOCATION">> env.sh - echo "export TAR=$TAR">> env.sh - echo "export GZIP=$GZIP">> env.sh - echo "export GUNZIP=$GUNZIP">> env.sh - echo "export COMPRESSOR=$COMPRESSOR">> env.sh - echo "export CONSOLE_OUTPUT=$CONSOLE_OUTPUT">> env.sh - echo "export CGAL_ROOT=/cgal_root">> env.sh - echo "export USE_TARGZ=$USE_TARGZ">> env.sh - echo "export USE_TARBZ=$USE_TARBZ">> env.sh - echo "export CGAL_RELEASE=$CGAL_RELEASE">> env.sh - echo "export CGAL_DIR=/cgal_root/\${CGAL_LAST}">>env.sh - echo "export LIST_TEST_PACKAGES=/cgal_root/list_test_packages">> env.sh - echo "export LOGS_DIR=/cgal_root/AUTOTEST_LOGS">> env.sh - echo "export LOCK_FILE=/cgal_root/autotest_cgal_with_cmake.lock">> env.sh - echo "export ACTUAL_LOGFILE=/cgal_root/\`basename \${0}\`.log">> env.sh - echo "CGAL_DIR is ${CGAL_RELEASE_ID}" - - docker pull cgal/testsuite-docker:debian-stable-cross-compilation-for-arm - docker run --rm -t -e CGAL_LAST="${CGAL_RELEASE_ID}" -v ${CGAL_ROOT}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_ROOT}:/cgal_root cgal/testsuite-docker:debian-stable-cross-compilation-for-arm -else - bash ${CGAL_DIR}/developer_scripts/run_testsuite_with_cmake -fi +PLATFORMS=`value_of COMPILERS_${HOST}` +#setup dir +setup_dirs +for HOST in ${BUILD_HOSTS}; do + if [ "$HOST" != "localhost" ]; then + #launch docker container + echo "export SHOW_PROGRESS=$SHOW_PROGRESS"> env.sh + echo "export KEEP_TESTS=$KEEP_TESTS">> env.sh + echo "export DO_NOT_UPLOAD=$DO_NOT_UPLOAD">> env.sh + echo "export DO_NOT_TEST=$DO_NOT_TEST">> env.sh + echo "export SCP=$SCP">> env.sh + echo "export WGET=$WGET">> env.sh + echo "export WGET_OPTS=\"$WGET_OPTS\"">> env.sh + echo "export CURL=$CURL">> env.sh + echo "export CURL_OPTS=\"$CURL_OPTS\"">> env.sh + echo "export CGAL_URL=$CGAL_URL">> env.sh + echo "export UPLOAD_RESULT_DESTINATION=$UPLOAD_RESULT_DESTINATION">> env.sh + echo "export LATEST_LOCATION=$LATEST_LOCATION">> env.sh + echo "export TAR=$TAR">> env.sh + echo "export GUNZIP=$GUNZIP">> env.sh + echo "export COMPRESSOR=$COMPRESSOR">> env.sh + echo "export CONSOLE_OUTPUT=$CONSOLE_OUTPUT">> env.sh + echo "export CGAL_ROOT=/cgal_root">> env.sh + echo "export USE_TARGZ=$USE_TARGZ">> env.sh + echo "export USE_TARBZ=$USE_TARBZ">> env.sh + echo "export CGAL_RELEASE=$CGAL_RELEASE">> env.sh + echo "export CGAL_DIR=/cgal_root/\${CGAL_LAST}">>env.sh + echo "export LIST_TEST_PACKAGES=/cgal_root/list_test_packages">> env.sh + echo "export LOGS_DIR=/cgal_root/AUTOTEST_LOGS">> env.sh + echo "export LOCK_FILE=/cgal_root/autotest_cgal_with_cmake.lock">> env.sh + echo "export ACTUAL_LOGFILE=/cgal_root/\`basename \${0}\`.log">> env.sh + echo "export REFERENCE_PLATFORMS_DIR=$REFERENCE_PLATFORMS_DIR">>env.sh + + docker pull cgal/testsuite-docker:debian-stable-cross-compilation-for-arm + docker run --rm -t -e CGAL_LAST="${CGAL_RELEASE_ID}" -e HOST="${HOST}" -v ${CGAL_ROOT}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_ROOT}:/cgal_root cgal/testsuite-docker:debian-stable-cross-compilation-for-arm + else + HOST=$HOST bash ${CGAL_DIR}/developer_scripts/run_testsuite_with_cmake + fi +done diff --git a/Scripts/developer_scripts/run_testsuite_with_cmake b/Scripts/developer_scripts/run_testsuite_with_cmake index 4e27d221a18..eefea70e264 100644 --- a/Scripts/developer_scripts/run_testsuite_with_cmake +++ b/Scripts/developer_scripts/run_testsuite_with_cmake @@ -157,13 +157,8 @@ setup_dirs() # directories existing in the reference release are added to $PLATFORMS # PLATFORMS="" - - for HOST in ${BUILD_HOSTS}; do - - build_platforms_list "`value_of BUILD_ON_${HOST}`" - build_platforms_list "`value_of COMPILERS_${HOST}`" - - done + build_platforms_list "`value_of BUILD_ON_${HOST}`" + build_platforms_list "`value_of COMPILERS_${HOST}`" if [ -n "${USE_REFERENCE_PLATFORMS}" ]; then collect_all_reference_platforms @@ -198,8 +193,7 @@ put_on_web() publish_results() { - HOST=${1} - PLATFORM=${2} + PLATFORM=${1} # # collect results and put them on the web # @@ -237,15 +231,19 @@ publish_results() fi } -run_test_on_host_and_platform() +run_test_on_platform() { - HOST=${1} - PLATFORM=${2} + PLATFORM=${1} NUMBER_OF_PROCESSORS="`value_of PROCESSORS_${HOST}`" CGAL_BINARY_DIR=${CGAL_BINARY_DIR_BASE}/${PLATFORM} cd "${CGAL_BINARY_DIR}" log "${ACTUAL_LOGFILE}.test.${PLATFORM}" "Testing on host ${HOST} and platform ${PLATFORM}" + INIT_FILE="${CGAL_ROOT}/${REFERENCE_PLATFORMS_DIR}/${PLATFORM}.cmake" + if [ ! -f "${INIT_FILE}" ]; then + echo "error NEED A INIT FILE !" + fi + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=OFF -DWITH_tests=OFF -DWITH_CGAL_Qt5=OFF -DCGAL_HEADER_ONLY=ON $CGAL_DIR > installation.log 2>&1 rm CMakeCache.txt if [ -z "${SHOW_PROGRESS}" ]; then @@ -312,15 +310,14 @@ run_test_on_host_and_platform() # ---------------------------------------------------------------------------------------- run_test_on_host() { - HOST=${1} PLATFORMS=`value_of COMPILERS_${HOST}` if [ "${PLATFORMS}" = "all" ]; then collect_all_current_platforms "${CGAL_BINARY_DIR_BASE}" fi for PLATFORM in ${PLATFORMS}; do - run_test_on_host_and_platform "${HOST}" "${PLATFORM}" - publish_results "${HOST}" "${PLATFORM}" + run_test_on_platform "${PLATFORM}" + publish_results "${PLATFORM}" done } @@ -348,7 +345,4 @@ log "${ACTUAL_LOGFILE}" "running the testsuites" if [ -n "${CONSOLE_OUTPUT}" ]; then printf "\n-------------------------------------------------------\n" fi -for HOST in ${BUILD_HOSTS}; do - run_test_on_host ${HOST} -done - +run_test_on_host