2008-08-14 16:05:14 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2008-08-27 20:15:27 -05:00
|
|
|
# Script to run nosetests under multiple versions of Python
|
2008-08-14 16:05:14 -05:00
|
|
|
|
2008-08-27 20:15:27 -05:00
|
|
|
versions="python2.4 python2.5 python2.6"
|
2008-10-24 16:07:07 -05:00
|
|
|
versions="python2.5 python2.6"
|
2008-08-14 16:05:14 -05:00
|
|
|
|
2008-08-27 20:15:27 -05:00
|
|
|
for name in $versions
|
2008-08-14 16:05:14 -05:00
|
|
|
do
|
|
|
|
executable="/usr/bin/$name"
|
2008-08-27 20:15:27 -05:00
|
|
|
if [[ -f $executable ]]; then
|
|
|
|
echo "[ $name: Starting tests... ]"
|
2008-08-27 21:35:11 -05:00
|
|
|
((runs += 1))
|
2008-10-17 21:50:34 -05:00
|
|
|
if $executable /usr/bin/nosetests -v --with-doctest
|
2008-08-27 20:15:27 -05:00
|
|
|
then
|
|
|
|
echo "[ $name: Tests OK ]"
|
|
|
|
else
|
|
|
|
echo "[ $name: Tests FAILED ]"
|
|
|
|
((failures += 1))
|
|
|
|
fi
|
2008-08-14 16:05:14 -05:00
|
|
|
else
|
2008-08-27 20:15:27 -05:00
|
|
|
echo "[ $name: Not found ]"
|
2008-08-14 16:05:14 -05:00
|
|
|
fi
|
2008-08-27 21:35:11 -05:00
|
|
|
echo ""
|
2008-08-14 16:05:14 -05:00
|
|
|
done
|
2008-08-27 20:15:27 -05:00
|
|
|
|
|
|
|
if [ $failures ]; then
|
2008-08-27 21:35:11 -05:00
|
|
|
echo "[ Ran under $runs version(s); FAILED under $failures version(s) ]"
|
2008-08-27 20:15:27 -05:00
|
|
|
exit $failures
|
2008-08-27 21:35:11 -05:00
|
|
|
else
|
|
|
|
echo "[ Ran under $runs version(s); all OK ]"
|
2008-08-27 20:15:27 -05:00
|
|
|
fi
|