summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-04-16 14:42:28 -0400
committerNick Mathewson <nickm@torproject.org>2018-04-16 14:42:28 -0400
commitd3ff1263092d9ca205b5b54b77db31633bcd80b4 (patch)
tree7cead800562df8615cbaa01bf09428a7f8552fcd /.travis.yml
parent0e13ff48155ca8cda7483afe730652bed61ba5a0 (diff)
downloadtor-d3ff1263092d9ca205b5b54b77db31633bcd80b4.tar.gz
tor-d3ff1263092d9ca205b5b54b77db31633bcd80b4.zip
Add support for the coveralls.io coverage tool in travis config
Closes ticket 25818.
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml9
1 files changed, 8 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index 6d314c1414..dc0a8ac67a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -88,6 +88,8 @@ matrix:
## entry under that key outside the "include" clause.
include:
- compiler: gcc
+ - compiler: gcc
+ env: COVERAGE_OPTIONS="--enable-coverage"
## The "sudo: required" forces non-containerized builds, working
## around a Travis CI environment issue: clang LeakAnalyzer fails
## because it requires ptrace and the containerized environment no
@@ -100,6 +102,7 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
## Download rustup
- curl -Ssf -o rustup.sh https://sh.rustup.rs
+ - if [[ "$COVERAGE_OPTIONS" != "" ]]; then pip install --user cpp-coveralls; fi
install:
## If we're on OSX use brew to install required dependencies (for Linux, see the "apt:" section above)
@@ -113,10 +116,14 @@ install:
script:
- ./autogen.sh
- - ./configure $RUST_OPTIONS --disable-asciidoc --enable-fatal-warnings --disable-silent-rules --enable-fragile-hardening
+ - ./configure $RUST_OPTIONS $COVERAGE_OPTIONS --disable-asciidoc --enable-fatal-warnings --disable-silent-rules --enable-fragile-hardening
## We run `make check` because that's what https://jenkins.torproject.org does.
- make check
after_failure:
## `make check` will leave a log file with more details of test failures.
- cat test-suite.log
+
+after_success:
+ ## If this build was one that produced coverage, upload it.
+ - if [[ "$COVERAGE_OPTIONS" != "" ]]; then coveralls -b . --exclude src/test --exclude src/trunnel --gcov-options '\-p'; fi