summaryrefslogtreecommitdiff
path: root/test/check_fuzzyiso.sh
blob: e2ae3e4a08a8bbdbdc4361f8ad94c1dd4b2673eb (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
#$Id: check_fuzzyiso.sh,v 1.6 2008/03/20 03:45:43 edsdead Exp $

if test "X$srcdir" = "X" ; then
  srcdir=`pwd`
fi

if test "X$top_srcdir" = "X" ; then
  top_srcdir=`pwd`/..
fi

if test "X$top_builddir" = "X" ; then
  top_builddir=`pwd`/..
fi

check_program="$top_builddir/example/isofuzzy"

if test ! -x $check_program ; then
  exit 77
fi

cd $srcdir; src_dir=`pwd`
for file in $src_dir/*.bin $src_dir/*.iso $src_dir/*.nrg ; do 
  case "$file" in
  $src_dir/p1.nrg | $src_dir/p1.bin | $src_dir/cdda.bin | $src_dir/cdda-mcn.nrg | $src_dir/svcdgs.nrg )
    good_rc=1
    ;;
  *) 
    good_rc=0
    ;;
  esac
  $check_program $file
  if test $? -ne $good_rc ; then 
    echo "$0: failed running:"
    echo "	$check_program $file"
    exit 1
  fi
done
exit 0

#;;; Local Variables: ***
#;;; mode:shell-script ***
#;;; eval: (sh-set-shell "bash") ***
#;;; End: ***