Align build files and requirements
This is not an actual python project, so there is an amount of cruft in the repo that is not needed. However, it does generate tarballs in OpenStack Infra, so it needs the tox venv environment and the pbr setup.py stuff. It also is totally possible to check python files in the repo for flake8 violations, so set that up. Change-Id: Ifb94f65912716efe1c4596d552beee92d2dc3d6achanges/14/42514/3
parent
0ea244d33a
commit
ae5d0c61a3
@ -0,0 +1 @@
|
||||
pbr>=0.5.21,<1.0
|
@ -0,0 +1 @@
|
||||
hacking>=0.5.6,<0.8
|
@ -1,2 +0,0 @@
|
||||
testtools
|
||||
fixtures
|
@ -1,43 +1,20 @@
|
||||
[tox]
|
||||
envlist = py26,py27,pep8
|
||||
minversion = 1.6
|
||||
skipsdist = True
|
||||
envlist = pep8
|
||||
|
||||
[testenv]
|
||||
setenv = LANG=en_US.UTF-8
|
||||
LANGUAGE=en_US:en
|
||||
LC_ALL=C
|
||||
deps=
|
||||
testtools
|
||||
testrepository
|
||||
coverage
|
||||
babel
|
||||
commands=
|
||||
bash -c 'if [ ! -d ./.testrepository ] ; then testr init ; fi'
|
||||
bash -c 'testr run --parallel {posargs} ; RET=$? echo "Slowest Tests" ; testr slowest && exit $RET'
|
||||
|
||||
[testenv:py26]
|
||||
deps=
|
||||
testtools
|
||||
testrepository
|
||||
coverage
|
||||
babel
|
||||
discover
|
||||
argparse
|
||||
|
||||
[pep8]
|
||||
ignore = E125
|
||||
|
||||
[testenv:pep8]
|
||||
deps = pep8
|
||||
commands =
|
||||
pep8 --repeat --show-source --exclude=.venv,.tox,doc .
|
||||
usedevelop = True
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:cover]
|
||||
setenv = PYTHON=coverage run --source tripleo_image_elements
|
||||
commands = bash -c 'if [ ! -d ./.testrepository ] ; then testr init ; fi'
|
||||
bash -c 'testr run --parallel ; RET=$? ; coverage combine ; coverage html -d ./cover $OMIT && exit $RET'
|
||||
[testenv:pep8]
|
||||
commands = flake8
|
||||
|
||||
[tox:jenkins]
|
||||
downloadcache = ~/cache/pip
|
||||
[flake8]
|
||||
ignore = E125,H803
|
||||
exclude = .venv,.tox,dist,doc,*.egg
|
||||
show-source = true
|
||||
|
Loading…
Reference in New Issue