#!/bin/bash export TESTFLAGS=-v testout="$( make test )" echo "Total: $( echo "$testout" | grep -v 'Suite[^/]' | grep -cE '^ *--- (PASS|FAIL)' )" echo "Pass: $( echo "$testout" | grep -v 'Suite[^/]' | grep -cE '^ *--- PASS' )" echo "Fail: $( echo "$testout" | grep -v 'Suite[^/]' | grep -cE '^ *--- FAIL' )"