File tree Expand file tree Collapse file tree 6 files changed +32
-20
lines changed Expand file tree Collapse file tree 6 files changed +32
-20
lines changed Original file line number Diff line number Diff line change @@ -47,16 +47,18 @@ mkdir -p ${BUILD_ROOT}
4747
4848# Define a command (using built-in travis functions) to launch one of our
4949# scripts
50- function run_script {
51- set +x
52- set -e
50+ run_script () {
51+ set +exv
5352 fold_start $1 " $2 "
5453 local scriptloc=" ${SOURCE_ROOT} /scripts/travis/$1 .sh"
55- echo " Running ${scriptloc} "
54+ echo -e " \e[0;32mRunning ${scriptloc} \e[0m "
5655 ${scriptloc}
57- local result =$?
56+ local _RESULT =$?
5857 fold_end $1
59- return $?
58+ if [ ${_RESULT} -ne 0 ]; then
59+ echo -e " \e[1;31m${scriptloc} exited with ${_RESULT} \e[0m"
60+ fi
61+ return ${_RESULT}
6062}
6163
6264# ##############################################################################
@@ -65,11 +67,11 @@ function run_script {
6567# from https://github.com/travis-ci/travis-rubies/blob/build/build.sh
6668# ##############################################################################
6769
68- function fold_start() {
70+ fold_start () {
6971 echo -e " travis_fold:start:$1 \033[33;1m$2 \033[0m"
7072}
7173
72- function fold_end() {
74+ fold_end () {
7375 echo -e " \ntravis_fold:end:$1 \r"
7476}
7577
Original file line number Diff line number Diff line change 1- #! /bin/sh -e
1+ #! /bin/sh -ex
22# ##############################################################################
33# File : scripts/travis/compile.sh
44# ##############################################################################
Original file line number Diff line number Diff line change 1313fi
1414
1515CXX_FLAGS=" -Wall -Wextra -Werror"
16- Fortran_FLAGS=" -Wall -Wextra -Wimplicit-procedure -Wimplicit-interface -Wno-compare-reals -Wno-maybe-uninitialized"
16+ Fortran_FLAGS=" -Wall -Wextra -Wimplicit-procedure -Wimplicit-interface -Wno-compare-reals -Wno-maybe-uninitialized -Werror "
1717
1818set -x
1919cd ${BUILD_ROOT} && cmake -G " ${CMAKE_GENERATOR} " \
@@ -24,6 +24,7 @@ cd ${BUILD_ROOT} && cmake -G "${CMAKE_GENERATOR}" \
2424 -D CMAKE_CXX_FLAGS=" ${CXX_FLAGS} " \
2525 -D CMAKE_Fortran_FLAGS=" ${Fortran_FLAGS} " \
2626 -D CMAKE_INSTALL_PREFIX=" ${INSTALL_ROOT} " \
27+ -D MEMORYCHECK_COMMAND_OPTIONS=" --error-exitcode=1 --leak-check=full" \
2728 ${SOURCE_ROOT}
2829
2930# ##############################################################################
Original file line number Diff line number Diff line change @@ -13,15 +13,22 @@ set -x
1313cd ${BUILD_ROOT} && ${GENERATOR} install
1414
1515# Test existence of install files
16+ test_f () {
17+ if ! [ -f " $1 " ]; then
18+ echo -e " \e[0;31mMissing file $1 \e[0m"
19+ ls -al " $( dirname " $1 " ) "
20+ return 1
21+ fi
22+ }
1623
1724if [ " ${FLIBCPP_DEV} " = " ON" ]; then
18- test -f ${INSTALL_ROOT} /share/doc/Flibcpp/index.html
19- test -f ${INSTALL_ROOT} /include/flc.i
25+ test_f ${INSTALL_ROOT} /share/doc/Flibcpp/index.html
26+ test_f ${INSTALL_ROOT} /include/flc.i
2027fi
2128
22- test -f ${INSTALL_ROOT} /include/flc.mod
23- test -f ${INSTALL_ROOT} /lib/libflc${SO_EXT}
24- test -f ${INSTALL_ROOT} /lib/cmake/Flibcpp/FlibcppConfig.cmake
29+ test_f ${INSTALL_ROOT} /include/flc.mod
30+ test_f ${INSTALL_ROOT} /lib/libflc${SO_EXT}
31+ test_f ${INSTALL_ROOT} /lib/cmake/Flibcpp/FlibcppConfig.cmake
2532
2633# ##############################################################################
2734# end of scripts/travis/deploy.sh
Original file line number Diff line number Diff line change 1- #! /bin/sh -e
1+ #! /bin/sh -ex
22# ##############################################################################
33# File : scripts/travis/install.sh
44#
55# Install dependencies.
66# ##############################################################################
77
8- set -x
9-
108mkdir -p ${INSTALL_ROOT} /bin
119
1210if [ " ${GENERATOR} " = " ninja" ]; then
Original file line number Diff line number Diff line change 1- #! /bin/sh -e
1+ #! /bin/sh -ex
22# ##############################################################################
33# File : scripts/travis/test.sh
44# ##############################################################################
@@ -7,7 +7,11 @@ cd ${BUILD_ROOT}
77
88ctest --output-on-failure
99if [ " ${FLIBCPP_DEV} " = " ON" ]; then
10- ctest -E examples -D ExperimentalMemCheck --output-on-failure
10+ # Run tests (not examples, which use a shell script) through valgrind
11+ if ! ctest -E examples -D ExperimentalMemCheck --output-on-failure; then
12+ find Testing/Temporary -name " MemoryChecker.*.log" -exec cat {} +
13+ exit 1
14+ fi
1115fi
1216
1317# ##############################################################################
You can’t perform that action at this time.
0 commit comments