Skip to content

Commit 0c256ab

Browse files
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
1 parent 58f8f42 commit 0c256ab

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*.pem
66
.localrc.auto
77
.prereqs
8+
.tox
89
.stackenv
910
accrc
1011
docs/files

tox.ini

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[tox]
2+
minversion = 1.6
3+
skipsdist = True
4+
envlist = bashate
5+
6+
[testenv]
7+
usedevelop = False
8+
install_command = pip install {opts} {packages}
9+
10+
[testenv:bashate]
11+
deps = bashate
12+
whitelist_externals = bash
13+
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"

0 commit comments

Comments
 (0)