From c45d2fa1e7ea4999579f6a3acbf4f66c44464cc5 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 22 May 2018 10:19:01 +0200 Subject: [PATCH 1/4] List all dependencies error at the end to simplify the reading in travis. --- Scripts/developer_scripts/cgal_check_dependencies.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Scripts/developer_scripts/cgal_check_dependencies.sh b/Scripts/developer_scripts/cgal_check_dependencies.sh index d394e40f56d..dd7907f75f0 100644 --- a/Scripts/developer_scripts/cgal_check_dependencies.sh +++ b/Scripts/developer_scripts/cgal_check_dependencies.sh @@ -37,13 +37,11 @@ do if [ -f "$pkg_path/package_info/$pkg/dependencies" ]; then PKG_DIFF=$(grep -Fxv -f "$pkg_path/package_info/$pkg/dependencies.old" "$pkg_path/package_info/$pkg/dependencies" || true) if [ -n "$PKG_DIFF" ]; then - HAS_DIFF=TRUE - echo "Differences in $pkg: $PKG_DIFF are new and not committed." + TOTAL_RES="Differences in $pkg: $PKG_DIFF are new and not committed.\n $TOTAL_RES" fi PKG_DIFF=$(grep -Fxv -f "$pkg_path/package_info/$pkg/dependencies" "$pkg_path/package_info/$pkg/dependencies.old" || true) if [ -n "$PKG_DIFF" ]; then - HAS_DIFF=TRUE - echo "Differences in $pkg: $PKG_DIFF have disappeared." + TOTAL_RES="Differences in $pkg: $PKG_DIFF have disappeared.\n $TOTAL_RES" fi if [ -f $pkg_path/package_info/$pkg/dependencies.old ]; then rm $pkg_path/package_info/$pkg/dependencies.old @@ -53,7 +51,8 @@ done echo " Checks finished" cd $CGAL_ROOT rm -r dep_check_build -if [ -n "$HAS_DIFF" ]; then +if [ -n "$TOTAL_RES" ]; then + echo "$TOTAL_RES" echo " You can run cmake with options CGAL_ENABLE_CHECK_HEADERS and CGAL_COPY_DEPENDENCIES ON, make the target packages_dependencies and commit the new dependencies files," echo " or simply manually edit the problematic files." exit 1 From 5bb6622eabb7c14d5a6e9cc6aefed994d6429f49 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 22 May 2018 16:12:35 +0200 Subject: [PATCH 2/4] Make the -x option conditionnal for all travis scripts. --- .travis/install.sh | 2 +- .travis/template.txt | 2 +- Scripts/developer_scripts/cgal_check_dependencies.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis/install.sh b/.travis/install.sh index ee9f7047d7d..4d78446fc74 100644 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -x +[ -n "$CGAL_DEBUG_TRAVIS" ] && set -x DONE=0 while [ $DONE = 0 ] do diff --git a/.travis/template.txt b/.travis/template.txt index 6bcf144ba17..624e017c441 100644 --- a/.travis/template.txt +++ b/.travis/template.txt @@ -25,7 +25,7 @@ before_script: - cd .. script: - cd ./.travis -- bash -x -e ./build_package.sh $PACKAGE +- if [ -n "$CGAL_DEBUG_TRAVIS" ]; then bash -x -e ./build_package.sh $PACKAGE; else bash -e ./build_package.sh $PACKAGE; fi notifications: email: on_success: change # default: always diff --git a/Scripts/developer_scripts/cgal_check_dependencies.sh b/Scripts/developer_scripts/cgal_check_dependencies.sh index dd7907f75f0..37bd4698c9f 100644 --- a/Scripts/developer_scripts/cgal_check_dependencies.sh +++ b/Scripts/developer_scripts/cgal_check_dependencies.sh @@ -1,6 +1,6 @@ #This script must be called from the CGAL root. set -e -set -x +[ -n "$CGAL_DEBUG_TRAVIS" ] && set -x while test $# -gt 0 do case "$1" in From 748363cc2ea9c8aae29b66268b7a725f04bc73e8 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 23 May 2018 11:38:22 +0200 Subject: [PATCH 3/4] update travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c176918d6d2..6b0bcbf7b01 100644 --- a/.travis.yml +++ b/.travis.yml @@ -68,7 +68,7 @@ before_script: - cd .. script: - cd ./.travis -- bash -x -e ./build_package.sh $PACKAGE +- if [ -n "$CGAL_DEBUG_TRAVIS" ]; then bash -x -e ./build_package.sh $PACKAGE; else bash -e ./build_package.sh $PACKAGE; fi notifications: email: on_success: change # default: always From c4fb5f995cf3ba75d9b6a6cb365967d9b41866a0 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 23 May 2018 15:28:46 +0200 Subject: [PATCH 4/4] Remove `-x` from the .travis.yml file: move it in build_package.sh --- .travis.yml | 2 +- .travis/build_package.sh | 1 + .travis/template.txt | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6b0bcbf7b01..2083ee376cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -68,7 +68,7 @@ before_script: - cd .. script: - cd ./.travis -- if [ -n "$CGAL_DEBUG_TRAVIS" ]; then bash -x -e ./build_package.sh $PACKAGE; else bash -e ./build_package.sh $PACKAGE; fi +- bash ./build_package.sh $PACKAGE notifications: email: on_success: change # default: always diff --git a/.travis/build_package.sh b/.travis/build_package.sh index a211a18ab5b..eb88324c187 100755 --- a/.travis/build_package.sh +++ b/.travis/build_package.sh @@ -1,5 +1,6 @@ #!/bin/bash set -e +[ -n "$CGAL_DEBUG_TRAVIS" ] && set -x CXX_FLAGS="-DCGAL_NDEBUG" diff --git a/.travis/template.txt b/.travis/template.txt index 624e017c441..2bf7648de68 100644 --- a/.travis/template.txt +++ b/.travis/template.txt @@ -25,7 +25,7 @@ before_script: - cd .. script: - cd ./.travis -- if [ -n "$CGAL_DEBUG_TRAVIS" ]; then bash -x -e ./build_package.sh $PACKAGE; else bash -e ./build_package.sh $PACKAGE; fi +- bash ./build_package.sh $PACKAGE notifications: email: on_success: change # default: always