summaryrefslogtreecommitdiff
path: root/test/runtestcases
blob: 3d736630e3883d90e4a362479685f1e6ea1112b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

cmd=$1
dir=$2

if test -z "$cmd" -o -z "$dir"; then
  echo "Usage: runtestcases <cmd> <dir>";
  exit 1
fi

ex=0
for tc in $(find $dir -name \*.t) ; do
  $cmd $tc >/dev/null
  tex=$?
  tcn="${tc#$dir/} .................................................."
  tcn="${tcn:0:50}"
  if test "$tex" -eq 0 ; then
    echo "$tcn   Passed"
  elif test "$tex" -eq 77 ; then
    echo "$tcn   Skipped"
  else
    echo "$tcn***Failed"
    ex=1
  fi
done
exit $ex