Add script to allow update dependencies in all envs

Change-Id: Iab973d9d0aca8efefcb2f94e7af47db4c6ee02d2
This commit is contained in:
Nikolay Mahotkin 2014-03-13 17:32:45 +04:00
parent ed6b6136a5
commit 760bafc4e4
1 changed files with 16 additions and 0 deletions

16
tools/update_env_deps Executable file
View File

@ -0,0 +1,16 @@
TOX_ENVLIST=`grep envlist tox.ini | cut -d '=' -f 2 | tr ',' ' '`
TESTENVS=`grep testenv tox.ini | awk -F ':' '{print $2}' | tr '[]' ' '`
UNFILTERED_ENVLIST=`echo "$TOX_ENVLIST $TESTENVS"`
ENVLIST=$( awk 'BEGIN{RS=ORS=" "}!a[$0]++' <<<$UNFILTERED_ENVLIST );
for env in $ENVLIST
do
ENV_PATH=.tox/$env
PIP_PATH=$ENV_PATH/bin/pip
echo -e "\nUpdate environment ${env}...\n"
if [ ! -d $ENV_PATH -o ! -f $PIP_PATH ]
then
tox --notest -e$env
else
$PIP_PATH install -r requirements.txt -r test-requirements.txt
fi
done