diff --git a/ci.sh b/ci.sh index e0dce1d9..8ed9e272 100755 --- a/ci.sh +++ b/ci.sh @@ -24,29 +24,32 @@ case "$RUST_VERSION" in rustup target add --toolchain $RUST_VERSION $TARGET printenv - for FEAT in "" "x509," "ssl,"; do - # The SGX target cannot be run under test like a ELF binary - if [ "$TARGET" != "x86_64-fortanix-unknown-sgx" ]; then - # make sure that explicitly providing the default target works - cargo nextest run --features "$FEAT" --target $TARGET --release - cargo nextest run --features "$FEAT"pkcs12 --target $TARGET - cargo nextest run --features "$FEAT"pkcs12_rc2 --target $TARGET - cargo nextest run --features "$FEAT"dsa --target $TARGET + # The SGX target cannot be run under test like a ELF binary + if [ "$TARGET" != "x86_64-fortanix-unknown-sgx" ]; then + # make sure that explicitly providing the default target works + cargo nextest run --target $TARGET --release + cargo nextest run --features pkcs12 --target $TARGET + cargo nextest run --features pkcs12_rc2 --target $TARGET + cargo nextest run --features dsa --target $TARGET + cargo nextest run --features x509 --target $TARGET + cargo nextest run --features ssl --target $TARGET - # If AES-NI is supported, test the feature - if [ -n "$AES_NI_SUPPORT" ]; then - cargo nextest run --features "$FEAT"force_aesni_support --target $TARGET - fi + # If AES-NI is supported, test the feature + if [ -n "$AES_NI_SUPPORT" ]; then + cargo nextest run --features force_aesni_support --target $TARGET + fi - # no_std tests only are able to run on x86 platform - if [ "$TARGET" == "x86_64-unknown-linux-gnu" ] || [[ "$TARGET" =~ ^x86_64-pc-windows- ]]; then - cargo nextest run --no-default-features --features "$FEAT"no_std_deps,rdrand,time --target $TARGET - cargo nextest run --no-default-features --features "$FEAT"no_std_deps --target $TARGET - fi - else - cargo +$RUST_VERSION test --no-run --features "$FEAT" --target=$TARGET + # no_std tests only are able to run on x86 platform + if [ "$TARGET" == "x86_64-unknown-linux-gnu" ] || [[ "$TARGET" =~ ^x86_64-pc-windows- ]]; then + cargo nextest run --no-default-features --features ssl,no_std_deps,rdrand,time --target $TARGET + cargo nextest run --no-default-features --features x509,no_std_deps,rdrand,time --target $TARGET + cargo nextest run --no-default-features --features no_std_deps --target $TARGET fi - done + else + cargo +$TRAVIS_RUST_VERSION test --no-run --target=$TARGET + cargo +$TRAVIS_RUST_VERSION test --no-run --features ssl --target=$TARGET + cargo +$TRAVIS_RUST_VERSION test --no-run --features x509 --target=$TARGET + fi if [ "$TARGET" == "x86_64-apple-darwin" ]; then cargo nextest run --no-default-features --features no_std_deps --target $TARGET