FEATURES="bitcoinconsensus use-serde"
if [ "$DO_COV" = true ]
then
export RUSTFLAGS="-C link-dead-code"
fi
if [ -n "$TOOLCHAIN" ]
then
alias cargo="cargo +$TOOLCHAIN"
fi
cargo test --verbose
for feature in ${FEATURES}
do
cargo test --verbose --features="$feature"
done
if [ "$DO_FUZZ" = true ]
then
(
cd fuzz
cargo test --verbose
./travis-fuzz.sh
)
fi
if [ "$DO_BENCH" = true ]
then
cargo bench --features unstable
fi
if [ -n "$AS_DEPENDENCY" ]
then
cargo new dep_test
cd dep_test
echo 'bitcoin = { path = "..", features = ["use-serde"] }' >> Cargo.toml
cargo test --verbose
fi