diff --git a/.travis.yml b/.travis.yml index 0e608ac1..e46cdc17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/coverage.sh b/coverage.sh new file mode 100755 index 00000000..e3ad797c --- /dev/null +++ b/coverage.sh @@ -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$