3d736630e3883d90e4a362479685f1e6ea1112b0
[platform/upstream/libsolv.git] / test / runtestcases
1 #!/bin/bash
2
3 cmd=$1
4 dir=$2
5
6 if test -z "$cmd" -o -z "$dir"; then
7   echo "Usage: runtestcases <cmd> <dir>";
8   exit 1
9 fi
10
11 ex=0
12 for tc in $(find $dir -name \*.t) ; do
13   $cmd $tc >/dev/null
14   tex=$?
15   tcn="${tc#$dir/} .................................................."
16   tcn="${tcn:0:50}"
17   if test "$tex" -eq 0 ; then
18     echo "$tcn   Passed"
19   elif test "$tex" -eq 77 ; then
20     echo "$tcn   Skipped"
21   else
22     echo "$tcn***Failed"
23     ex=1
24   fi
25 done
26 exit $ex