#!/bin/bash cmd=$1 dir=$2 if test -z "$dir"; then echo "Usage: runtestcases "; exit 1 fi ex=0 for tc in $(find $dir -name \*.t) ; do if ! $cmd $tc > /dev/null ; then echo "failed test: ${tc#$dir/}" ex=1 fi done exit $ex