Update testing bits for consistency
Change-Id: I5bbfdb11cd3a07bba1c47987a87743efcc33d15a Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
01e1299110
commit
3614448799
5
.gitignore
vendored
5
.gitignore
vendored
@ -29,6 +29,7 @@ doc/build/
|
|||||||
*.log
|
*.log
|
||||||
*.sql
|
*.sql
|
||||||
*.sqlite
|
*.sqlite
|
||||||
|
logs/*
|
||||||
|
|
||||||
# OS generated files #
|
# OS generated files #
|
||||||
######################
|
######################
|
||||||
@ -64,3 +65,7 @@ tests/plugins
|
|||||||
tests/playbooks
|
tests/playbooks
|
||||||
tests/test.retry
|
tests/test.retry
|
||||||
|
|
||||||
|
# Vagrant artifacts
|
||||||
|
.vagrant
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,5 +18,16 @@ export ANSIBLE_LIBRARY=${HOME}/.ansible/plugins/library
|
|||||||
# specified in ansible.cfg
|
# specified in ansible.cfg
|
||||||
export ANSIBLE_ROLES_PATH=${HOME}/.ansible/roles:$(pwd)/..
|
export ANSIBLE_ROLES_PATH=${HOME}/.ansible/roles:$(pwd)/..
|
||||||
|
|
||||||
|
export ANSIBLE_SSH_ARGS="-o ControlMaster=no \
|
||||||
|
-o UserKnownHostsFile=/dev/null \
|
||||||
|
-o StrictHostKeyChecking=no \
|
||||||
|
-o ServerAliveInterval=64 \
|
||||||
|
-o ServerAliveCountMax=1024 \
|
||||||
|
-o Compression=no \
|
||||||
|
-o TCPKeepAlive=yes \
|
||||||
|
-o VerifyHostKeyDNS=no \
|
||||||
|
-o ForwardX11=no \
|
||||||
|
-o ForwardAgent=yes"
|
||||||
|
|
||||||
echo "Run manual functional tests by executing the following:"
|
echo "Run manual functional tests by executing the following:"
|
||||||
echo "# ./.tox/functional/bin/ansible-playbook -i tests/inventory tests/test.yml -e \"rolename=$(pwd)\""
|
echo "# ./.tox/functional/bin/ansible-playbook -i tests/inventory tests/test.yml -e \"rolename=$(pwd)\""
|
||||||
|
12
run_tests.sh
12
run_tests.sh
@ -24,28 +24,28 @@ if [ ! "$(which pip)" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Install bindep and tox
|
# Install bindep and tox
|
||||||
pip install bindep tox
|
sudo pip install bindep tox
|
||||||
|
|
||||||
# CentOS 7 requires two additional packages:
|
# CentOS 7 requires two additional packages:
|
||||||
# redhat-lsb-core - for bindep profile support
|
# redhat-lsb-core - for bindep profile support
|
||||||
# epel-release - required to install python-ndg_httpsclient/python2-pyasn1
|
# epel-release - required to install python-ndg_httpsclient/python2-pyasn1
|
||||||
if [ "$(which yum)" ]; then
|
if [ "$(which yum)" ]; then
|
||||||
yum -y install redhat-lsb-core epel-release
|
sudo yum -y install redhat-lsb-core epel-release
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install OS packages using bindep
|
# Install OS packages using bindep
|
||||||
if apt-get -v >/dev/null 2>&1 ; then
|
if apt-get -v >/dev/null 2>&1 ; then
|
||||||
apt-get update
|
sudo apt-get update
|
||||||
DEBIAN_FRONTEND=noninteractive \
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
apt-get -q --option "Dpkg::Options::=--force-confold" \
|
sudo apt-get -q --option "Dpkg::Options::=--force-confold" \
|
||||||
--assume-yes install `bindep -b -f bindep.txt test`
|
--assume-yes install `bindep -b -f bindep.txt test`
|
||||||
else
|
else
|
||||||
yum install -y `bindep -b -f bindep.txt test`
|
sudo yum install -y `bindep -b -f bindep.txt test`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# run through each tox env and execute the test
|
# run through each tox env and execute the test
|
||||||
for tox_env in $(awk -F= '/envlist/ {print $2}' tox.ini | sed 's/,/ /g'); do
|
for tox_env in $(awk -F= '/envlist/ {print $2}' tox.ini | sed 's/,/ /g'); do
|
||||||
if [[ "${tox_env}" != "ansible-functional" ]] && [[ ${tox_env} != "func_*" ]]; then
|
if [ "${tox_env}" != "ansible-functional" ]; then
|
||||||
tox -e ${tox_env}
|
tox -e ${tox_env}
|
||||||
elif [ "${tox_env}" == "ansible-functional" ]; then
|
elif [ "${tox_env}" == "ansible-functional" ]; then
|
||||||
if ${FUNCTIONAL_TEST}; then
|
if ${FUNCTIONAL_TEST}; then
|
||||||
|
2
tox.ini
2
tox.ini
@ -113,6 +113,7 @@ setenv =
|
|||||||
# This is required as the default is '/etc/ansible/roles' or a path
|
# This is required as the default is '/etc/ansible/roles' or a path
|
||||||
# specified in ansible.cfg
|
# specified in ansible.cfg
|
||||||
ANSIBLE_ROLES_PATH = {homedir}/.ansible/roles:{toxinidir}/..
|
ANSIBLE_ROLES_PATH = {homedir}/.ansible/roles:{toxinidir}/..
|
||||||
|
ANSIBLE_TRANSPORT = "ssh"
|
||||||
PYTHONUNBUFFERED = 1
|
PYTHONUNBUFFERED = 1
|
||||||
commands =
|
commands =
|
||||||
rm -rf {homedir}/.ansible/plugins
|
rm -rf {homedir}/.ansible/plugins
|
||||||
@ -158,6 +159,7 @@ commands =
|
|||||||
install_command =
|
install_command =
|
||||||
pip install -U --force-reinstall {opts} {packages}
|
pip install -U --force-reinstall {opts} {packages}
|
||||||
|
|
||||||
|
|
||||||
[testenv:func_logs]
|
[testenv:func_logs]
|
||||||
commands =
|
commands =
|
||||||
bash -c 'mkdir -p {toxinidir}/logs'
|
bash -c 'mkdir -p {toxinidir}/logs'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user