summaryrefslogtreecommitdiff
path: root/test/runtestcases
blob: 2edf743117a54937556cc6659c4866c68a0ec386 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

cmd=$1
dir=$2

if test -z "$dir"; then
  echo "Usage: runtestcases <cmd> <dir>";
  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