From 4817bce2da023465aac891d969301b3ca7ea1332 Mon Sep 17 00:00:00 2001 From: ysaito1001 Date: Wed, 21 Aug 2024 14:11:03 -0500 Subject: [PATCH] Add env var to enable running smoketests --- tools/ci-scripts/check-aws-sdk-services | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tools/ci-scripts/check-aws-sdk-services b/tools/ci-scripts/check-aws-sdk-services index 2c86e975e8..f2f064def9 100755 --- a/tools/ci-scripts/check-aws-sdk-services +++ b/tools/ci-scripts/check-aws-sdk-services @@ -4,12 +4,23 @@ # SPDX-License-Identifier: Apache-2.0 # +C_YELLOW='\033[1;33m' +C_RESET='\033[0m' + set -eux cd aws-sdk -# Invoking `cargo test` at the root directory implicitly checks for the validity -# of the top-level `Cargo.toml` -cargo test --all-features +ENABLE_SMOKETESTS="${ENABLE_SMOKETESTS:-false}" + +# Check if the $ENABLE_SMOKETESTS environment variable is set +if [ "$ENABLE_SMOKETESTS" = "true" ]; then + # Invoking `cargo test` at the root directory implicitly checks for the validity + # of the top-level `Cargo.toml` + echo "${C_YELLOW}## Running smoketests...${C_RESET}" + RUSTFLAGS="--cfg smoketests" cargo test --all-features +else + cargo test --all-features +fi for test_dir in tests/*; do if [ -f "${test_dir}/Cargo.toml" ]; then