diff --git a/test-requirements.txt b/test-requirements.txt index 49b9ca52..10c96cea 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -16,6 +16,7 @@ testrepository>=0.0.18 testscenarios>=0.4 testtools>=1.4.0 reno>=0.1.1 # Apache2 +pylint===1.4.5 -e git+https://git.openstack.org/openstack/networking-bagpipe#egg=networking-bagpipe -e git+https://git.openstack.org/openstack/networking-odl#egg=networking-odl diff --git a/tools/tox_install.sh b/tools/tox_install.sh index 39ddaa43..5f8e7c7c 100755 --- a/tools/tox_install.sh +++ b/tools/tox_install.sh @@ -1,7 +1,5 @@ #!/bin/sh -# borrowed from neutron-lbaas/tools - # Many of neutron's repos suffer from the problem of depending on neutron, # but it not existing on pypi. @@ -16,29 +14,42 @@ # pip install {opts} {packages} ZUUL_CLONER=/usr/zuul-env/bin/zuul-cloner +BRANCH_NAME=master neutron_installed=$(echo "import neutron" | python 2>/dev/null ; echo $?) -openstack_branch=master set -e +CONSTRAINTS_FILE=1ドル +shift + +install_cmd="pip install" +if [ $CONSTRAINTS_FILE != "unconstrained" ]; then + install_cmd="$install_cmd -c$CONSTRAINTS_FILE" +fi + if [ $neutron_installed -eq 0 ]; then echo "ALREADY INSTALLED"> /tmp/tox_install.txt echo "Neutron already installed; using existing package" elif [ -x "$ZUUL_CLONER" ]; then + export ZUUL_BRANCH=${ZUUL_BRANCH-$BRANCH} echo "ZUUL CLONER"> /tmp/tox_install.txt cwd=$(/bin/pwd) cd /tmp - $ZUUL_CLONER --branch $openstack_branch --cache-dir \ + $ZUUL_CLONER --cache-dir \ /opt/git \ + --branch $BRANCH_NAME \ git://git.openstack.org \ openstack/neutron cd openstack/neutron - pip install -e . + $install_cmd -e . cd "$cwd" else echo "PIP HARDCODE"> /tmp/tox_install.txt - pip install -U -egit+https://git.openstack.org/openstack/neutron@${openstack_branch}#egg=neutron + if [ -z "$NEUTRON_PIP_LOCATION" ]; then + NEUTRON_PIP_LOCATION="git+https://git.openstack.org/openstack/neutron@$BRANCH_NAME#egg=neutron" + fi + $install_cmd -U -e ${NEUTRON_PIP_LOCATION} fi -pip install -U $* +$install_cmd -U $* exit $? diff --git a/tox.ini b/tox.ini index 9202b83e..6cc40003 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,7 @@ skipsdist = True [testenv] usedevelop = True -install_command = {toxinidir}/tools/tox_install.sh {opts} {packages} +install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/requirements.txt @@ -13,13 +13,13 @@ deps = -r{toxinidir}/requirements.txt commands = python setup.py testr --slowest --testr-args='{posargs}' [testenv:releasenotes] +# TODO(tmorin): remove once infra supports constraints for this target +install_command = {toxinidir}/tools/tox_install.sh unconstrained {opts} {packages} commands = sphinx-build -W -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:pep8] deps = {[testenv]deps} - pylint - astroid commands = flake8 pylint --version @@ -27,9 +27,13 @@ commands = neutron-db-manage --subproject networking-bgpvpn --database-connection sqlite:// check_migration [testenv:venv] +# TODO(tmorin): remove once infra supports constraints for this target +install_command = {toxinidir}/tools/tox_install.sh unconstrained {opts} {packages} commands = {posargs} [testenv:cover] +# TODO(tmorin): remove once infra supports constraints for this target +install_command = {toxinidir}/tools/tox_install.sh unconstrained {opts} {packages} commands = python setup.py testr --coverage --testr-args='{posargs}' [testenv:docs]

AltStyle によって変換されたページ (->オリジナル) /