diff --git a/contrib/test.sh b/contrib/test.sh index cafce679..b46e8917 100755 --- a/contrib/test.sh +++ b/contrib/test.sh @@ -1,13 +1,9 @@ -#!/bin/sh -ex +#!/bin/sh + +set -ex FEATURES="base64 bitcoinconsensus serde rand secp-recovery" -# Use toolchain if explicitly specified -if [ -n "$TOOLCHAIN" ] -then - alias cargo="cargo +$TOOLCHAIN" -fi - if [ "$DO_COV" = true ] then export RUSTFLAGS="-C link-dead-code" @@ -78,7 +74,7 @@ fi # Test each feature for feature in ${FEATURES} do - echo "********* Testing "$feature" *************" + echo "********* Testing $feature *************" cargo test --verbose --features="$feature" done @@ -102,11 +98,11 @@ fi # Bench if told to, only works with non-stable toolchain (nightly, beta). if [ "$DO_BENCH" = true ] then - if [ "NIGHTLY" = false ] + if [ "$NIGHTLY" = false ] then - if [ -n "TOOLCHAIN" ] + if [ -n "$RUSTUP_TOOLCHAIN" ] then - echo "TOOLCHAIN is set to a non-nightly toolchain but DO_BENCH requires a nightly toolchain" + echo "RUSTUP_TOOLCHAIN is set to a non-nightly toolchain but DO_BENCH requires a nightly toolchain" else echo "DO_BENCH requires a nightly toolchain" fi diff --git a/src/blockdata/constants.rs b/src/blockdata/constants.rs index 27de8845..907e20b3 100644 --- a/src/blockdata/constants.rs +++ b/src/blockdata/constants.rs @@ -305,4 +305,3 @@ mod test { assert_eq!(got, want); } } - diff --git a/src/blockdata/mod.rs b/src/blockdata/mod.rs index 15d44c24..2edb7883 100644 --- a/src/blockdata/mod.rs +++ b/src/blockdata/mod.rs @@ -14,4 +14,3 @@ pub mod script; pub mod transaction; pub mod block; pub mod witness; - diff --git a/src/blockdata/script.rs b/src/blockdata/script.rs index 1e145991..5d4e7c8e 100644 --- a/src/blockdata/script.rs +++ b/src/blockdata/script.rs @@ -1538,4 +1538,3 @@ mod test { assert!(read_scriptbool(&v)); } } - diff --git a/src/consensus/encode.rs b/src/consensus/encode.rs index 04b0fe01..362a8c54 100644 --- a/src/consensus/encode.rs +++ b/src/consensus/encode.rs @@ -1170,4 +1170,3 @@ mod tests { } } } - diff --git a/src/network/message_blockdata.rs b/src/network/message_blockdata.rs index 98e5bbc8..0e51748f 100644 --- a/src/network/message_blockdata.rs +++ b/src/network/message_blockdata.rs @@ -179,4 +179,3 @@ mod tests { assert_eq!(serialize(&real_decode), from_sat); } } - diff --git a/src/util/amount.rs b/src/util/amount.rs index 88fab77b..1c0f5c55 100644 --- a/src/util/amount.rs +++ b/src/util/amount.rs @@ -2238,4 +2238,3 @@ mod tests { } } } - diff --git a/src/util/base58.rs b/src/util/base58.rs index eb955469..d548f116 100644 --- a/src/util/base58.rs +++ b/src/util/base58.rs @@ -334,4 +334,3 @@ mod tests { } } - diff --git a/src/util/bip32.rs b/src/util/bip32.rs index 191e79f9..9f18916d 100644 --- a/src/util/bip32.rs +++ b/src/util/bip32.rs @@ -1177,4 +1177,3 @@ mod tests { ExtendedPrivKey::from_str(xpriv_str).unwrap(); } } -