From 0c256abd766265b8fdb11d354be7115c05bcaeb5 Mon Sep 17 00:00:00 2001 From: K Jonathan Harker Date: Wed, 20 Aug 2014 12:49:32 -0700 Subject: [PATCH] Use tox for bashate testing Create a tox.ini file to install bashate into a virtualenv for running tests. It can be run with a command such as "tox -v -ebashate". The find command being used is equivalent to the default list of files discovered by bashate plus the exclusion of the .tox/ directory. Also add the .tox/ directory to the .gitignore file. Change-Id: I94cab4e4a9118d62edfce29ead1f1e2a5f48e529 --- .gitignore | 1 + tox.ini | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index b80b47674f..b0a65f59cd 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ *.pem .localrc.auto .prereqs +.tox .stackenv accrc docs/files diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000000..c8a603b1e3 --- /dev/null +++ b/tox.ini @@ -0,0 +1,13 @@ +[tox] +minversion = 1.6 +skipsdist = True +envlist = bashate + +[testenv] +usedevelop = False +install_command = pip install {opts} {packages} + +[testenv:bashate] +deps = bashate +whitelist_externals = bash +commands = bash -c "find {toxinidir} -not -wholename \*.tox/\* -and \( -name \*.sh -or -name \*rc -or -name functions\* -or \( -wholename lib/\* -and -not -name \*.md \) \) -print0 | xargs -0 bashate -v"