|
2 | 2 | set -ex
|
3 | 3 | cd "$(dirname "$0")"
|
4 | 4 |
|
5 |
| -if [ "${TRAVIS_BRANCH}" = "staging" ]; |
6 |
| -then |
7 |
| - rm -rf ./target |
8 |
| -fi |
9 |
| - |
10 | 5 | cd "./mbedtls"
|
11 | 6 |
|
12 |
| -cargo test |
13 |
| -cargo test --features spin_threading |
14 |
| -cargo test --features rust_threading |
15 |
| -cargo test --features zlib |
16 |
| -cargo test --features pkcs12 |
17 |
| -cargo test --features pkcs12_rc2 |
18 |
| -cargo test --features force_aesni_support |
19 |
| -cargo +$CORE_IO_NIGHTLY test --no-default-features --features core_io,rdrand,time,custom_time,custom_gmtime_r |
20 |
| -cargo +$CORE_IO_NIGHTLY test --no-default-features --features core_io,rdrand |
21 |
| -cargo +nightly test --no-run --target=x86_64-fortanix-unknown-sgx --features=sgx --no-default-features |
| 7 | +if [ $TOOLCHAIN = "stable" ] || [ $TOOLCHAIN = "beta" ]; then |
| 8 | + |
| 9 | + rustup toolchain add $TOOLCHAIN |
| 10 | + rustup default $TOOLCHAIN |
| 11 | + cargo test |
| 12 | + cargo test --features spin_threading |
| 13 | + cargo test --features rust_threading |
| 14 | + cargo test --features zlib |
| 15 | + cargo test --features pkcs12 |
| 16 | + cargo test --features pkcs12_rc2 |
| 17 | + cargo test --features force_aesni_support |
| 18 | + |
| 19 | +elif [ $TOOLCHAIN = "coreio_nightly" ]; then |
| 20 | + |
| 21 | + rustup toolchain add $CORE_IO_NIGHTLY |
| 22 | + cargo +$CORE_IO_NIGHTLY test --no-default-features --features core_io,rdrand,time,custom_time,custom_gmtime_r |
| 23 | + cargo +$CORE_IO_NIGHTLY test --no-default-features --features core_io,rdrand |
| 24 | + |
| 25 | +elif [ $TOOLCHAIN = "sgx" ]; then |
| 26 | + rustup toolchain add nightly |
| 27 | + cargo +nightly test --no-run --target=x86_64-fortanix-unknown-sgx --features=sgx --no-default-features |
| 28 | + |
| 29 | +fi |
0 commit comments