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-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
|
2008-08-27 20:15:27 -05:00
|
|
|
echo ""
|
2008-08-14 16:05:14 -05:00
|
|
|
executable="/usr/bin/$name"
|
2008-08-27 20:15:27 -05:00
|
|
|
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
|
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
|
|
|
|
done
|
2008-08-27 20:15:27 -05:00
|
|
|
|
|
|
|
if [ $failures ]; then
|
|
|
|
echo ""
|
|
|
|
echo "[ FAILED under $failures version(s) ]"
|
|
|
|
exit $failures
|
|
|
|
fi
|