Skip to content

Commit 90184bc

Browse files
committed
Code coverage for RustPython
1 parent 159daf0 commit 90184bc

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.travis.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,30 @@ matrix:
9797
- cargo clippy
9898
env:
9999
- REGULAR_TEST=true
100+
- name: Code Coverage
101+
language: python
102+
python: 3.6
103+
cache:
104+
pip: true
105+
# Because we're using the Python Travis environment, we can't use
106+
# the built-in cargo cacher
107+
directories:
108+
- /home/travis/.cargo
109+
- target
110+
before_script:
111+
- curl -L https://github.com/mozilla/grcov/releases/download/v0.4.1/grcov-linux-x86_64.tar.bz2 | tar jxf -
112+
script:
113+
- cargo build --verbose --all
114+
- cargo test --verbose --all
115+
- tests/.travis-runner.sh
116+
- zip -0 ccov.zip `find . \( -name "rustpython*.gc*" \) -print`
117+
- ./grcov ccov.zip -s . -t lcov --llvm --branch --ignore-not-existing --ignore-dir "/*" > lcov.info
118+
- bash <(curl -s https://codecov.io/bash) -f lcov.info
119+
env:
120+
- TRAVIS_RUST_VERSION=nightly
121+
- REGULAR_TEST=false
122+
- CARGO_INCREMENTAL=0
123+
- RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads"
100124
allow_failures:
101125
- rust: nightly
102126
env: REGULAR_TEST=true

0 commit comments

Comments
 (0)