Eliminate unnecessary deps for tox -e pep8,genconfig

Purpose: dramatically reduce how long it takes to run
$ tox -e pep8,genconfig
improving usability and dev productivity.

Change:
Replace full requirements.txt + test-requirements.txt install by minimal deps
for pep8 and genconfig testenv's

Result:
- tox -epep8 time reduces from 3m30s to 16s on initial run and
from 50s to 5s on subsequent runs
- tox -egenconfig time reduces from 3m46s to 12s on initial run and
from 1m13s to 3s in subsequent runs
(Times measured on my machine; similar proportions expected on other machines)

Change-Id: I0596a6970725189fd9b46a0cac923b86ccb03f8c
This commit is contained in:
Eric K 2015-12-07 16:14:44 -08:00
parent 40ffde817a
commit a774cad2bd
2 changed files with 13 additions and 2 deletions

View File

@ -0,0 +1,5 @@
#!/bin/sh
# install specific package $2 according to
# version specified in requirements file $1
pip install -U `grep $2 $1 | sed 's/#.*//'`

10
tox.ini
View File

@ -20,7 +20,10 @@ commands =
python setup.py testr --slowest --testr-args='{posargs}'
[testenv:pep8]
commands = flake8
usedevelop = False
deps =
commands = {toxinidir}/tools/pip-install-single-req.sh test-requirements.txt hacking
flake8
[testenv:venv]
commands = {posargs}
@ -44,4 +47,7 @@ builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,*thirdparty/*,CongressLexer.py,CongressParser.py,contrib/*
[testenv:genconfig]
commands = oslo-config-generator --config-file=etc/congress-config-generator.conf
usedevelop = False
deps =
commands = {toxinidir}/tools/pip-install-single-req.sh requirements.txt oslo.config
oslo-config-generator --config-file=etc/congress-config-generator.conf