Add an update option to run_tests.sh
This commit adds an update option to run_tests.sh. This option is used to rerun install_venv.py on an already installed venv. This will then just update out of date packages with pip. Change-Id: I49a1cbcb62e7f429eca3efe949b8aa90507723c4
This commit is contained in:
parent
df77f43b26
commit
8cce6e9dda
@ -8,6 +8,7 @@ function usage {
|
|||||||
echo " -N, --no-virtual-env Don't use virtualenv. Run tests in local environment"
|
echo " -N, --no-virtual-env Don't use virtualenv. Run tests in local environment"
|
||||||
echo " -c, --coverage Generate coverage report"
|
echo " -c, --coverage Generate coverage report"
|
||||||
echo " -f, --force Force a clean re-build of the virtual environment. Useful when dependencies have been added."
|
echo " -f, --force Force a clean re-build of the virtual environment. Useful when dependencies have been added."
|
||||||
|
echo " -u, --update Update the virtual environment with any newer package versions"
|
||||||
echo " -p, --pep8 Just run pep8"
|
echo " -p, --pep8 Just run pep8"
|
||||||
echo " -P, --no-pep8 Don't run pep8"
|
echo " -P, --no-pep8 Don't run pep8"
|
||||||
echo " -l, --pylint Just run pylint"
|
echo " -l, --pylint Just run pylint"
|
||||||
@ -26,6 +27,7 @@ function process_option {
|
|||||||
-V|--virtual-env) let always_venv=1; let never_venv=0;;
|
-V|--virtual-env) let always_venv=1; let never_venv=0;;
|
||||||
-N|--no-virtual-env) let always_venv=0; let never_venv=1;;
|
-N|--no-virtual-env) let always_venv=0; let never_venv=1;;
|
||||||
-f|--force) let force=1;;
|
-f|--force) let force=1;;
|
||||||
|
-u|--update) update=1;;
|
||||||
-p|--pep8) let just_pep8=1;;
|
-p|--pep8) let just_pep8=1;;
|
||||||
-P|--no-pep8) no_pep8=1;;
|
-P|--no-pep8) no_pep8=1;;
|
||||||
-l|--pylint) let just_pylint=1; let never_venv=1; let always_venv=0;;
|
-l|--pylint) let just_pylint=1; let never_venv=1; let always_venv=0;;
|
||||||
@ -48,6 +50,7 @@ noseargs=
|
|||||||
wrapper=""
|
wrapper=""
|
||||||
coverage=0
|
coverage=0
|
||||||
verbose=0
|
verbose=0
|
||||||
|
update=0
|
||||||
|
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
process_option $arg
|
process_option $arg
|
||||||
@ -123,6 +126,10 @@ then
|
|||||||
echo "Cleaning virtualenv..."
|
echo "Cleaning virtualenv..."
|
||||||
rm -rf ${venv}
|
rm -rf ${venv}
|
||||||
fi
|
fi
|
||||||
|
if [ $update -eq 1 ]; then
|
||||||
|
echo "Updating virtualenv..."
|
||||||
|
python tools/install_venv.py
|
||||||
|
fi
|
||||||
if [ -e ${venv} ]; then
|
if [ -e ${venv} ]; then
|
||||||
wrapper="${with_venv}"
|
wrapper="${with_venv}"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user