From 9ae753c2166e2ec981556aa7a5ad3733d01c2f43 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 4 Apr 2019 12:44:57 +0200 Subject: [PATCH] Fix cmake warning about CGAL_ROOT and add cmake results in the end of the "not ignored tests" reports --- .../autotest_cgal_with_ctest | 54 +++++++++---------- .../run_testsuite_with_cmake | 10 ++-- .../test/get_deactivated_packages_info.py | 10 ++-- 3 files changed, 39 insertions(+), 35 deletions(-) diff --git a/Scripts/developer_scripts/autotest_cgal_with_ctest b/Scripts/developer_scripts/autotest_cgal_with_ctest index cd954740e7d..29d0f5506a0 100755 --- a/Scripts/developer_scripts/autotest_cgal_with_ctest +++ b/Scripts/developer_scripts/autotest_cgal_with_ctest @@ -23,7 +23,7 @@ export TAR="tar" export GUNZIP="gunzip" export COMPRESSOR="gzip" export CONSOLE_OUTPUT="y" -export CGAL_ROOT=`pwd` +export CGAL_HOME=`pwd` export USE_TARGZ="n" export USE_TARBZ="n" export CGAL_RELEASE="" @@ -121,7 +121,7 @@ get_cgal() # ---------------------------------------------------------------------------------------- unzip_cgal() { - cd "${CGAL_ROOT}" + cd "${CGAL_HOME}" log "${ACTUAL_LOGFILE}" "unzipping CGAL" if [ "${USE_TARGZ}" = "y" ]; then @@ -140,18 +140,18 @@ unzip_cgal() fi # check, if CGAL_DIR exists - if [ -d "${CGAL_ROOT}/${CGAL_RELEASE_ID}" ]; then + if [ -d "${CGAL_HOME}/${CGAL_RELEASE_ID}" ]; then # Reset CGAL-I symlink - log "${ACTUAL_LOGFILE}" "Resetting CGAL-I symlink to ${CGAL_ROOT}/${CGAL_RELEASE_ID}" + log "${ACTUAL_LOGFILE}" "Resetting CGAL-I symlink to ${CGAL_HOME}/${CGAL_RELEASE_ID}" rm -f CGAL-I - ln -s "${CGAL_ROOT}/${CGAL_RELEASE_ID}" CGAL-I + ln -s "${CGAL_HOME}/${CGAL_RELEASE_ID}" CGAL-I # Reset CGAL-3.x-I symlink CGAL_RELEASE=`echo "${CGAL_RELEASE_ID}" | sed 's/I\([^-]*\)-.*/I\1/'` - log "${ACTUAL_LOGFILE}" "Resetting ${CGAL_RELEASE} symlink to ${CGAL_ROOT}/${CGAL_RELEASE_ID}" + log "${ACTUAL_LOGFILE}" "Resetting ${CGAL_RELEASE} symlink to ${CGAL_HOME}/${CGAL_RELEASE_ID}" rm -f "${CGAL_RELEASE}" - ln -s "${CGAL_ROOT}/${CGAL_RELEASE_ID}" "${CGAL_RELEASE}" + ln -s "${CGAL_HOME}/${CGAL_RELEASE_ID}" "${CGAL_RELEASE}" else - error "directory ${CGAL_ROOT}/${CGAL_RELEASE_ID} does not exist" + error "directory ${CGAL_HOME}/${CGAL_RELEASE_ID} does not exist" fi log_done "${ACTUAL_LOGFILE}" @@ -195,30 +195,30 @@ do esac done # Load settings -if [ -f "$CGAL_ROOT/.autocgalrc" ]; then - . "$CGAL_ROOT/.autocgalrc" +if [ -f "$CGAL_HOME/.autocgalrc" ]; then + . "$CGAL_HOME/.autocgalrc" else echo "CONFIGURATION FILE .autocgalrc NOT FOUND" >&2; exit 1 fi if [ -n "${SCRIPTS_DIR}" ]; then - CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-git"` + CGAL_DIR=`readlink "${CGAL_HOME}/CGAL-git"` else - CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-I"` + CGAL_DIR=`readlink "${CGAL_HOME}/CGAL-I"` fi source "${CGAL_DIR}/${SCRIPTS_DIR}developer_scripts/log.sh" -LOGS_DIR="${CGAL_ROOT}/AUTOTEST_LOGS" -LOCK_FILE="${CGAL_ROOT}/autotest_cgal_with_cmake.lock" +LOGS_DIR="${CGAL_HOME}/AUTOTEST_LOGS" +LOCK_FILE="${CGAL_HOME}/autotest_cgal_with_cmake.lock" # Setup logfile -ACTUAL_LOGFILE="${CGAL_ROOT}/`basename ${0}`.log" +ACTUAL_LOGFILE="${CGAL_HOME}/`basename ${0}`.log" rm -f "${ACTUAL_LOGFILE}" echo "Running `basename ${0}` "'$Revision$' >> "${ACTUAL_LOGFILE}" -cd "$CGAL_ROOT" +cd "$CGAL_HOME" # Starts the process @@ -232,9 +232,9 @@ if [ -z "${USE_LATEST_UNZIPPED}" -a -z "${SCRIPTS_DIR}" ]; then fi #reset CGAL-DIR with the updated CGAL-I if [ -n "${SCRIPTS_DIR}" ]; then - CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-git"` + CGAL_DIR=`readlink "${CGAL_HOME}/CGAL-git"` else - CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-I"` + CGAL_DIR=`readlink "${CGAL_HOME}/CGAL-I"` fi CGAL_RELEASE_ID=$(cat last_release_id) @@ -257,13 +257,13 @@ for HOST in ${BUILD_HOSTS}; do 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 CGAL_HOME=/CGAL_HOME">> 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 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 LOGS_DIR=/CGAL_HOME/AUTOTEST_LOGS">> env.sh + echo "export LOCK_FILE=/CGAL_HOME/autotest_cgal_with_cmake.lock">> env.sh + echo "export ACTUAL_LOGFILE=/CGAL_HOME/\`basename \${0}\`.log">> env.sh echo "export REFERENCE_PLATFORMS_DIR=$REFERENCE_PLATFORMS_DIR">>env.sh echo "export INSTALLATION_DIR=$INSTALLATION_DIR">>env.sh echo "export TESTSUITE_DIR=$TESTSUITE_DIR">>env.sh @@ -271,18 +271,18 @@ for HOST in ${BUILD_HOSTS}; do docker pull cgal/testsuite-docker:debian-stable-cross-compilation-for-arm if [ -z "${SCRIPTS_DIR}" ]; then #if not from branch - echo "export CGAL_DIR=/cgal_root/\${CGAL_LAST}">>env.sh - 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 + echo "export CGAL_DIR=/CGAL_HOME/\${CGAL_LAST}">>env.sh + docker run --rm -t -e CGAL_LAST="${CGAL_RELEASE_ID}" -e HOST="${HOST}" -v ${CGAL_HOME}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_HOME}:/CGAL_HOME cgal/testsuite-docker:debian-stable-cross-compilation-for-arm else - echo "export CGAL_DIR=/cgal_root/CGAL-git">>env.sh - docker run --rm -t -e HOST="${HOST}" -v ${CGAL_ROOT}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_ROOT}:/cgal_root -v${CGAL_DIR}:/cgal_root/CGAL-git cgal/testsuite-docker:debian-stable-cross-compilation-for-arm + echo "export CGAL_DIR=/CGAL_HOME/CGAL-git">>env.sh + docker run --rm -t -e HOST="${HOST}" -v ${CGAL_HOME}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_HOME}:/CGAL_HOME -v${CGAL_DIR}:/CGAL_HOME/CGAL-git cgal/testsuite-docker:debian-stable-cross-compilation-for-arm fi else HOST=$HOST bash -$- ${CGAL_DIR}/${SCRIPTS_DIR}developer_scripts/run_testsuite_with_cmake fi done -cd "${CGAL_ROOT}" +cd "${CGAL_HOME}" if [ -e "LATEST" ]; then mv LATEST RELEASE_NR fi diff --git a/Scripts/developer_scripts/run_testsuite_with_cmake b/Scripts/developer_scripts/run_testsuite_with_cmake index b2379728692..4f4bc71e9e4 100644 --- a/Scripts/developer_scripts/run_testsuite_with_cmake +++ b/Scripts/developer_scripts/run_testsuite_with_cmake @@ -7,8 +7,8 @@ source "${CGAL_DIR}/${SCRIPTS_DIR}developer_scripts/log.sh" # Load settings -if [ -f "$CGAL_ROOT/.autocgalrc" ]; then - . "$CGAL_ROOT/.autocgalrc" +if [ -f "$CGAL_HOME/.autocgalrc" ]; then + . "$CGAL_HOME/.autocgalrc" else echo "CONFIGURATION FILE .autocgalrc NOT FOUND" >&2; exit 1 @@ -255,7 +255,7 @@ run_test_on_platform() 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" + INIT_FILE="${CGAL_HOME}/${REFERENCE_PLATFORMS_DIR}/${PLATFORM}.cmake" if [ ! -f "${INIT_FILE}" ]; then echo "error NEED A INIT FILE !" fi @@ -266,11 +266,11 @@ run_test_on_platform() CMAKE_OPTS="${CMAKE_OPTS} -DWITH_examples=ON -DWITH_demos=ON" fi if [ -z "${SHOW_PROGRESS}" ]; then - cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=ON ${CMAKE_OPTS} $CGAL_DIR 2>&1 >package_installation.log + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=ON ${CMAKE_OPTS} $CGAL_DIR >package_installation.log 2>&1 else cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=ON ${CMAKE_OPTS} $CGAL_DIR 2>&1 |tee package_installation.log fi - LIST_TEST_FILE="${CGAL_ROOT}/list_test_packages" + LIST_TEST_FILE="${CGAL_HOME}/list_test_packages" if [ -f ${LIST_TEST_FILE} ]; then LIST_TEST_PACKAGES=$(source ${LIST_TEST_FILE}) fi diff --git a/Testsuite/test/get_deactivated_packages_info.py b/Testsuite/test/get_deactivated_packages_info.py index 8b8ea9b2db4..72ebe691a93 100644 --- a/Testsuite/test/get_deactivated_packages_info.py +++ b/Testsuite/test/get_deactivated_packages_info.py @@ -6,7 +6,7 @@ import os report_file=sys.argv[1] report_name=sys.argv[2] global_report_name=sys.argv[3] -rx=re.compile('(.*Configuring (examples|demo|test)*( in )*(test\/|examples\/|demo\/)*)\w+') +rx=re.compile('(.*Configuring (examples|demo|test)*( in )*(test\/|examples\/|demo\/)*)((?!done)\w+)') rx_demo=re.compile('.*in demo\/') rx_examples=re.compile('.*in examples\/') @@ -39,8 +39,12 @@ with open(report_file, "rt") as test_report: elif rx_examples.match(myline): name="{str}_Examples".format(str=name) - os.mkdir(name) - test_report=open("{dir}/{file}".format(dir=name, file=report_name), "w+") + if not os.path.isdir(name): + os.mkdir(name) + test_report=open("{dir}/{file}".format(dir=name, file=report_name), "w+") + else: + test_report=open("{dir}/{file}".format(dir=name, file=report_name), "a+") + test_report.write(" --- CMake Results: --- \n\n") is_writing=True if is_writing: is_writing=False