neutron/tools/pip_install_src_modules.sh
Doug Wiegley 55f2336981
Add method to tox to use local neutron-lib with unit tests
Change-Id: Ic96bb04cc3f9ed1438596b2150030ab22887b091
2019-03-02 14:56:15 -07:00

26 lines
651 B
Bash
Executable File

#!/bin/bash
# For neutron unit tests, you can define git repos containing modules
# that you want to use to override the requirements-based packages.
#
# Why, you ask? Because you made changes to neutron-lib, and you want
# run the unit tests together. E.g.:
#
# env TOX_ENV_SRC_MODULES="$HOME/src/neutron-lib" tox -e py27
toxinidir="$1"
if [ -z "$TOX_ENV_SRC_MODULES" ]; then
exit 0
fi
for repo in $TOX_ENV_SRC_MODULES; do
d="${toxinidir}/${repo}"
if [ ! -d "$d" ]; then
echo "tox_env_src: error: no directory found at $d"
continue
fi
echo "tox_env_src: pip installing from $d"
pip install -e "$d"
done