• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash -e
2
3cargo rustc --features map -- --test -C link-dead-code -Z profile -Z no-landing-pads
4
5LCOVOPTS=(
6  --gcov-tool llvm-gcov
7  --rc lcov_branch_coverage=1
8  --rc lcov_excl_line=assert
9)
10lcov "${LCOVOPTS[@]}" --capture --directory . --base-directory . \
11  -o target/coverage/raw.lcov
12lcov "${LCOVOPTS[@]}" --extract target/coverage/raw.lcov "$(pwd)/*" \
13  -o target/coverage/raw_crate.lcov
14
15genhtml --branch-coverage --demangle-cpp --legend \
16  -o target/coverage/ \
17  target/coverage/raw_crate.lcov
18