summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEwan Mellor <ewan.mellor@citrix.com>2010-12-28 12:37:33 +0000
committerTarmac <>2010-12-28 12:37:33 +0000
commit675ca7c5f38af0fa1150936e881482aa20fdaa45 (patch)
treebd8bea8604a4ff7138c726bc2aa4c8be6a754d76
parentd3d0e855d8584dd4dac258598326b526a049124a (diff)
parent821fc6b5bce393e584d2c0f93243beb43ff547a5 (diff)
Bug #694890: run_tests.sh sometimes doesn't pass arguments to nosetest
Change the argument parsing in run_tests.sh so that we explicitly gather the arguments that aren't meant for run_tests.sh, and pass them on to nosetests.
-rwxr-xr-xrun_tests.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/run_tests.sh b/run_tests.sh
index 67214996d..ffb0b6295 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -21,6 +21,7 @@ function process_option {
-V|--virtual-env) let always_venv=1; let never_venv=0;;
-N|--no-virtual-env) let always_venv=0; let never_venv=1;;
-f|--force) let force=1;;
+ *) noseargs="$noseargs $1"
esac
}
@@ -29,15 +30,18 @@ with_venv=tools/with_venv.sh
always_venv=0
never_venv=0
force=0
+noseargs=
for arg in "$@"; do
process_option $arg
done
+NOSETESTS="nosetests -v $noseargs"
+
if [ $never_venv -eq 1 ]; then
# Just run the test suites in current environment
rm -f nova.sqlite
- nosetests -v
+ $NOSETESTS
exit
fi
@@ -49,7 +53,7 @@ fi
if [ -e ${venv} ]; then
${with_venv} rm -f nova.sqlite
- ${with_venv} nosetests -v $@
+ ${with_venv} $NOSETESTS
else
if [ $always_venv -eq 1 ]; then
# Automatically install the virtualenv
@@ -62,10 +66,10 @@ else
python tools/install_venv.py
else
rm -f nova.sqlite
- nosetests -v
+ $NOSETESTS
exit
fi
fi
${with_venv} rm -f nova.sqlite
- ${with_venv} nosetests -v $@
+ ${with_venv} $NOSETESTS
fi