#!/bin/sh
echo Running the automake test suite - this may take a while...
FNCASE=y VERBOSE=x redir -eo make check > tests.log
grep -E '^(PASS|XPASS|FAIL|XFAIL|SKIP):' tests.log > tests.summ

echo
echo "########"
echo "# DONE #"
echo "########"

# Dump out the failure list, if any.
ok=true
grep '^FAIL:' tests.summ >/dev/null && ok=false
$ok || (echo; echo "Failures:"; echo; grep '^FAIL:' tests.summ; echo)
$ok
