Skip to content

Commit

Permalink
Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm committed May 25, 2016
1 parent b80795f commit 55f12a3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copied from https://github.com/kennytm/extprim/blob/master/.travis.yml :)

language: rust
sudo: false

Expand All @@ -26,6 +24,7 @@ env:
- ARCH=i686

install:
# 1. Install kcov v31.
- mkdir -p ~/.cargo/bin
- |
wget https://github.com/SimonKagstrom/kcov/archive/v31.tar.gz &&
Expand All @@ -39,6 +38,8 @@ install:
cd ../..
- export PATH=$HOME/.local/bin:$HOME/.cargo/bin:$HOME/Library/Python/2.7/bin:$PATH
- kcov --version

# 2. Install cross-compiling toolchain.
- SYSROOT=$(rustc --print sysroot)
- export HOST=$ARCH-unknown-linux-gnu
- |
Expand All @@ -52,6 +53,8 @@ script:
- cargo test --target "$HOST"

after_success:
# Note: we skip the `check-specimen` test in coverage because kcov cannot do recursive-ptrace.
# Track this file: https://github.com/SimonKagstrom/kcov/blob/master/tests/recursive-ptrace/main.cc
- cargo clean
- cargo run -- kcov --bin cargo-kcov --coveralls -- --verify

16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cargo-kcov
==========

[![Build status](https://travis-ci.org/kennytm/cargo-kcov.svg?branch=master)](https://travis-ci.org/kennytm/cargo-kcov)
[![Coverage Status](https://coveralls.io/repos/github/kennytm/cargo-kcov/badge.svg?branch=coveralls)](https://coveralls.io/github/kennytm/cargo-kcov?branch=coveralls)
[![Coverage Status](https://coveralls.io/repos/github/kennytm/cargo-kcov/badge.svg?branch=master)](https://coveralls.io/github/kennytm/cargo-kcov?branch=master)
[![crates.io](http://meritbadge.herokuapp.com/cargo-kcov)](https://crates.io/crates/cargo-kcov)
![MIT](https://img.shields.io/badge/license-MIT-blue.svg)

Expand All @@ -28,8 +28,10 @@ Prerequisite
> **Important!** `kcov` only supports Linux at the moment. Track
> [SimonKagstrom/kcov#135](https://github.com/SimonKagstrom/kcov/issues/135) for OS X support.
You need to install `kcov` v26 or above. Some distro is still shipping v25 or v11, so you will need
to build from source. Please follow the instruction in https://users.rust-lang.org/t/650.
You need to install `kcov` v26 or above to collect coverage report from Rust. Some distro is still
shipping v25 or v11, so you will need to build from source.
Please follow the instruction in https://users.rust-lang.org/t/650. `cargo-kcov` requires v30 or
above since earlier versions of kcov do not report its version number.

Install
-------
Expand All @@ -47,7 +49,7 @@ Options
Generate coverage report via kcov

USAGE:
cargo kcov [OPTIONS]
cargo kcov [OPTIONS] [--] [ARGS]

OPTIONS:
--lib Test only this package's library
Expand All @@ -62,9 +64,13 @@ Options
--target <TRIPLE> Build for the target triple
--manifest-path <PATH> Path to the manifest to build tests for
--no-fail-fast Run all tests regardless of failure
--kcov <PATH> Path to the kcov executable
-o, --output <PATH> Output directory, default to [target/cov]
-v, --verbose Use verbose output
--coveralls Upload merged coverage data to coveralls.io from Travis CI
-h, --help Prints help information
-V, --version Prints version information


ARGS:
<KCOV-ARGS>... Further arguments passed to kcov

0 comments on commit 55f12a3

Please sign in to comment.