From a50f618548ad4671152f80544496dc7aca2fdcb1 Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Thu, 28 Aug 2008 01:15:27 +0000 Subject: [PATCH] 208: Made output of run-tests.bash a bit easier to read and also added python2.6 to versions tested --- run-tests.bash | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/run-tests.bash b/run-tests.bash index 55fc6376b..ac4dbf741 100755 --- a/run-tests.bash +++ b/run-tests.bash @@ -1,17 +1,29 @@ #!/bin/bash -# Hackish script to run unit tests under both Python 2.4 and 2.5 +# Script to run nosetests under multiple versions of Python -interpreters="python2.4 python2.5" +versions="python2.4 python2.5 python2.6" -for name in $interpreters +for name in $versions do + echo "" executable="/usr/bin/$name" - if [[ -f $executable ]] - then - echo "[ $0: running unit tests under $name ]" - $executable /usr/bin/nosetests + if [[ -f $executable ]]; then + echo "[ $name: Starting tests... ]" + if $executable /usr/bin/nosetests + then + echo "[ $name: Tests OK ]" + else + echo "[ $name: Tests FAILED ]" + ((failures += 1)) + fi else - echo "[ $0: $name not found ]" + echo "[ $name: Not found ]" fi done + +if [ $failures ]; then + echo "" + echo "[ FAILED under $failures version(s) ]" + exit $failures +fi