File: coverage.sh

package info (click to toggle)
rust-cargo-c 0.10.11-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 424 kB
  • sloc: sh: 30; makefile: 12
file content (37 lines) | stat: -rw-r--r-- 1,653 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
export LLVM_PROFILE_FILE="cargo-c-%p-%m.profraw"
export RUSTFLAGS=-Cinstrument-coverage
export CARGO_INCREMENTAL=0

rustup default stable
cargo build
cargo test
rustup target add x86_64-pc-windows-gnu
unset RUSTFLAGS

function run() {
    echo "$*"
    $*
}

for project in example-project example-workspace; do
    run target/debug/cargo-capi capi --help
    run target/debug/cargo-capi capi test --manifest-path=${project}/Cargo.toml
    run target/debug/cargo-capi capi clean --manifest-path=${project}/Cargo.toml
    run target/debug/cargo-capi capi build --manifest-path=${project}/Cargo.toml
    run target/debug/cargo-capi capi install --manifest-path=${project}/Cargo.toml --destdir=/tmp/staging
    run target/debug/cargo-capi clean --manifest-path=${project}/Cargo.toml

    run target/debug/cargo-cbuild --help
    run target/debug/cargo-cbuild clean --manifest-path=${project}/Cargo.toml
    run target/debug/cargo-cbuild cbuild --manifest-path=${project}/Cargo.toml
    run target/debug/cargo-ctest metadata --help
    run target/debug/cargo-ctest ctest --manifest-path=${project}/Cargo.toml

    run target/debug/cargo-cinstall --help
    run target/debug/cargo-cinstall cinstall --manifest-path=${project}/Cargo.toml --destdir=/tmp/staging
    run target/debug/cargo-cinstall clean --manifest-path=${project}/Cargo.toml

    run target/debug/cargo-cinstall cinstall --manifest-path=${project}/Cargo.toml --destdir=/tmp/staging-win --target=x86_64-pc-windows-gnu --dlltool=x86_64-w64-mingw32-dlltool
done

grcov . --binary-path target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../**' --ignore '/*' -o coverage.lcov