Add -u option in run_tests.sh

-u option used for update venv packages.

Fixes bug #1205551

Change-Id: I2ef6e11c556bd90154a286eada6d37750caf5e19
This commit is contained in:
Wu Wenxiang
2013-07-28 23:31:06 +08:00
parent 1e3cf4bb2f
commit d5bcad79c5

View File

@@ -11,6 +11,7 @@ function usage {
echo " -s, --no-site-packages Isolate the virtualenv from the global Python environment"
echo " -x, --stop Stop running tests after the first error or failure."
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, --no-pep8 Don't run pep8"
echo " -c, --coverage Generate coverage report"
@@ -31,6 +32,7 @@ function process_option {
-N|--no-virtual-env) always_venv=0; never_venv=1;;
-s|--no-site-packages) no_site_packages=1;;
-f|--force) force=1;;
-u|--update) update=1;;
-p|--pep8) just_pep8=1;;
-P|--no-pep8) no_pep8=1;;
-c|--coverage) coverage=1;;
@@ -54,6 +56,7 @@ just_pep8=0
no_pep8=0
coverage=0
debug=0
update=0
LANG=en_US.UTF-8
LANGUAGE=en_US:en
@@ -148,6 +151,10 @@ then
echo "Cleaning virtualenv..."
rm -rf ${venv}
fi
if [ $update -eq 1 ]; then
echo "Updating virtualenv..."
python tools/install_venv.py
fi
if [ -e ${venv} ]; then
wrapper="${with_venv}"
else