diff --git a/tools/tox_install.sh b/tools/tox_install.sh index 9472321697..c04fd2137d 100755 --- a/tools/tox_install.sh +++ b/tools/tox_install.sh @@ -15,27 +15,45 @@ ZUUL_CLONER=/usr/zuul-env/bin/zuul-cloner neutron_installed=$(echo "import neutron" | python 2>/dev/null ; echo $?) +networking_l2gw_installed=$(echo "import networking_l2gw" | python 2>/dev/null ; echo $?) set -ex cwd=$(/bin/pwd) +> /tmp/tox_install.txt -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 - echo "ZUUL CLONER" > /tmp/tox_install.txt +zuul_cloner () { + echo "ZUUL CLONER" >> /tmp/tox_install.txt cd /tmp $ZUUL_CLONER --cache-dir \ /opt/git \ - git://git.openstack.org \ - openstack/neutron - cd openstack/neutron + git://git.openstack.org $1 + cd $1 pip install -e . cd "$cwd" +} + +pip_hardcode () { + echo "PIP HARDCODE: $1" >> /tmp/tox_install.txt + pip install -U -egit+https://git.openstack.org/$1 +} + +if [ $neutron_installed -eq 0 ]; then + echo "NEUTRON ALREADY INSTALLED" >> /tmp/tox_install.txt + echo "Neutron already installed; using existing package" +elif [ -x "$ZUUL_CLONER" ]; then + zuul_cloner openstack/neutron else - echo "PIP HARDCODE" > /tmp/tox_install.txt - pip install -U -egit+https://git.openstack.org/openstack/neutron#egg=neutron + pip_hardcode openstack/neutron#egg=neutron +fi + +if [ $networking_l2gw_installed -eq 0 ]; then + echo "NETWORKING_L2GW ALREADY INSTALLED" >> /tmp/tox_install.txt + echo "Networking-l2gw already installed; using existing package" +elif [ -x "$ZUUL_CLONER" ]; then + zuul_cloner openstack/networking-l2gw +else + pip_hardcode openstack/networking-l2gw#egg=networking-l2gw fi pip install -U $* diff --git a/tox.ini b/tox.ini index 932fb84e34..820f9fd5fb 100644 --- a/tox.ini +++ b/tox.ini @@ -10,8 +10,7 @@ setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 usedevelop = True install_command = {toxinidir}/tools/tox_install.sh {opts} {packages} -deps = -egit+https://git.openstack.org/openstack/networking-l2gw#egg=networking-l2gw - -r{toxinidir}/requirements.txt +deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt whitelist_externals = sh commands =