enables run_test option to skip integration

* fixes bug 948495

Change-Id: I274bfe9611d677c44117a0d9ff67394790794fc4
This commit is contained in:
Joe Heck 2012-03-09 22:41:47 -08:00
parent e05bc6a6ed
commit 259d9380e8
1 changed files with 8 additions and 0 deletions

View File

@ -30,6 +30,7 @@ function usage {
echo " -P, --no-pep8 Don't run pep8"
echo " -c, --coverage Generate coverage report"
echo " -h, --help Print this usage message"
echo " -xintegration Ignore all keystoneclient test cases (integration tests)"
echo " --hide-elapsed Don't print the elapsed time for each test along with slow test list"
echo ""
echo "Note: with no options specified, the script will try to run the tests in a virtual environment,"
@ -49,6 +50,7 @@ function process_option {
-p|--pep8) just_pep8=1;;
-P|--no-pep8) no_pep8=1;;
-c|--coverage) coverage=1;;
-xintegration) nokeystoneclient=1;;
-*) noseopts="$noseopts $1";;
*) noseargs="$noseargs $1"
esac
@ -65,6 +67,7 @@ wrapper=""
just_pep8=0
no_pep8=0
coverage=0
nokeystoneclient=0
recreate_db=1
for arg in "$@"; do
@ -76,6 +79,11 @@ if [ $coverage -eq 1 ]; then
noseopts="$noseopts --with-coverage --cover-package=keystone"
fi
if [ $nokeystoneclient -eq 1 ]; then
# disable the integration tests
noseopts="$noseopts -I test_keystoneclient*"
fi
function run_tests {
# Just run the test suites in current environment
${wrapper} $NOSETESTS 2> run_tests.log