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
This commit is contained in:
parent
e56102614f
commit
b075e90c8d
@ -24,8 +24,9 @@ function process_option {
|
|||||||
-N|--no-virtual-env) let always_venv=0; let never_venv=1;;
|
-N|--no-virtual-env) let always_venv=0; let never_venv=1;;
|
||||||
-p|--pep8) let just_pep8=1;;
|
-p|--pep8) let just_pep8=1;;
|
||||||
-f|--force) let force=1;;
|
-f|--force) let force=1;;
|
||||||
--unittests-only) noseargs="$noseargs --exclude-dir=glance/tests/functional";;
|
--unittests-only) noseopts="$noseopts --exclude-dir=glance/tests/functional";;
|
||||||
-c|--coverage) noseargs="$noseargs --with-coverage --cover-package=glance";;
|
-c|--coverage) noseopts="$noseopts --with-coverage --cover-package=glance";;
|
||||||
|
-*) noseopts="$noseopts $1";;
|
||||||
*) noseargs="$noseargs $1"
|
*) noseargs="$noseargs $1"
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@ -35,6 +36,7 @@ with_venv=tools/with_venv.sh
|
|||||||
always_venv=0
|
always_venv=0
|
||||||
never_venv=0
|
never_venv=0
|
||||||
force=0
|
force=0
|
||||||
|
noseopts=
|
||||||
noseargs=
|
noseargs=
|
||||||
wrapper=""
|
wrapper=""
|
||||||
just_pep8=0
|
just_pep8=0
|
||||||
@ -67,7 +69,7 @@ function run_pep8 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NOSETESTS="nosetests $noseargs"
|
NOSETESTS="nosetests $noseopts $noseargs"
|
||||||
|
|
||||||
if [ $never_venv -eq 0 ]
|
if [ $never_venv -eq 0 ]
|
||||||
then
|
then
|
||||||
|
Loading…
Reference in New Issue
Block a user