#!/usr/bin/env bash
#
# Build or update covearge information.
# Use #[cfg_attr(tarpaulin, skip)] to skip lines in source.
#
# This uses tarpaulin to perform coverage testing.  Find tarpaulin here:
# https://crates.io/crates/cargo-tarpaulin
#
# Install tarpaulin with:
# $ cargo install cargo-tarpaulin
#
# The odd echo at the start is there to handle a few doc examples that require
# standard input.  This prevents "hanging" during the coverage testing. It does
# not impact "cargo test".

echo "" | cargo tarpaulin --rustflags="-C opt-level=0" --engine=llvm --out=xml --out=html --run-types=AllTargets --force-clean &&
	mv cobertura.xml cov.xml
exit $?
