#!/bin/bash ALL_OUTPUT=0 test () { python tests/unit_tests/$1 if [ "$?" -eq "1" ]; then tput setaf 1 echo "$1 NOT OK:" tput sgr0 exit 1 else tput setaf 2 echo "$1 OK" tput sgr0 fi } if [ "$#" -eq 1 ]; then ALL_OUTPUT=1 test $1 else for file in tests/unit_tests/*; do test "$(basename $file)" done fi