Commit 8f51034c authored by Sergei Nikulov's avatar Sergei Nikulov

Travis-CI: added valgrind check

parent 185593f9
......@@ -26,11 +26,13 @@ env:
- SOCI_TRAVIS_BACKEND=postgresql
- SOCI_TRAVIS_BACKEND=postgression
- SOCI_TRAVIS_BACKEND=sqlite3
- SOCI_TRAVIS_BACKEND=valgrind
matrix:
fast_finish: true
allow_failures:
- env: SOCI_TRAVIS_BACKEND=postgression
- env: SOCI_TRAVIS_BACKEND=valgrind
- compiler: clang
addons:
......
......@@ -10,7 +10,7 @@ sudo add-apt-repository -y ppa:apt-fast/stable
sudo apt-get update -qq -y
sudo apt-get install -qq -y apt-fast
sudo apt-fast update -qq -y
sudo apt-fast install -qq -y libboost-dev libboost-date-time-dev
sudo apt-fast install -qq -y libboost-dev libboost-date-time-dev valgrind
before_install="${TRAVIS_BUILD_DIR}/bin/ci/before_install_${SOCI_TRAVIS_BACKEND}.sh"
if [ -x ${before_install} ]; then
......
#!/bin/bash -e
# Sets up environment for SOCI backend at travis-ci.org
#
# Copyright (c) 2013 Mateusz Loskot <mateusz@loskot.net>
# Copyright (c) 2015 Sergei Nikulov <sergey.nikulov@gmail.com>
#
source ${TRAVIS_BUILD_DIR}/bin/ci/common.sh
mysql --version
mysql -e 'create database soci_test;'
psql --version
psql -c 'create database soci_test;' -U postgres
......@@ -32,3 +32,8 @@ run_test()
{
ctest -V --output-on-failure "$@" .
}
run_test_memcheck()
{
valgrind --leak-check=full --error-exitcode=1 --trace-children=yes ctest -V --output-on-failure "$@" .
}
#!/bin/bash -e
# Builds and tests SOCI at travis-ci.org
#
# Copyright (c) 2013 Mateusz Loskot <mateusz@loskot.net>
# Copyright (c) 2015 Sergei Nikulov <sergey.nikulov@gmail.com>
#
source ${TRAVIS_BUILD_DIR}/bin/ci/common.sh
cmake \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DSOCI_TESTS=ON \
-DSOCI_STATIC=OFF \
-DCMAKE_BUILD_TYPE=Debug \
..
run_make
run_test_memcheck
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment