diff --git a/.gitignore b/.gitignore index 799a0a51..21adf3c5 100644 --- a/.gitignore +++ b/.gitignore @@ -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 + + diff --git a/manual-test.rc b/manual-test.rc index fa1cdf95..f7e77710 100644 --- a/manual-test.rc +++ b/manual-test.rc @@ -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)\"" diff --git a/run_tests.sh b/run_tests.sh index 5b6ca346..482a3894 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -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 diff --git a/tox.ini b/tox.ini index 9d696d59..8a46e1fa 100644 --- a/tox.ini +++ b/tox.ini @@ -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'