e6ea310751
* Adds tox config - based on the config from python-quantumclient and updated for test, pep8 and coverage execution as per nova's run_tests.sh. * Adds nosetests defaults in setup.cfg * Adds runtime dependencies in tools/pip-requires - dependencies were gathered by referencing the packages used in creation of a Swift All In One. Versions were determined by checking the swift-core/trunk ppa or, failing that, the version available in lucid. * Adds test dependencies in tools/test-requires * Updates swift/common/middleware/formpost.py for pep8 compliance * Adds instructions for executing the tests with Tox to the developer_guidelines * Adds instructions for installing openstack.nose_plugin to developer_saio * Fixes bug 909177 Change-Id: I5407924d2181e9ab335aaf76bf30c8d40deccbb4
42 lines
953 B
INI
42 lines
953 B
INI
[tox]
|
|
envlist = py26,py27,pep8
|
|
|
|
[testenv]
|
|
deps =
|
|
-r{toxinidir}/tools/pip-requires
|
|
-r{toxinidir}/tools/test-requires
|
|
commands = nosetests test/unit []
|
|
|
|
[testenv:pep8]
|
|
deps = pep8==0.6.1
|
|
commands =
|
|
pep8 --repeat --show-pep8 --show-source --ignore=W602 swift tools setup.py
|
|
|
|
[testenv:cover]
|
|
commands =
|
|
coverage erase
|
|
nosetests test/unit --with-coverage --cover-html --cover-erase \
|
|
--cover-package=swift
|
|
/bin/rm -f .coverage
|
|
|
|
[testenv:hudson]
|
|
downloadcache = ~/cache/pip
|
|
|
|
[testenv:jenkins26]
|
|
basepython = python2.6
|
|
deps = file://{toxinidir}/.cache.bundle
|
|
|
|
[testenv:jenkins27]
|
|
basepython = python2.7
|
|
deps = file://{toxinidir}/.cache.bundle
|
|
|
|
[testenv:jenkinspep8]
|
|
deps = file://{toxinidir}/.cache.bundle
|
|
commands =
|
|
pep8 --repeat --show-pep8 --show-source --ignore=W602 swift tools setup.py
|
|
|
|
[testenv:jenkinscover]
|
|
deps = file://{toxinidir}/.cache.bundle
|
|
commands =
|
|
nosetests test/unit --with-xcoverage --cover-erase --cover-package=swift
|