summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-10 22:21:42 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-10 22:21:42 +0300
commit538c310c622ffc232188177faf6425c39e6e1545 (patch)
tree42f2627fef7a518c8f41242a32ccaa60a0bbb8f6
parent6524f86be0e1d05ac27a3cb64b163713304d30d8 (diff)
downloadmv-538c310c622ffc232188177faf6425c39e6e1545.tar.gz
mv-538c310c622ffc232188177faf6425c39e6e1545.tar.bz2
mv-538c310c622ffc232188177faf6425c39e6e1545.tar.xz
mv-538c310c622ffc232188177faf6425c39e6e1545.zip
Add valgrind into ci test scripts.
-rwxr-xr-xtools/ci/jobs/gcc5_sanitize_tests.sh3
-rwxr-xr-xtools/ci/jobs/gcc5_sdl2_tests.sh3
-rwxr-xr-xtools/ci/jobs/gcc5_tests.sh3
-rwxr-xr-xtools/ci/jobs/gcc6_tests.sh3
-rwxr-xr-xtools/ci/scripts/init.sh10
5 files changed, 18 insertions, 4 deletions
diff --git a/tools/ci/jobs/gcc5_sanitize_tests.sh b/tools/ci/jobs/gcc5_sanitize_tests.sh
index 05f1a93f0..4e5536eed 100755
--- a/tools/ci/jobs/gcc5_sanitize_tests.sh
+++ b/tools/ci/jobs/gcc5_sanitize_tests.sh
@@ -9,7 +9,8 @@ source ./tools/ci/scripts/init.sh
aptget_install gcc-5 g++-5 \
make autoconf automake autopoint gettext libphysfs-dev \
libxml2-dev libcurl4-gnutls-dev libpng-dev \
- libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev
+ libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev \
+ valgrind
export CXXFLAGS="-ggdb3 -O2 -pipe -ffast-math \
-fsanitize=address -fsanitize=undefined \
diff --git a/tools/ci/jobs/gcc5_sdl2_tests.sh b/tools/ci/jobs/gcc5_sdl2_tests.sh
index cf38a9e60..33886af83 100755
--- a/tools/ci/jobs/gcc5_sdl2_tests.sh
+++ b/tools/ci/jobs/gcc5_sdl2_tests.sh
@@ -9,7 +9,8 @@ source ./tools/ci/scripts/init.sh
aptget_install gcc-5 g++-5 \
make autoconf automake autopoint gettext libphysfs-dev \
libxml2-dev libcurl4-gnutls-dev libpng-dev \
- libsdl2-dev libsdl2-gfx-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev
+ libsdl2-dev libsdl2-gfx-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev \
+ valgrind
export CXXFLAGS="-ggdb3 -O2 -pipe -ffast-math \
-fno-omit-frame-pointer -funswitch-loops \
diff --git a/tools/ci/jobs/gcc5_tests.sh b/tools/ci/jobs/gcc5_tests.sh
index e21b2b33c..4ebaadbeb 100755
--- a/tools/ci/jobs/gcc5_tests.sh
+++ b/tools/ci/jobs/gcc5_tests.sh
@@ -9,7 +9,8 @@ source ./tools/ci/scripts/init.sh
aptget_install gcc-5 g++-5 \
make autoconf automake autopoint gettext libphysfs-dev \
libxml2-dev libcurl4-gnutls-dev libpng-dev \
- libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev
+ libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev \
+ valgrind
export CXXFLAGS="-ggdb3 -O2 -pipe -ffast-math \
-fno-omit-frame-pointer -funswitch-loops \
diff --git a/tools/ci/jobs/gcc6_tests.sh b/tools/ci/jobs/gcc6_tests.sh
index b93d56a6b..8a0a60f14 100755
--- a/tools/ci/jobs/gcc6_tests.sh
+++ b/tools/ci/jobs/gcc6_tests.sh
@@ -9,7 +9,8 @@ source ./tools/ci/scripts/init.sh
aptget_install gcc-6 g++-6 \
make autoconf automake autopoint gettext libphysfs-dev \
libxml2-dev libcurl4-gnutls-dev libpng-dev \
- libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev
+ libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev \
+ valgrind
export CXXFLAGS="-pedantic -ggdb3 -O2 -pipe -Wstrict-aliasing=2 \
-Wstrict-overflow=1 -Wformat=1 -D_FORTIFY_SOURCE=2 \
diff --git a/tools/ci/scripts/init.sh b/tools/ci/scripts/init.sh
index ad086d705..fa407371b 100755
--- a/tools/ci/scripts/init.sh
+++ b/tools/ci/scripts/init.sh
@@ -156,6 +156,16 @@ function run_make_check {
cat src/manaplustests.log
exit ${ERR}
fi
+ valgrind -q --read-var-info=yes --track-origins=yes --malloc-fill=11 --free-fill=55 --show-reachable=yes --leak-check=full --leak-resolution=high --partial-loads-ok=yes --error-limit=no ./src/manaplustests 2>valg.log
+ export DATA=$(grep "invalid" valg.log)
+ if [ "$DATA" != "" ];
+ then
+ cat valg.log
+ echo "valgrind error"
+ exit 1
+ fi
+ cat valg.log
+ echo "valgrind check"
}
function run_check_warnings {