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}
47
47
48
48
# Define a command (using built-in travis functions) to launch one of our
49
49
# scripts
50
- function run_script {
51
- set +x
52
- set -e
50
+ run_script () {
51
+ set +exv
53
52
fold_start $1 " $2 "
54
53
local scriptloc=" ${SOURCE_ROOT} /scripts/travis/$1 .sh"
55
- echo " Running ${scriptloc} "
54
+ echo -e " \e[0;32mRunning ${scriptloc} \e[0m "
56
55
${scriptloc}
57
- local result =$?
56
+ local _RESULT =$?
58
57
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}
60
62
}
61
63
62
64
# ##############################################################################
@@ -65,11 +67,11 @@ function run_script {
65
67
# from https://github.com/travis-ci/travis-rubies/blob/build/build.sh
66
68
# ##############################################################################
67
69
68
- function fold_start() {
70
+ fold_start () {
69
71
echo -e " travis_fold:start:$1 \033[33;1m$2 \033[0m"
70
72
}
71
73
72
- function fold_end() {
74
+ fold_end () {
73
75
echo -e " \ntravis_fold:end:$1 \r"
74
76
}
75
77
Original file line number Diff line number Diff line change 1
- #! /bin/sh -e
1
+ #! /bin/sh -ex
2
2
# ##############################################################################
3
3
# File : scripts/travis/compile.sh
4
4
# ##############################################################################
Original file line number Diff line number Diff line change 13
13
fi
14
14
15
15
CXX_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 "
17
17
18
18
set -x
19
19
cd ${BUILD_ROOT} && cmake -G " ${CMAKE_GENERATOR} " \
@@ -24,6 +24,7 @@ cd ${BUILD_ROOT} && cmake -G "${CMAKE_GENERATOR}" \
24
24
-D CMAKE_CXX_FLAGS=" ${CXX_FLAGS} " \
25
25
-D CMAKE_Fortran_FLAGS=" ${Fortran_FLAGS} " \
26
26
-D CMAKE_INSTALL_PREFIX=" ${INSTALL_ROOT} " \
27
+ -D MEMORYCHECK_COMMAND_OPTIONS=" --error-exitcode=1 --leak-check=full" \
27
28
${SOURCE_ROOT}
28
29
29
30
# ##############################################################################
Original file line number Diff line number Diff line change @@ -13,15 +13,22 @@ set -x
13
13
cd ${BUILD_ROOT} && ${GENERATOR} install
14
14
15
15
# 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
+ }
16
23
17
24
if [ " ${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
20
27
fi
21
28
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
25
32
26
33
# ##############################################################################
27
34
# end of scripts/travis/deploy.sh
Original file line number Diff line number Diff line change 1
- #! /bin/sh -e
1
+ #! /bin/sh -ex
2
2
# ##############################################################################
3
3
# File : scripts/travis/install.sh
4
4
#
5
5
# Install dependencies.
6
6
# ##############################################################################
7
7
8
- set -x
9
-
10
8
mkdir -p ${INSTALL_ROOT} /bin
11
9
12
10
if [ " ${GENERATOR} " = " ninja" ]; then
Original file line number Diff line number Diff line change 1
- #! /bin/sh -e
1
+ #! /bin/sh -ex
2
2
# ##############################################################################
3
3
# File : scripts/travis/test.sh
4
4
# ##############################################################################
@@ -7,7 +7,11 @@ cd ${BUILD_ROOT}
7
7
8
8
ctest --output-on-failure
9
9
if [ " ${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
11
15
fi
12
16
13
17
# ##############################################################################
You can’t perform that action at this time.
0 commit comments