File: test_coverage.sh

package info (click to toggle)
rust-simple-moving-average 1.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 212 kB
  • sloc: sh: 17; makefile: 2
file content (20 lines) | stat: -rwxr-xr-x 437 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

set -uexo pipefail

rm -rf test_coverage tmp_test_data
mkdir test_coverage
export RUSTFLAGS="-Cinstrument-coverage"
cargo build
export LLVM_PROFILE_FILE="tmp_test_data/simple_moving_average-%p-%m.profraw"
cargo test
grcov \
	./tmp_test_data \
	--source-dir . \
	--binary-path ./target/debug/ \
	--output-types html \
	--branch \
	--ignore-not-existing \
	--output-path ./test_coverage/
ls tmp_test_data
rm -rf tmp_test_data