35 lines
558 B
Bash
35 lines
558 B
Bash
|
#!/bin/sh -ex
|
||
|
|
||
|
FEATURES="bitcoinconsensus use-serde serde-decimal"
|
||
|
|
||
|
# Use toolchain if explicitly specified
|
||
|
if [ -n "$TOOLCHAIN" ]
|
||
|
then
|
||
|
alias cargo="cargo +$TOOLCHAIN"
|
||
|
fi
|
||
|
|
||
|
# Test without any features first
|
||
|
cargo test --verbose
|
||
|
|
||
|
# Test each feature
|
||
|
for feature in ${FEATURES}
|
||
|
do
|
||
|
cargo test --verbose --features="$feature"
|
||
|
done
|
||
|
|
||
|
# Fuzz if told to
|
||
|
if [ "$DO_FUZZ" = true ]
|
||
|
then
|
||
|
(
|
||
|
cd fuzz
|
||
|
cargo test --verbose
|
||
|
./travis-fuzz.sh
|
||
|
)
|
||
|
fi
|
||
|
|
||
|
# Bench if told to
|
||
|
if [ "$DO_BENCH" = true ]
|
||
|
then
|
||
|
cargo bench --features unstable
|
||
|
fi
|