Skip to content

Commit

Permalink
Merge pull request #106 from arxcruz/revert-tempest
Browse files Browse the repository at this point in the history
Revert "Merge pull request #96 from lpiwowar/feature/tempest-parameter"
  • Loading branch information
openshift-merge-bot[bot] authored Nov 29, 2023
2 parents 1339555 + 54c7d98 commit 776352b
Showing 1 changed file with 15 additions and 25 deletions.
40 changes: 15 additions & 25 deletions container-images/tcib/base/os/tempest/run_tempest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ set -x

HOMEDIR=/var/lib/tempest
TEMPEST_DIR=$HOMEDIR/openshift
PROFILE_ARG=""
CONCURRENCY="${CONCURRENCY:-}"

TEMPESTCONF_ARGS=""
TEMPEST_ARGS=""

[[ ${TEMPESTCONF_CREATE:=true} == true ]] && TEMPESTCONF_ARGS+="--create "
[[ ${TEMPESTCONF_INSECURE} == true ]] && TEMPESTCONF_ARGS+="--insecure "
Expand All @@ -31,18 +32,6 @@ TEMPEST_ARGS=""
[[ ! -z ${TEMPESTCONF_FLAVOR_MIN_DISK} ]] && TEMPESTCONF_ARGS+="--flavor-min-disk ${TEMPESTCONF_FLAVOR_MIN_DISK} "
[[ ! -z ${TEMPESTCONF_NETWORK_ID} ]] && TEMPESTCONF_ARGS+="--network-id ${TEMPESTCONF_NETWORK_ID} "

# Tempest arguments
[[ ${TEMPEST_SMOKE} == true ]] && TEMPEST_ARGS+="--smoke "
[[ ${TEMPEST_PARALLEL:=true} == true ]] && TEMPEST_ARGS+="--parallel "
[[ ${TEMPEST_SERIAL} == true ]] && TEMPEST_ARGS+="--serial "

[[ ! -z ${TEMPEST_INCLUDE_LIST} ]] && TEMPEST_ARGS+="--include-list ${TEMPEST_INCLUDE_LIST} "
[[ ! -z ${TEMPEST_EXCLUDE_LIST} ]] && TEMPEST_ARGS+="--exclude-list ${TEMPEST_EXCLUDE_LIST} "
[[ ! -z ${TEMPEST_CONCURRENCY} ]] && TEMPEST_ARGS+="--concurrency ${TEMPEST_CONCURRENCY} "
[[ ! -z ${TEMPEST_WORKER_FILE} ]] && TEMPEST_ARGS+="--worker-file ${TEMPEST_WORKER_FILE} "
[[ -z ${TEMPEST_INCLUDE_LIST} ]] && TEMPEST_ARGS+="--include-list ${TEMPEST_PATH}include.txt "
[[ -z ${TEMPEST_EXCLUDE_LIST} ]] && TEMPEST_ARGS+="--exclude-list ${TEMPEST_PATH}exclude.txt "

if [[ ! -z ${TEMPESTCONF_APPEND} ]]; then
while IFS= read -r line; do
TEMPESTCONF_ARGS+="--append $line "
Expand All @@ -57,10 +46,6 @@ fi

TEMPESTCONF_OVERRIDES="$(echo ${TEMPESTCONF_OVERRIDES} | tr '\n' ' ') identity.v3_endpoint_type public"

if [ -n "$CONCURRENCY" ] && [ -z ${TEMPEST_CONCURRENCY} ]; then
TEMPEST_ARGS+="--concurrency ${CONCURRENCY} "
fi

pushd $HOMEDIR

export OS_CLOUD=default
Expand All @@ -76,20 +61,25 @@ if [ -f ${TEMPEST_PATH}profile.yaml ] && [ -z ${TEMPESTCONF_PROFILE} ]; then
TEMPESTCONF_ARGS+="--profile ${TEMPEST_PATH}profile.yaml "
fi

if [ ! -f ${TEMPEST_PATH}include.txt ] && [ -z ${TEMPEST_INCLUDE_LIST} ]; then
tempest init openshift

pushd $TEMPEST_DIR
discover-tempest-config ${TEMPESTCONF_ARGS} ${TEMPESTCONF_OVERRIDES}

if [ ! -f ${TEMPEST_PATH}include.txt ]; then
echo "tempest.api.identity.v3" > ${TEMPEST_PATH}include.txt
fi

if [ ! -f ${TEMPEST_PATH}exclude.txt ] && [ -z ${TEMPEST_EXCLUDE_LIST} ]; then
if [ ! -f ${TEMPEST_PATH}exclude.txt ]; then
touch ${TEMPEST_PATH}exclude.txt
fi

tempest init openshift

pushd $TEMPEST_DIR
discover-tempest-config ${TEMPESTCONF_ARGS} ${TEMPESTCONF_OVERRIDES}
if [ -n "$CONCURRENCY" ]; then
CONCURRENCY_ARGS="--concurrency ${CONCURRENCY}"
fi

tempest run ${TEMPEST_ARGS}
tempest run ${CONCURRENCY_ARGS:-} \
--include-list ${TEMPEST_PATH}include.txt \
--exclude-list ${TEMPEST_PATH}exclude.txt

RETURN_VALUE=$?

Expand Down

0 comments on commit 776352b

Please sign in to comment.