enables run_test option to skip integration
* fixes bug 948495 Change-Id: I274bfe9611d677c44117a0d9ff67394790794fc4
This commit is contained in:
parent
e05bc6a6ed
commit
259d9380e8
@ -30,6 +30,7 @@ function usage {
|
|||||||
echo " -P, --no-pep8 Don't run pep8"
|
echo " -P, --no-pep8 Don't run pep8"
|
||||||
echo " -c, --coverage Generate coverage report"
|
echo " -c, --coverage Generate coverage report"
|
||||||
echo " -h, --help Print this usage message"
|
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 " --hide-elapsed Don't print the elapsed time for each test along with slow test list"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Note: with no options specified, the script will try to run the tests in a virtual environment,"
|
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|--pep8) just_pep8=1;;
|
||||||
-P|--no-pep8) no_pep8=1;;
|
-P|--no-pep8) no_pep8=1;;
|
||||||
-c|--coverage) coverage=1;;
|
-c|--coverage) coverage=1;;
|
||||||
|
-xintegration) nokeystoneclient=1;;
|
||||||
-*) noseopts="$noseopts $1";;
|
-*) noseopts="$noseopts $1";;
|
||||||
*) noseargs="$noseargs $1"
|
*) noseargs="$noseargs $1"
|
||||||
esac
|
esac
|
||||||
@ -65,6 +67,7 @@ wrapper=""
|
|||||||
just_pep8=0
|
just_pep8=0
|
||||||
no_pep8=0
|
no_pep8=0
|
||||||
coverage=0
|
coverage=0
|
||||||
|
nokeystoneclient=0
|
||||||
recreate_db=1
|
recreate_db=1
|
||||||
|
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
@ -76,6 +79,11 @@ if [ $coverage -eq 1 ]; then
|
|||||||
noseopts="$noseopts --with-coverage --cover-package=keystone"
|
noseopts="$noseopts --with-coverage --cover-package=keystone"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $nokeystoneclient -eq 1 ]; then
|
||||||
|
# disable the integration tests
|
||||||
|
noseopts="$noseopts -I test_keystoneclient*"
|
||||||
|
fi
|
||||||
|
|
||||||
function run_tests {
|
function run_tests {
|
||||||
# Just run the test suites in current environment
|
# Just run the test suites in current environment
|
||||||
${wrapper} $NOSETESTS 2> run_tests.log
|
${wrapper} $NOSETESTS 2> run_tests.log
|
||||||
|
Loading…
Reference in New Issue
Block a user