Update testing bits for consistency

Change-Id: I5bbfdb11cd3a07bba1c47987a87743efcc33d15a
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2016-09-17 11:54:43 -05:00
parent 01e1299110
commit 3614448799
4 changed files with 24 additions and 6 deletions

5
.gitignore vendored
View File

@ -29,6 +29,7 @@ doc/build/
*.log
*.sql
*.sqlite
logs/*
# OS generated files #
######################
@ -64,3 +65,7 @@ tests/plugins
tests/playbooks
tests/test.retry
# Vagrant artifacts
.vagrant

View File

@ -18,5 +18,16 @@ export ANSIBLE_LIBRARY=${HOME}/.ansible/plugins/library
# specified in ansible.cfg
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 "# ./.tox/functional/bin/ansible-playbook -i tests/inventory tests/test.yml -e \"rolename=$(pwd)\""

View File

@ -24,28 +24,28 @@ if [ ! "$(which pip)" ]; then
fi
# Install bindep and tox
pip install bindep tox
sudo pip install bindep tox
# CentOS 7 requires two additional packages:
# redhat-lsb-core - for bindep profile support
# epel-release - required to install python-ndg_httpsclient/python2-pyasn1
if [ "$(which yum)" ]; then
yum -y install redhat-lsb-core epel-release
sudo yum -y install redhat-lsb-core epel-release
fi
# Install OS packages using bindep
if apt-get -v >/dev/null 2>&1 ; then
apt-get update
sudo apt-get update
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`
else
yum install -y `bindep -b -f bindep.txt test`
sudo yum install -y `bindep -b -f bindep.txt test`
fi
# 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}" != "ansible-functional" ]] && [[ ${tox_env} != "func_*" ]]; then
if [ "${tox_env}" != "ansible-functional" ]; then
tox -e ${tox_env}
elif [ "${tox_env}" == "ansible-functional" ]; then
if ${FUNCTIONAL_TEST}; then

View File

@ -113,6 +113,7 @@ setenv =
# This is required as the default is '/etc/ansible/roles' or a path
# specified in ansible.cfg
ANSIBLE_ROLES_PATH = {homedir}/.ansible/roles:{toxinidir}/..
ANSIBLE_TRANSPORT = "ssh"
PYTHONUNBUFFERED = 1
commands =
rm -rf {homedir}/.ansible/plugins
@ -158,6 +159,7 @@ commands =
install_command =
pip install -U --force-reinstall {opts} {packages}
[testenv:func_logs]
commands =
bash -c 'mkdir -p {toxinidir}/logs'