diff options
author | Timotej <timotej.kapus13@imperial.ac.uk> | 2015-06-15 18:30:00 +0100 |
---|---|---|
committer | Timotej <timotej.kapus13@imperial.ac.uk> | 2015-06-15 18:30:00 +0100 |
commit | a83176ef4494eede31ac00ecd7b0c40fcdd0feb0 (patch) | |
tree | b0f031779aa3cc0a28e0a83b022f0bacb7be1cb8 /.travis | |
parent | 6118403fa4315388946babd25be38a9524a5e2c5 (diff) | |
download | klee-a83176ef4494eede31ac00ecd7b0c40fcdd0feb0.tar.gz |
added zcov integration to travis CI
Diffstat (limited to '.travis')
-rwxr-xr-x | .travis/klee.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/.travis/klee.sh b/.travis/klee.sh index 3106dca9..9aa6b1af 100755 --- a/.travis/klee.sh +++ b/.travis/klee.sh @@ -55,6 +55,7 @@ ${KLEE_SRC}/configure --with-llvmsrc=/usr/lib/llvm-${LLVM_VERSION}/build \ --with-llvmcxx=${KLEE_CXX} \ --with-stp="${BUILD_DIR}/stp/build" \ ${KLEE_UCLIBC_CONFIGURE_OPTION} \ + CXXFLAGS="-fprofile-arcs -ftest-coverage" \ && make DISABLE_ASSERTIONS=${DISABLE_ASSERTIONS} \ ENABLE_OPTIMIZED=${ENABLE_OPTIMIZED} \ ENABLE_SHARED=0 @@ -94,6 +95,37 @@ set +e # We want to let all the tests run before we exit lit -v . RETURN="${RETURN}$?" +#generate and upload coverage if COVERAGE is set +if [ ${COVERAGE} -eq 1 ]; then + +#get zcov that works with gcov v4.8 + git clone https://github.com/kren1/zcov.git + cd zcov + sudo python setup.py install + sudo mkdir /usr/local/lib/python2.7/dist-packages/zcov-0.3.0.dev0-py2.7.egg/zcov/js + cd zcov + +#these files are not where zcov expects them to be after install so we move them + sudo cp js/sorttable.js /usr/local/lib/python2.7/dist-packages/zcov-0.3.0.dev0-py2.7.egg/zcov/js/sorttable.js + sudo cp js/sourceview.js /usr/local/lib/python2.7/dist-packages/zcov-0.3.0.dev0-py2.7.egg/zcov/js/sourceview.js + sudo cp style.css /usr/local/lib/python2.7/dist-packages/zcov-0.3.0.dev0-py2.7.egg/zcov/style.css + +#install zcov dependency + sudo apt-get install enscript + +#update gcov from v4.6 to v4.8. This is becauase gcda files are made for v4.8 and cause +#a segmentation fault in v4.6 + sudo apt-get install ggcov + sudo rm /usr/bin/gcov + sudo ln -s /usr/bin/gcov-4.8 /usr/bin/gcov + +#scan and generate coverage + zcov scan output.zcov ${BUILD_DIR} + zcov genhtml output.zcov coverage/ +#upload the coverage data, currently to a random ftp server + tar -zcvf coverage.tar.gz coverage/ + curl --form "file=@coverage.tar.gz" -u ${USER}:${PASSWORD} ${COVERAGE_SERVER} +fi ############################################################################### # Result ############################################################################### |