mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add tox config.
Add a config file for tox to enable running salt tests in a set of virtualenvs for different versions of python. Add stanzas to allow for running tests against 2.6, 2.7 and 3.2. First step - pip install tox. Then, to run tests in a virtualenv against all three, simply type: tox If you want to run against just one, try: tox -epy26 And if you want to see more, do: tox -v -epy26
This commit is contained in:
parent
c720526932
commit
12fd1315f8
3 changed files with 15 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -17,3 +17,5 @@ lib/
|
|||
pip/
|
||||
share/
|
||||
|
||||
# tox - ignore any tox-created virtualenv dirs
|
||||
.tox
|
||||
|
|
2
setup.py
2
setup.py
|
@ -14,7 +14,7 @@ from distutils.sysconfig import get_python_lib, PREFIX
|
|||
if os.environ.get('VIRTUAL_ENV'):
|
||||
from setuptools import setup
|
||||
|
||||
execfile('salt/version.py')
|
||||
exec(compile(open("salt/version.py").read(), "salt/version.py", 'exec'))
|
||||
|
||||
class TestCommand(Command):
|
||||
description = 'Run tests'
|
||||
|
|
12
tox.ini
Normal file
12
tox.ini
Normal file
|
@ -0,0 +1,12 @@
|
|||
[tox]
|
||||
envlist = py26,py27,py32
|
||||
|
||||
[testenv]
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
unittest2
|
||||
commands = bash -c 'cd tests && python runtests.py'
|
||||
|
||||
[testenv:py32]
|
||||
basepython = python3.2
|
||||
deps = -r{toxinidir}/requirements.txt
|
Loading…
Add table
Reference in a new issue