From 78b662e7508bfb70b9df2a306915a56418e60fc9 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Fri, 15 Feb 2013 13:53:45 -0500 Subject: [PATCH] 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: I8a0a8ba5a9015950bc271f11cbc77308d993fde3 --- run_tests.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/run_tests.sh b/run_tests.sh index 5dc6de4d25..915de14749 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -26,6 +26,7 @@ function usage { echo " -n, --no-recreate-db Don't recreate the test database." 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" @@ -48,6 +49,7 @@ function process_option { -r|--recreate-db) recreate_db=1;; -n|--no-recreate-db) recreate_db=0;; -f|--force) force=1;; + -u|--update) update=1;; -p|--pep8) just_pep8=1;; -P|--no-pep8) no_pep8=1;; -c|--coverage) coverage=1;; @@ -73,6 +75,7 @@ no_pep8=0 coverage=0 nokeystoneclient=0 recreate_db=1 +update=0 for arg in "$@"; do process_option $arg @@ -126,6 +129,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