From b15cf200500fa52fd946a9c662c822c5e5696610 Mon Sep 17 00:00:00 2001 From: Ricardo Carrillo Cruz Date: Mon, 5 Oct 2015 13:47:51 +0200 Subject: [PATCH] Switch to Tox for prepping and running tests Rather than using homegrown bash scripts, let's just use tox which is a tool specifically designed for that. Change-Id: If94c7148fd7a5e0ae43c2c49538138421e6498b7 --- .gitignore | 2 ++ requirements.txt | 1 + tox.ini | 14 ++++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index ea18eb1..e85cb22 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ infra_config.yml +openstack.py +.tox diff --git a/requirements.txt b/requirements.txt index 2ecc9a4..5569b67 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +-e git+https://github.com/ansible/ansible.git@devel#egg=ansible shade shade-ansible jinja2 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..cad7a43 --- /dev/null +++ b/tox.ini @@ -0,0 +1,14 @@ +# Tox (http://tox.testrun.org/) is a tool for running tests +# in multiple virtualenvs. This configuration file will run the +# test suite on all supported python versions. To use it, "pip install tox" +# and then run "tox" from this directory. + +[tox] +envlist = py27 +skipsdist = True + +[testenv] +changedir = {toxinidir} +deps = -rrequirements.txt +commands = /usr/bin/wget -N https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/openstack.py + /bin/bash -c "/usr/bin/find -maxdepth 1 -name '*.yml' ! -name 'infra_config.yml'| /usr/bin/xargs -n1 ansible-playbook --syntax-check --list-tasks -i hosts"