Merge "Cleanup comments and error message in setup_env"

This commit is contained in:
Jenkins 2016-02-03 16:17:49 +00:00 committed by Gerrit Code Review
commit 165026d771

View File

@ -9,7 +9,7 @@ function usage {
echo "Usage: ${SCRIPT_NAME} [OPTION]..." echo "Usage: ${SCRIPT_NAME} [OPTION]..."
echo "Setup RefStack client with test environment" echo "Setup RefStack client with test environment"
echo "" echo ""
echo " -h, Print this usage message" echo " -h Print this usage message"
echo " -c Tempest test runner commit. You can specify SHA or branch here" echo " -c Tempest test runner commit. You can specify SHA or branch here"
echo " -t Tempest test runner tag. You can specify tag here" echo " -t Tempest test runner tag. You can specify tag here"
echo " If no commit or tag is specified, tempest will be install from commit" echo " If no commit or tag is specified, tempest will be install from commit"
@ -76,7 +76,7 @@ elif [ -n "$(command) -v zypper" ]; then
fi fi
sudo zypper --non-interactive install git sudo zypper --non-interactive install git
else else
echo "Neither apt-get nor yum nor zypper found" echo "Neither apt-get, nor yum, nor zypper found"
exit 1 exit 1
fi fi
@ -85,7 +85,7 @@ WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Checkout tempest on specified tag # Checkout tempest on specified tag
if [ -d "${WORKDIR}/.tempest" ]; then if [ -d "${WORKDIR}/.tempest" ]; then
while true; do while true; do
read -p "Installed tempest found.We should remove it. All data from previouse test runs will be deleted. Continue (y/n) ?" yn read -p "Existing tempest installation found. We should remove it. All data from previous test runs will be deleted. Continue (y/n) ?" yn
case ${yn} in case ${yn} in
[Yy]* ) rm -rf ${WORKDIR}/.tempest; break;; [Yy]* ) rm -rf ${WORKDIR}/.tempest; break;;
[Nn]* ) exit 1;; [Nn]* ) exit 1;;
@ -110,7 +110,7 @@ elif [ -n "$(command) -v zypper" ]; then
# For zypper-based distributions (openSuSe, SELS) # For zypper-based distributions (openSuSe, SELS)
sudo zypper --non-interactive install curl wget tar unzip make python-devel.x86_64 gcc gcc-c++ libffi-devel libxml2-devel zlib-devel libxslt-devel libopenssl-devel python-xml sudo zypper --non-interactive install curl wget tar unzip make python-devel.x86_64 gcc gcc-c++ libffi-devel libxml2-devel zlib-devel libxslt-devel libopenssl-devel python-xml
else else
echo "Neither apt-get nor yum nor zypper found" echo "Neither apt-get, nor yum, nor zypper found."
exit 1 exit 1
fi fi
@ -151,5 +151,5 @@ rm virtualenv-${VENV_VERSION}.tar.gz
${WORKDIR}/.venv/bin/pip install -r ${WORKDIR}/requirements.txt ${WORKDIR}/.venv/bin/pip install -r ${WORKDIR}/requirements.txt
${WORKDIR}/.tempest/.venv/bin/pip install -r ${WORKDIR}/.tempest/requirements.txt ${WORKDIR}/.tempest/.venv/bin/pip install -r ${WORKDIR}/.tempest/requirements.txt
# add additional packages to find more tests by tempest # Add additional packages to find more tests by tempest
${WORKDIR}/.tempest/.venv/bin/pip install -r ${WORKDIR}/tempest-additional-requirements.txt ${WORKDIR}/.tempest/.venv/bin/pip install -r ${WORKDIR}/tempest-additional-requirements.txt