diff --git a/configure.ac b/configure.ac index de05282b..776666ea 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_REVISION([$Id: configure.ac,v 1.7 2003/04/14 04:29:24 rocky Exp $])dnl +AC_REVISION([$Id: configure.ac,v 1.8 2003/04/14 10:03:27 rocky Exp $])dnl AC_INIT(lib/cdio.c) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(libcdio, 0.2) @@ -204,5 +204,8 @@ AC_OUTPUT([ \ Makefile \ lib/Makefile \ src/Makefile \ + tests/check_opts.sh \ tests/Makefile \ ]) + +chmod +x tests/check_opts.sh diff --git a/tests/Makefile.am b/tests/Makefile.am index 5ee22775..5feea948 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,4 +1,4 @@ -# $Id: Makefile.am,v 1.5 2003/04/14 08:54:50 rocky Exp $ +# $Id: Makefile.am,v 1.6 2003/04/14 10:03:27 rocky Exp $ # # Copyright (C) 2003 Rocky Bernstein # @@ -30,7 +30,7 @@ check_DATA = monvoisin.right svcd_ogt_test_ntsc.right vcd_demo.right \ check_opts6.right check_opts7.right EXTRA_DIST = $(check_SCRIPTS) $(check_DATA) \ - check_common_fn + check_common_fn check_opts.sh.in TESTS = $(check_SCRIPTS) diff --git a/tests/check_opts.sh b/tests/check_opts.sh.in similarity index 51% rename from tests/check_opts.sh rename to tests/check_opts.sh.in index 497e8585..e6b0140f 100755 --- a/tests/check_opts.sh +++ b/tests/check_opts.sh.in @@ -1,8 +1,11 @@ #!/bin/sh -#$Id: check_opts.sh,v 1.1 2003/04/14 08:51:14 rocky Exp $ +#$Id: check_opts.sh.in,v 1.1 2003/04/14 10:03:27 rocky Exp $ # Check cdinfo options +if test -n "@CDDB_LIB@" ; then + cddb_opt='--no-cddb' +fi -if test -z $srcdir ; then +if test -z "$srcdir" ; then srcdir=`pwd` fi @@ -11,15 +14,15 @@ fi BASE=`basename $0 .sh` fname=fsf -opts=('-T' '--no-tracks' '-A', '--no-analyze' '-I' '-no-ioctl' - '-q' '--quiet') - -for (( i=0 ; i<${#opts[@]} ; i++ )) ; do +i=0 +for opt in '-T' '--no-tracks' '-A' '--no-analyze' '-I' '-no-ioctl' \ + '-q' '--quiet' ; do testname=${BASE}$i - test_cdinfo "--cue-file ${srcdir}/${fname}.cue --no-cddb ${opts[$i]}" \ + test_cdinfo "--cue-file ${srcdir}/${fname}.cue $cddb_opt $opt" \ ${testname}.dump ${srcdir}/${testname}.right RC=$? check_result $RC "cdinfo option test $i" + i=`expr $i + 1` done exit $RC