Merge "Added constraints tox targets"
This commit is contained in:
commit
2d8b8db589
|
@ -18,6 +18,13 @@ neutron_installed=$(echo "import neutron" | python 2>/dev/null ; echo $?)
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
install_cmd="pip install"
|
||||||
|
if [ "$1" = "constrained" ]; then
|
||||||
|
install_cmd="$install_cmd $2"
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
|
||||||
if [ $neutron_installed -eq 0 ]; then
|
if [ $neutron_installed -eq 0 ]; then
|
||||||
echo "ALREADY INSTALLED" > /tmp/tox_install.txt
|
echo "ALREADY INSTALLED" > /tmp/tox_install.txt
|
||||||
echo "Neutron already installed; using existing package"
|
echo "Neutron already installed; using existing package"
|
||||||
|
@ -31,12 +38,12 @@ elif [ -x "$ZUUL_CLONER" ]; then
|
||||||
git://git.openstack.org \
|
git://git.openstack.org \
|
||||||
openstack/neutron
|
openstack/neutron
|
||||||
cd openstack/neutron
|
cd openstack/neutron
|
||||||
pip install -e .
|
$install_cmd -e .
|
||||||
cd "$cwd"
|
cd "$cwd"
|
||||||
else
|
else
|
||||||
echo "PIP HARDCODE" > /tmp/tox_install.txt
|
echo "PIP HARDCODE" > /tmp/tox_install.txt
|
||||||
pip install -U -egit+https://git.openstack.org/openstack/neutron#egg=neutron
|
$install_cmd -U -egit+https://git.openstack.org/openstack/neutron#egg=neutron
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pip install -U $*
|
$install_cmd -U $*
|
||||||
exit $?
|
exit $?
|
||||||
|
|
31
tox.ini
31
tox.ini
|
@ -6,7 +6,9 @@ skipsdist = True
|
||||||
[testenv]
|
[testenv]
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command = {toxinidir}/tools/tox_install.sh {opts} {packages}
|
install_command =
|
||||||
|
constraints: {[testenv:common-constraints]install_command}
|
||||||
|
{toxinidir}/tools/tox_install.sh unconstrained {opts} {packages}
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
whitelist_externals = sh
|
whitelist_externals = sh
|
||||||
|
@ -17,6 +19,9 @@ commands =
|
||||||
# there is also secret magic in pretty_tox.sh which lets you run in a fail only
|
# there is also secret magic in pretty_tox.sh which lets you run in a fail only
|
||||||
# mode. To do this define the TRACE_FAILONLY environmental variable.
|
# mode. To do this define the TRACE_FAILONLY environmental variable.
|
||||||
|
|
||||||
|
[testenv:common-constraints]
|
||||||
|
install_command = {toxinidir}/tools/tox_install.sh constrained -c{env:UPPER_CONTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
||||||
|
|
||||||
[testenv:functional]
|
[testenv:functional]
|
||||||
setenv = OS_TEST_PATH=./neutron_fwaas/tests/functional
|
setenv = OS_TEST_PATH=./neutron_fwaas/tests/functional
|
||||||
commands =
|
commands =
|
||||||
|
@ -46,6 +51,11 @@ commands =
|
||||||
{[testenv:genconfig]commands}
|
{[testenv:genconfig]commands}
|
||||||
whitelist_externals = sh
|
whitelist_externals = sh
|
||||||
|
|
||||||
|
[testenv:pep8-constraints]
|
||||||
|
install_command = {[testenv:common-constraints]install_command}
|
||||||
|
commands = {[testenv:pep8]commands}
|
||||||
|
whitelist_externals = {[testenv:pep8]whitelist_externals}
|
||||||
|
|
||||||
[testenv:i18n]
|
[testenv:i18n]
|
||||||
commands = python ./tools/check_i18n.py ./neutron_fwaas ./tools/i18n_cfg.py
|
commands = python ./tools/check_i18n.py ./neutron_fwaas ./tools/i18n_cfg.py
|
||||||
|
|
||||||
|
@ -53,12 +63,25 @@ commands = python ./tools/check_i18n.py ./neutron_fwaas ./tools/i18n_cfg.py
|
||||||
commands =
|
commands =
|
||||||
python setup.py testr --coverage --coverage-package-name=neutron_fwaas --testr-args='{posargs}'
|
python setup.py testr --coverage --coverage-package-name=neutron_fwaas --testr-args='{posargs}'
|
||||||
|
|
||||||
|
[testenv:cover-constraints]
|
||||||
|
commands =
|
||||||
|
install_command = {[testenv:common-constraints]install_command}
|
||||||
|
python setup.py testr --coverage --coverage-package-name=neutron_fwaas --testr-args='{posargs}'
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
|
[testenv:venv-constraints]
|
||||||
|
install_command = {[testenv:common-constraints]install_command}
|
||||||
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
commands = python setup.py build_sphinx
|
commands = python setup.py build_sphinx
|
||||||
|
|
||||||
|
[testenv:docs-constraints]
|
||||||
|
install_command = {[testenv:common-constraints]install_command}
|
||||||
|
commands = {[testenv:docs]commands}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# E125 continuation line does not distinguish itself from next logical line
|
# E125 continuation line does not distinguish itself from next logical line
|
||||||
# E126 continuation line over-indented for hanging indent
|
# E126 continuation line over-indented for hanging indent
|
||||||
|
@ -80,6 +103,12 @@ deps =
|
||||||
commands =
|
commands =
|
||||||
pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron_fwaas}
|
pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron_fwaas}
|
||||||
|
|
||||||
|
[testenv:pylint-constraints]
|
||||||
|
install_command = {[testenv:common-constraints]install_command}
|
||||||
|
deps = {[testenv:pylint]deps}
|
||||||
|
commands =
|
||||||
|
pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron_fwaas}
|
||||||
|
|
||||||
[hacking]
|
[hacking]
|
||||||
import_exceptions = neutron.i18n
|
import_exceptions = neutron.i18n
|
||||||
local-check-factory = neutron.hacking.checks.factory
|
local-check-factory = neutron.hacking.checks.factory
|
||||||
|
|
Loading…
Reference in New Issue