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:
parent
40ffde817a
commit
a774cad2bd
5
tools/pip-install-single-req.sh
Executable file
5
tools/pip-install-single-req.sh
Executable 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
10
tox.ini
@ -20,7 +20,10 @@ commands =
|
|||||||
python setup.py testr --slowest --testr-args='{posargs}'
|
python setup.py testr --slowest --testr-args='{posargs}'
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands = flake8
|
usedevelop = False
|
||||||
|
deps =
|
||||||
|
commands = {toxinidir}/tools/pip-install-single-req.sh test-requirements.txt hacking
|
||||||
|
flake8
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
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/*
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,*thirdparty/*,CongressLexer.py,CongressParser.py,contrib/*
|
||||||
|
|
||||||
[testenv:genconfig]
|
[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
|
||||||
|
Loading…
Reference in New Issue
Block a user