2003-03-24 19:01:09 +00:00
|
|
|
#!/bin/sh
|
2007-12-28 02:11:01 +00:00
|
|
|
#$Id: check_nrg.sh.in,v 1.17 2007/12/28 02:11:01 rocky Exp $
|
2003-04-26 14:24:44 +00:00
|
|
|
|
2005-04-11 02:36:36 +00:00
|
|
|
if test "@VCDINFO_LIBS@X" != "X" ; then
|
2003-04-26 14:24:44 +00:00
|
|
|
vcd_opt='--no-vcd'
|
|
|
|
|
fi
|
2003-03-24 19:01:09 +00:00
|
|
|
|
2005-04-11 02:36:36 +00:00
|
|
|
if test "X$srcdir" = "X" ; then
|
2003-03-24 19:01:09 +00:00
|
|
|
srcdir=`pwd`
|
|
|
|
|
fi
|
|
|
|
|
|
2005-04-11 02:36:36 +00:00
|
|
|
if test "X$top_srcdir" = "X" ; then
|
2005-03-02 12:49:28 +00:00
|
|
|
top_srcdir=`pwd`/..
|
|
|
|
|
fi
|
|
|
|
|
|
2007-12-28 02:11:01 +00:00
|
|
|
if test "X$top_builddir" = "X" ; then
|
|
|
|
|
top_builddir=`pwd`/..
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
. ${top_builddir}/test/check_common_fn
|
2003-03-24 19:01:09 +00:00
|
|
|
|
2005-03-02 12:49:28 +00:00
|
|
|
if test ! -x $top_srcdir/src/cd-info ; then
|
2003-08-29 11:10:01 +00:00
|
|
|
exit 77
|
|
|
|
|
fi
|
|
|
|
|
|
2003-04-24 02:45:04 +00:00
|
|
|
BASE=`basename $0 .sh`
|
2004-05-31 13:32:19 +00:00
|
|
|
test_name=videocd
|
2005-02-17 04:29:24 +00:00
|
|
|
opts="--quiet --no-device-info --nrg-file ${srcdir}/${test_name}.nrg $vcd_opt --iso9660"
|
|
|
|
|
test_cdinfo "$opts" ${test_name}.dump ${srcdir}/${test_name}.right
|
2003-04-24 02:45:04 +00:00
|
|
|
RC=$?
|
2005-02-17 04:29:24 +00:00
|
|
|
check_result $RC 'cd-info NRG test 1' "${CD_INFO} $opts"
|
2003-04-24 02:45:04 +00:00
|
|
|
|
2003-03-24 19:01:09 +00:00
|
|
|
BASE=`basename $0 .sh`
|
2003-04-19 19:12:06 +00:00
|
|
|
nrg_file=${srcdir}/monvoisin.nrg
|
2003-03-24 19:01:09 +00:00
|
|
|
|
2003-04-19 19:12:06 +00:00
|
|
|
if test -f $nrg_file ; then
|
2004-09-04 00:06:50 +00:00
|
|
|
test_cdinfo "-q --no-device-info --nrg-file $nrg_file $vcd_opt --iso9660 " \
|
2003-04-19 19:12:06 +00:00
|
|
|
monvoisin.dump ${srcdir}/monvoisin.right
|
|
|
|
|
RC=$?
|
2003-08-31 06:59:23 +00:00
|
|
|
check_result $RC 'cd-info NRG test 2'
|
2003-04-22 01:32:39 +00:00
|
|
|
else
|
|
|
|
|
echo "Don't see NRG file ${nrg_file}. Test skipped."
|
2003-05-16 21:11:18 +00:00
|
|
|
exit 0
|
2003-04-22 01:32:39 +00:00
|
|
|
fi
|
|
|
|
|
|
2004-05-31 13:32:19 +00:00
|
|
|
test_name='svcdgs'
|
|
|
|
|
nrg_file=${srcdir}/${test_name}.nrg
|
2005-02-17 06:28:41 +00:00
|
|
|
opts="-q --no-device-info --nrg-file $nrg_file $vcd_opt --iso9660"
|
2003-04-22 01:32:39 +00:00
|
|
|
if test -f $nrg_file ; then
|
2005-02-17 04:29:24 +00:00
|
|
|
test_cdinfo "$opts" ${test_name}.dump ${srcdir}/${test_name}.right
|
2003-04-22 01:32:39 +00:00
|
|
|
RC=$?
|
2005-02-17 04:29:24 +00:00
|
|
|
check_result $RC "cd-info NRG $test_name" "${CD_INFO} $opts"
|
2004-05-31 13:32:19 +00:00
|
|
|
else
|
|
|
|
|
echo "Don't see NRG file ${nrg_file}. Test skipped."
|
|
|
|
|
exit $SKIP_TEST_EXITCODE
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
test_name='cdda-mcn'
|
|
|
|
|
nrg_file=${srcdir}/${test_name}.nrg
|
2005-02-17 06:28:41 +00:00
|
|
|
opts="-q --no-device-info --nrg-file $nrg_file --no-cddb"
|
2004-05-31 13:32:19 +00:00
|
|
|
if test -f $nrg_file ; then
|
2005-02-17 06:28:41 +00:00
|
|
|
test_cdinfo "$opts" ${test_name}.dump ${srcdir}/${test_name}.right
|
2004-05-31 13:32:19 +00:00
|
|
|
RC=$?
|
2005-02-17 04:29:24 +00:00
|
|
|
check_result $RC "cd-info NRG $test_name" "${CD_INFO} $opts"
|
2003-04-19 19:12:06 +00:00
|
|
|
exit $RC
|
|
|
|
|
else
|
|
|
|
|
echo "Don't see NRG file ${nrg_file}. Test skipped."
|
|
|
|
|
exit $SKIP_TEST_EXITCODE
|
|
|
|
|
fi
|
2003-03-24 19:01:09 +00:00
|
|
|
|
|
|
|
|
#;;; Local Variables: ***
|
|
|
|
|
#;;; mode:shell-script ***
|
|
|
|
|
#;;; eval: (sh-set-shell "bash") ***
|
|
|
|
|
#;;; End: ***
|