forked from fortanix/rust-mbedtls
-
Notifications
You must be signed in to change notification settings - Fork 2
/
ct.sh
executable file
·33 lines (27 loc) · 1.1 KB
/
ct.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
set -ex
cd "$(dirname "$0")"
cd "./mbedtls"
if [ -z $TRAVIS_RUST_VERSION ]; then
echo "Expected TRAVIS_RUST_VERSION to be set in env"
exit 1
fi
if [ $TRAVIS_RUST_VERSION = "stable" ] || [ $TRAVIS_RUST_VERSION = "beta" ] || [ $TRAVIS_RUST_VERSION = "nightly" ]; then
rustup default $TRAVIS_RUST_VERSION
cargo test
cargo test --features spin_threading
cargo test --features rust_threading
cargo test --features zlib
cargo test --features pkcs12
cargo test --features pkcs12_rc2
cargo test --features force_aesni_support
elif [ $TRAVIS_RUST_VERSION = $CORE_IO_NIGHTLY ]; then
cargo +$CORE_IO_NIGHTLY test --no-default-features --features core_io,rdrand,time,custom_time,custom_gmtime_r
cargo +$CORE_IO_NIGHTLY test --no-default-features --features core_io,rdrand
elif [ $TRAVIS_RUST_VERSION = $SGX_NIGHTLY ]; then
rustup target add --toolchain $SGX_NIGHTLY x86_64-fortanix-unknown-sgx
cargo +$SGX_NIGHTLY test --no-run --target=x86_64-fortanix-unknown-sgx --features=sgx --no-default-features
else
echo "Unknown version $TRAVIS_RUST_VERSION"
exit 1
fi