-./configure
-# ToDo: configure args
-
-make -j2
-
-make -C testsuite/tests/ghc-regress fast stage=2 2>&1 | tee testlog
-
-if grep '0 unexpected failures' testlog >/dev/null 2>/dev/null; then
- echo "-------------------------------------------------------------------"
- echo "Congratulations! This tree is has passed minimal testing."
- echo
- echo "NOTE: If you have made changes that may cause failures not tested"
- echo "for by the minimal testing procedure, please do further testing"
- echo "as necessary."
- echo
- echo "When you are satisfied that you haven't broken anything, go ahead"
- echo "and push/send your patches".
- echo "-------------------------------------------------------------------"
+./configure "--prefix=`pwd`/inst" $config_args
+
+make Validating=YES -j$threads
+fi # testsuite-only
+
+make Validating=YES -C testsuite/tests/ghc-regress fast stage=2 CLEANUP=1 THREADS=$threads 2>&1 | tee testlog
+
+echo "-------------------------------------------------------------------"
+if
+ grep '\<0 caused framework failures' testlog >/dev/null 2>/dev/null &&
+ grep '\<0 unexpected passes' testlog >/dev/null 2>/dev/null &&
+ grep '\<0 unexpected failures' testlog >/dev/null 2>/dev/null ; then
+ if [ $testsuite_only -eq 0 ] && [ $no_clean -eq 0 ]
+ then
+ cat <<EOF
+Congratulations! This tree has passed minimal testing.
+
+NOTE: If you have made changes that may cause failures not tested for by
+the minimal testing procedure, please do further testing as necessary.
+
+When you are satisfied that you haven't broken anything, go ahead and
+push/send your patches.
+EOF
+ else
+ cat <<EOF
+I didn't find any problems, but this wasn't a complete validate run,
+so be careful!
+
+NOTE: If you have made changes that may cause failures not tested for by
+the minimal testing procedure, please do further testing as necessary.
+EOF
+ fi