From b075e90c8df094929601d73d05b446fbaff6fa69 Mon Sep 17 00:00:00 2001 From: Gerardo Porras Date: Wed, 17 Oct 2012 16:00:48 -0700 Subject: [PATCH] Add noseopts and replace noseargs where needed to run_test.sh Add of noseopts to the run_tests script so users can be able to run tests adding extra options to be passed to nosetests. This option is currently in keystone but not in glance. Fixes bug 1065758 Change-Id: I7c78749adb90b126da5bd9580da6bfd7c9e1bf54 --- run_tests.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index 6812a8f66f..3fd840979c 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -24,8 +24,9 @@ function process_option { -N|--no-virtual-env) let always_venv=0; let never_venv=1;; -p|--pep8) let just_pep8=1;; -f|--force) let force=1;; - --unittests-only) noseargs="$noseargs --exclude-dir=glance/tests/functional";; - -c|--coverage) noseargs="$noseargs --with-coverage --cover-package=glance";; + --unittests-only) noseopts="$noseopts --exclude-dir=glance/tests/functional";; + -c|--coverage) noseopts="$noseopts --with-coverage --cover-package=glance";; + -*) noseopts="$noseopts $1";; *) noseargs="$noseargs $1" esac } @@ -35,6 +36,7 @@ with_venv=tools/with_venv.sh always_venv=0 never_venv=0 force=0 +noseopts= noseargs= wrapper="" just_pep8=0 @@ -67,7 +69,7 @@ function run_pep8 { } -NOSETESTS="nosetests $noseargs" +NOSETESTS="nosetests $noseopts $noseargs" if [ $never_venv -eq 0 ] then