Skip to content

Commit 2df1303

Browse files
committed
Add checks so I can't mess that up again
1 parent 95e998d commit 2df1303

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ct.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ cd "$(dirname "$0")"
44

55
cd "./mbedtls"
66

7+
if [ -z $TRAVIS_RUST_VERSION ]; then
8+
echo "Expected TRAVIS_RUST_VERSION to be set in env"
9+
exit 1
10+
fi
11+
712
if [ $TRAVIS_RUST_VERSION = "stable" ] || [ $TRAVIS_RUST_VERSION = "beta" ] || [ $TRAVIS_RUST_VERSION = "nightly" ]; then
813
rustup default $TRAVIS_RUST_VERSION
914
cargo test
@@ -22,4 +27,7 @@ elif [ $TRAVIS_RUST_VERSION = $SGX_NIGHTLY ]; then
2227
rustup target add --toolchain $SGX_NIGHTLY x86_64-fortanix-unknown-sgx
2328
cargo +$SGX_NIGHTLY test --no-run --target=x86_64-fortanix-unknown-sgx --features=sgx --no-default-features
2429

30+
else
31+
echo "Unknown version $TRAVIS_RUST_VERSION"
32+
exit 1
2533
fi

0 commit comments

Comments
 (0)