send coverage results to coveralls

This commit is contained in:
Steffen Jaeckel 2014-05-05 11:06:40 +02:00
parent f9a1041222
commit 1a44e2d22d
2 changed files with 28 additions and 0 deletions

View File

@ -3,6 +3,7 @@ compiler:
- gcc
script: bash "${BUILDSCRIPT}" "${BUILDNAME}" "${BUILDOPTIONS}" "makefile" "-DUSE_LTM -DLTM_DESC -I/usr/include" "/usr/lib/libtommath.a"
env:
- BUILDSCRIPT="coverage.sh" BUILDNAME="COVERAGE" BUILDOPTIONS=" "
- BUILDSCRIPT="run.sh" BUILDNAME="STOCK" BUILDOPTIONS=" "
- BUILDSCRIPT="run.sh" BUILDNAME="SMALL" BUILDOPTIONS="-DLTC_SMALL_CODE"
- BUILDSCRIPT="run.sh" BUILDNAME="NOTABLES" BUILDOPTIONS="-DLTC_NO_TABLES"
@ -23,6 +24,7 @@ branches:
- develop
before_script:
- sudo apt-get install libtommath-dev
- sudo pip install cpp-coveralls
after_failure:
- cat test_std.txt
- cat test_err.txt

26
coverage.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
if [ -z "$(echo $CC | grep "gcc")" ]; then
echo "no gcc detected, early exit success"
exit 0
fi
# output version
bash printinfo.sh
bash build.sh " $1" " $2" " $3 " "$4 -fprofile-arcs -ftest-coverage " "$5 -lgcov"
if [ -a testok.txt ] && [ -f testok.txt ]; then
echo
else
echo
echo "Test failed"
exit 1
fi
cpp-coveralls
exit 0
# $Source$
# $Revision$
# $Date$