summaryrefslogtreecommitdiffstats
path: root/run-tests.bash
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-08-28 01:15:27 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-08-28 01:15:27 +0000
commita50f618548ad4671152f80544496dc7aca2fdcb1 (patch)
treeeffe0fb5effce65c7fa04df423f658009007ec7d /run-tests.bash
parent5da1d4bb86fadc12e2becf05239b0177d42ce454 (diff)
downloadfreeipa-a50f618548ad4671152f80544496dc7aca2fdcb1.tar.gz
freeipa-a50f618548ad4671152f80544496dc7aca2fdcb1.tar.xz
freeipa-a50f618548ad4671152f80544496dc7aca2fdcb1.zip
208: Made output of run-tests.bash a bit easier to read and also added python2.6 to versions tested
Diffstat (limited to 'run-tests.bash')
-rwxr-xr-xrun-tests.bash28
1 files 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