Fix tox does not pass arguments to nose

When testing with tox we currently cannot test a specific file, it
is due to the fact that tox does not pass the arguments to nose.

By adding {posargs} at the end of the tox target which are using
nose, we can now use all of its features

Change-Id: If59830669fabb704cb9b6348819c6cec4060088a
Closes-Bug: #1306016
Co-Authored-By: florent <florent.flament-ext@cloudwatt.com>
This commit is contained in:
Maxime Vidori 2014-04-10 17:39:21 +02:00
parent 00509e674e
commit 721133b3b7

12
tox.ini
View File

@ -14,7 +14,7 @@ setenv = VIRTUAL_ENV={envdir}
NOSE_OPENSTACK_SHOW_ELAPSED=1
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = /bin/bash run_tests.sh -N --no-pep8
commands = /bin/bash run_tests.sh -N --no-pep8 {posargs}
[testenv:pep8]
commands = /bin/bash run_tests.sh -N --pep8
@ -24,25 +24,25 @@ commands = /bin/bash run_tests.sh -N --pep8
commands = {posargs}
[testenv:cover]
commands = /bin/bash run_tests.sh -N --no-pep8 --coverage
commands = /bin/bash run_tests.sh -N --no-pep8 --coverage {posargs}
[testenv:py27dj14]
basepython = python2.7
commands = pip install django==1.4
/bin/bash run_tests.sh -N --no-pep8
/bin/bash run_tests.sh -N --no-pep8 {posargs}
[testenv:py27dj15]
basepython = python2.7
commands = pip install django>=1.5,<1.6
/bin/bash run_tests.sh -N --no-pep8
/bin/bash run_tests.sh -N --no-pep8 {posargs}
[testenv:py27integration]
basepython = python2.7
commands = /bin/bash run_tests.sh -N --integration
commands = /bin/bash run_tests.sh -N --integration {posargs}
[testenv:py26integration]
basepython = python2.6
commands = /bin/bash run_tests.sh -N --integration
commands = /bin/bash run_tests.sh -N --integration {posargs}
[tox:jenkins]
downloadcache = ~/cache/pip