python: Improve harness for running Python tests.

It now understands exit code 77 == skip, amongst other improvements.
This commit is contained in:
Richard W.M. Jones
2014-12-10 21:33:24 +00:00
parent 96158d42f5
commit db1c8a6436

View File

@@ -16,8 +16,23 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
set -e
errors=0
for f in $srcdir/t/*.py; do
$PYTHON $f
r=$?
case $r in
0) ;;
77)
echo "$f: test skipped"
;;
*)
echo "FAIL: $f"
((errors++))
;;
esac
done
if [ $errors -gt 0 ]; then
exit 1
fi