summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-11-27 19:22:23 +0000
committerGerrit Code Review <review@openstack.org>2012-11-27 19:22:23 +0000
commitede0fdd48bf5d3b3fd942a36d4d549aea2a44899 (patch)
tree0e5259c60a2b82a56144475f9d4c0487d2abd964
parent1658fa675132f1ffac9ffdb9ec002cc1fce37bd7 (diff)
parent6f562bbe09b06fe541c22ffb2bd4ad7111e7d664 (diff)
downloadnova-ede0fdd48bf5d3b3fd942a36d4d549aea2a44899.tar.gz
nova-ede0fdd48bf5d3b3fd942a36d4d549aea2a44899.tar.xz
nova-ede0fdd48bf5d3b3fd942a36d4d549aea2a44899.zip
Merge "Display errors when running nosetests"
-rwxr-xr-xrun_tests.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/run_tests.sh b/run_tests.sh
index 5028adb0a..b25178766 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -17,6 +17,7 @@ function usage {
echo " -P, --no-pep8 Don't run static code checks"
echo " -c, --coverage Generate coverage report"
echo " -h, --help Print this usage message"
+ echo " -v, --verbose Display nosetests in the console"
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,"
@@ -39,6 +40,7 @@ function process_option {
-p|--pep8) just_pep8=1;;
-P|--no-pep8) no_pep8=1;;
-c|--coverage) coverage=1;;
+ -v|--verbose) verbose=1;;
-*) noseopts="$noseopts $1";;
*) noseargs="$noseargs $1"
esac
@@ -59,6 +61,7 @@ no_pep8=0
coverage=0
recreate_db=1
patch_migrate=1
+verbose=0
export NOSE_WITH_OPENSTACK=1
export NOSE_OPENSTACK_COLOR=1
@@ -88,7 +91,13 @@ function run_tests {
# Cleanup *pyc
${wrapper} find . -type f -name "*.pyc" -delete
# Just run the test suites in current environment
- ${wrapper} $NOSETESTS | tee nosetests.log
+ if [ "$verbose" -eq 1 ];
+ then
+ ${wrapper} $NOSETESTS 2>&1 | tee nosetests.log
+ else
+ ${wrapper} $NOSETESTS | tee nosetests.log
+ fi
+
# If we get some short import error right away, print the error log directly
RESULT=$?
if [ "$RESULT" -ne "0" ];