Support tox-based unittests.
Change-Id: I6a0a616a979688595762e6b772d77a14f1968070
This commit is contained in:
parent
eab6a9fa76
commit
51210081a8
4
.gitignore
vendored
4
.gitignore
vendored
@ -10,7 +10,11 @@ build-stamp
|
||||
nova.egg-info
|
||||
.nova-venv
|
||||
.venv
|
||||
.tox
|
||||
*.sqlite
|
||||
*.log
|
||||
*.mo
|
||||
tools/conf/nova.conf*
|
||||
cover/*
|
||||
dist/*
|
||||
.coverage
|
||||
|
@ -32,6 +32,7 @@ import sys
|
||||
ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
||||
VENV = os.path.join(ROOT, '.venv')
|
||||
PIP_REQUIRES = os.path.join(ROOT, 'tools', 'pip-requires')
|
||||
TEST_REQUIRES = os.path.join(ROOT, 'tools', 'test-requires')
|
||||
PY_VERSION = "python%s.%s" % (sys.version_info[0], sys.version_info[1])
|
||||
|
||||
|
||||
@ -188,6 +189,7 @@ def install_dependencies(venv=VENV):
|
||||
pip_install('greenlet')
|
||||
|
||||
pip_install('-r', PIP_REQUIRES)
|
||||
pip_install('-r', TEST_REQUIRES)
|
||||
|
||||
# Tell the virtual env how to "import nova"
|
||||
pthfile = os.path.join(venv, "lib", PY_VERSION, "site-packages",
|
||||
|
@ -1,6 +1,4 @@
|
||||
SQLAlchemy>=0.7.3
|
||||
pep8==0.6.1
|
||||
pylint==0.19
|
||||
Cheetah==2.4.4
|
||||
amqplib==0.6.1
|
||||
anyjson==0.2.4
|
||||
@ -16,19 +14,13 @@ python-novaclient
|
||||
routes==1.12.3
|
||||
WebOb==1.0.8
|
||||
wsgiref==0.1.2
|
||||
mox==0.5.3
|
||||
greenlet>=0.3.1
|
||||
nose
|
||||
PasteDeploy==1.5.0
|
||||
paste
|
||||
sqlalchemy-migrate>=0.7.2
|
||||
netaddr
|
||||
sphinx
|
||||
glance
|
||||
xattr>=0.6.0
|
||||
suds==0.4
|
||||
coverage
|
||||
nosexcover
|
||||
paramiko
|
||||
feedparser
|
||||
pycrypto
|
||||
|
10
tools/test-requires
Normal file
10
tools/test-requires
Normal file
@ -0,0 +1,10 @@
|
||||
# Packages needed for dev testing
|
||||
distribute>=0.6.24
|
||||
|
||||
coverage
|
||||
mox==0.5.3
|
||||
nose
|
||||
nosexcover
|
||||
openstack.nose_plugin
|
||||
pep8==0.6.1
|
||||
sphinx>=1.1.2
|
37
tox.ini
Normal file
37
tox.ini
Normal file
@ -0,0 +1,37 @@
|
||||
[tox]
|
||||
envlist = py26,py27,pep8
|
||||
|
||||
[testenv]
|
||||
deps = -r{toxinidir}/tools/pip-requires
|
||||
-r{toxinidir}/tools/test-requires
|
||||
commands = /bin/bash run_tests.sh -N -P
|
||||
|
||||
[testenv:hudson]
|
||||
downloadcache = ~/cache/pip
|
||||
|
||||
[testenv:pep8]
|
||||
deps = pep8
|
||||
commands = /bin/bash run_tests.sh -N --pep8
|
||||
|
||||
[testenv:coverage]
|
||||
commands = /bin/bash run_tests.sh -N -P --coverage
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:jenkins26]
|
||||
basepython = python2.6
|
||||
deps = file://{toxinidir}/.cache.bundle
|
||||
|
||||
[testenv:jenkins27]
|
||||
basepython = python2.7
|
||||
deps = file://{toxinidir}/.cache.bundle
|
||||
|
||||
[testenv:jenkinscover]
|
||||
deps = file://{toxinidir}/.cache.bundle
|
||||
commands = /bin/bash run_tests.sh -N --coverage
|
||||
|
||||
[testenv:jenkinsvenv]
|
||||
deps = file://{toxinidir}/.cache.bundle
|
||||
commands = {posargs}
|
||||
|
Loading…
Reference in New Issue
Block a user