Merge "Enable tox to run the subset test cases."
This commit is contained in:
commit
d3ad1040b2
29
tox.ini
29
tox.ini
@ -1,5 +1,5 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = pep8,py27{-horizon,-openstack_dashboard,dj18},py34,releasenotes
|
envlist = pep8,py27dj18,py27,py34,releasenotes
|
||||||
minversion = 1.6
|
minversion = 1.6
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
@ -16,14 +16,18 @@ setenv =
|
|||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands =
|
|
||||||
horizon: {envpython} {toxinidir}/manage.py test horizon --settings=horizon.test.settings {posargs}
|
|
||||||
openstack_dashboard: {envpython} {toxinidir}/manage.py test openstack_dashboard --settings=openstack_dashboard.test.settings --exclude-dir=openstack_dashboard/test/integration_tests {posargs}
|
|
||||||
|
|
||||||
[testenv:py27]
|
[testenv:py27]
|
||||||
|
whitelist_externals =
|
||||||
|
bash
|
||||||
commands =
|
commands =
|
||||||
{envpython} {toxinidir}/manage.py test horizon --settings=horizon.test.settings {posargs}
|
bash -c 'project=`echo {posargs} | cut -d. -f1`; \
|
||||||
{envpython} {toxinidir}/manage.py test openstack_dashboard --settings=openstack_dashboard.test.settings --exclude-dir=openstack_dashboard/test/integration_tests {posargs}
|
if [ -z "$project" ]; then \
|
||||||
|
{envpython} {toxinidir}/manage.py test horizon --settings=horizon.test.settings {posargs}; \
|
||||||
|
{envpython} {toxinidir}/manage.py test openstack_dashboard --settings=openstack_dashboard.test.settings --exclude-dir=openstack_dashboard/test/integration_tests {posargs}; \
|
||||||
|
else \
|
||||||
|
{envpython} {toxinidir}/manage.py test {posargs} --settings=$project.test.settings --exclude-dir=openstack_dashboard/test/integration_tests; \
|
||||||
|
fi'
|
||||||
|
|
||||||
# Django-1.8 is LTS
|
# Django-1.8 is LTS
|
||||||
[testenv:py27dj18]
|
[testenv:py27dj18]
|
||||||
@ -37,11 +41,16 @@ basepython = python3.4
|
|||||||
setenv =
|
setenv =
|
||||||
{[testenv]setenv}
|
{[testenv]setenv}
|
||||||
PYTHONUNBUFFERED=1
|
PYTHONUNBUFFERED=1
|
||||||
|
whitelist_externals =
|
||||||
|
bash
|
||||||
commands =
|
commands =
|
||||||
{envpython} {toxinidir}/manage.py test --settings=horizon.test.settings horizon.test.tests {posargs}
|
bash -c 'project=`echo {posargs} | cut -d. -f1`; \
|
||||||
{envpython} {toxinidir}/manage.py test --settings=openstack_dashboard.test.settings \
|
if [ -z "$project" ]; then \
|
||||||
--exclude-dir=openstack_dashboard/test/integration_tests \
|
{envpython} {toxinidir}/manage.py test horizon --settings=horizon.test.settings {posargs}; \
|
||||||
openstack_dashboard {posargs}
|
{envpython} {toxinidir}/manage.py test openstack_dashboard --settings=openstack_dashboard.test.settings --exclude-dir=openstack_dashboard/test/integration_tests {posargs}; \
|
||||||
|
else \
|
||||||
|
{envpython} {toxinidir}/manage.py test {posargs} --settings=$project.test.settings --exclude-dir=openstack_dashboard/test/integration_tests; \
|
||||||
|
fi'
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
|
Loading…
Reference in New Issue
Block a user