Skip to content
Snippets Groups Projects
Commit 3264ed9c authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

Integrate with coveralls.io

parent 07307d0e
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ _CPack_Packages
*.gcno
*.gcda
*.gcov
coverage.info
*.o
*.reject
*.so
......
# tarantool [![Build Status](https://travis-ci.org/tarantool/tarantool.png?branch=1.7)](https://travis-ci.org/tarantool/tarantool)
# tarantool
[![Build Status](https://travis-ci.org/tarantool/tarantool.png?branch=1.7)](https://travis-ci.org/tarantool/tarantool)
[![Coverage Status](https://coveralls.io/repos/github/tarantool/tarantool/badge.svg?branch=1.7)](https://coveralls.io/github/tarantool/tarantool?branch=1.7)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tarantool/tarantool?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
http://tarantool.org
......
......@@ -4,5 +4,34 @@ sudo apt-get -q -y install libmysqlclient-dev libpq-dev postgresql-server-dev-al
sudo pip install six==1.9.0
sudo pip install gevent
sudo pip install geventconnpool
cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo
CMAKE_OPTS=""
if [ -n "${COVERALLS_TOKEN}" ] && [ ${CC}=gcc ]; then
echo "Code coverage analysis is enabled"
sudo apt-get -q -y install lcov
gem install coveralls-lcov
CMAKE_OPTS="-DENABLE_GCOV=ON"
else
COVERALLS_TOKEN=""
fi
cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo ${CMAKE_OPTS}
make -j8
cd test
/usr/bin/python test-run.py
[ $? -eq 0 ] || exit $?
cd ..
if [ -n "${COVERALLS_TOKEN}" ]; then
echo "Collecting code coverage information"
# http://gronlier.fr/blog/2015/01/adding-code-coverage-to-your-c-project/
LCOV_FILE="$(pwd)/coverage.info"
# Capture coverage info
lcov --directory src/ --capture --output-file ${LCOV_FILE}.tmp
# Filter out system, test and third-party code
lcov --remove ${LCOV_FILE}.tmp 'tests/*' 'third_party/*' '/usr/*' \
--output-file ${LCOV_FILE}
rm -f ${LCOV_FILE}.tmp
echo "Exporting code coverage information to coveralls.io"
# Upload to coveralls.io
coveralls-lcov --repo-token ${COVERALLS_TOKEN} ${LCOV_FILE}
fi
......@@ -4,3 +4,4 @@ sudo pip install gevent
sudo pip install geventconnpool
cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j8
cd test && python test-run.py
cd test
/usr/bin/python test-run.py --force
cd test && python test-run.py
bash ./extra/travis/build_$TRAVIS_OS_NAME.sh
bash ./extra/travis/test_$TRAVIS_OS_NAME.sh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment