Skip to content

Commit 37dbf5a

Browse files
committed
Merge pull request #494 from pyfisch/traviskcov
chore(travis): Enable test coverage generation
2 parents 0b6db39 + f270b1d commit 37dbf5a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.travis.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ matrix:
44
include:
55
- rust: nightly
66
env: FEATURES="--features nightly"
7+
sudo: false
78
- rust: nightly
89
env: FEATURES="--features nightly" BENCH=true
10+
sudo: false
911
- rust: beta
10-
11-
sudo: false
12+
sudo: true
1213

1314
cache:
1415
directories:
@@ -17,6 +18,12 @@ cache:
1718
script: ./.travis.sh
1819

1920
after_success: |
21+
[ $TRAVIS_RUST_VERSION = beta ] &&
22+
sudo apt-get install libcurl4-openssl-dev libelf-dev libdw-dev &&
23+
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
24+
tar xzf master.tar.gz && mkdir kcov-master/build && cd kcov-master/build && cmake .. && make &&
25+
sudo make install && cd ../.. &&
26+
kcov --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo target/kcov target/debug/hyper-*
2027
[ $TRAVIS_BRANCH = master ] &&
2128
[ $TRAVIS_PULL_REQUEST = false ] &&
2229
[ $TRAVIS_RUST_VERSION = beta ] &&

0 commit comments

Comments
 (0)