b58adf43c0
neutron-ha-tool.py.j2 has been updated to resolve flake8 violations. This includes removing the venv activation code, by implementing the following change: https://review.openstack.org/#/c/275279/ Pep8 'E501: line too long' has been added to the ignore list since the Jinja2 templated shebang line now exceeds 79 characters. Change-Id: Ib309ee50d75a5386fbc5fb8cd40d8f6733bd7887
44 lines
1.2 KiB
Bash
44 lines
1.2 KiB
Bash
#!/usr/bin/env bash
|
|
# Copyright 2015, Rackspace US, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
set -euov
|
|
|
|
FUNCTIONAL_TEST=${FUNCTIONAL_TEST:-true}
|
|
|
|
# prep the host
|
|
if [ "$(which apt-get)" ]; then
|
|
apt-get install -y build-essential python2.7 python-dev git-core
|
|
fi
|
|
|
|
# get pip, if necessary
|
|
if [ ! "$(which pip)" ]; then
|
|
curl --silent --show-error --retry 5 \
|
|
https://bootstrap.pypa.io/get-pip.py | sudo python2.7
|
|
fi
|
|
|
|
# install tox
|
|
pip install tox
|
|
|
|
# run through each tox env and execute the test
|
|
for tox_env in $(awk -F= '/envlist/ {print $2}' tox.ini | sed 's/,/ /g'); do
|
|
if [ "${tox_env}" != "functional" ]; then
|
|
tox -e ${tox_env}
|
|
elif [ "${tox_env}" == "functional" ]; then
|
|
if ${FUNCTIONAL_TEST}; then
|
|
tox -e ${tox_env}
|
|
fi
|
|
fi
|
|
done
|