Reorganize test data for future growth.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
dnl Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
|
||||
dnl Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2010
|
||||
dnl Rocky Bernstein <rocky@gnu.org>
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or modify
|
||||
@@ -28,7 +28,7 @@ dnl For multilanguage manual pages (e.g. japanese cdparanoia) we use
|
||||
dnl $make_p and according to Steve Schultz this is a make_p is a 1.8
|
||||
dnl feature.
|
||||
|
||||
AM_INIT_AUTOMAKE([1.7])
|
||||
AM_INIT_AUTOMAKE([1.11])
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
@@ -488,7 +488,7 @@ AC_DEFINE_UNQUOTED(LIBCDIO_SOURCE_PATH, "$LIBCDIO_SOURCE_PATH",
|
||||
[Full path to libcdio top_sourcedir.])
|
||||
AC_SUBST(LIBCDIO_SOURCE_PATH)
|
||||
|
||||
AC_CHECK_FUNCS( [bzero drand48 ftruncate geteuid getgid \
|
||||
AC_CHECK_FUNCS( [bzero chdir drand48 ftruncate geteuid getgid \
|
||||
getuid getpwuid gettimeofday lstat memcpy memset \
|
||||
rand seteuid setegid snprintf setenv unsetenv tzset \
|
||||
sleep vsnprintf readlink realpath gmtime_r localtime_r] )
|
||||
@@ -660,8 +660,9 @@ AC_CONFIG_FILES([
|
||||
src/cd-paranoia/doc/ja/cd-paranoia.1 \
|
||||
src/cd-paranoia/doc/ja/Makefile \
|
||||
src/Makefile \
|
||||
test/data/Makefile \
|
||||
test/driver/Makefile \
|
||||
test/testbincue.c \
|
||||
test/driver/bincue.c \
|
||||
test/testgetdevices.c \
|
||||
test/testisocd2.c \
|
||||
test/testpregap.c \
|
||||
|
||||
11
doc/.gitignore
vendored
11
doc/.gitignore
vendored
@@ -1,6 +1,17 @@
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
/libcdio.aux
|
||||
/libcdio.cp
|
||||
/libcdio.cps
|
||||
/libcdio.dvi
|
||||
/libcdio.fn
|
||||
/libcdio.info
|
||||
/libcdio.ky
|
||||
/libcdio.log
|
||||
/libcdio.pg
|
||||
/libcdio.toc
|
||||
/libcdio.tp
|
||||
/libcdio.vr
|
||||
/mdate-sh
|
||||
/stamp-vti
|
||||
/texinfo.tex
|
||||
|
||||
5
doc/doxygen/.gitignore
vendored
5
doc/doxygen/.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
/html
|
||||
/latex
|
||||
/Doxyfile
|
||||
/Doxyfile.bak
|
||||
/html
|
||||
/latex
|
||||
/libcdio.xml
|
||||
|
||||
@@ -28,38 +28,37 @@ testparanoia=testparanoia
|
||||
testparanoia_LDADD = $(LIBCDIO_PARANOIA_LIBS) $(LIBCDIO_CDDA_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
endif
|
||||
|
||||
hack = check_sizeof testassert testbincue testgetdevices testischar \
|
||||
hack = check_sizeof testassert testgetdevices testischar \
|
||||
testisocd testisocd2 testiso9660 test_lib_driver_util \
|
||||
testnrg $(testparanoia) testtoc testpregap
|
||||
|
||||
EXTRA_PROGRAMS = testdefault
|
||||
DATA_DIR = @abs_top_srcdir@/test/data
|
||||
|
||||
INCLUDES = -I$(top_srcdir) $(LIBCDIO_CFLAGS) $(LIBISO9660_CFLAGS)
|
||||
|
||||
check_sizeof_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
testassert_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
testdefault_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
testgetdevices_LDADD= $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
testischar_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
testiso9660_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
check_sizeof_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
testassert_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
testdefault_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
testgetdevices_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
||||
testgetdevices_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
testischar_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
testiso9660_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
|
||||
testisocd_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
testisocd2_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
|
||||
testtoc_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
testtoc_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
testtoc_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
||||
|
||||
test_lib_driver_util_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
tets_lib_driver_util_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
test_lib_driver_util_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
||||
|
||||
testpregap_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
testpregap_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
|
||||
testbincue_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
testbincue_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
testpregap_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
||||
|
||||
testnrg_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
testnrg_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
testnrg_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
||||
|
||||
check_SCRIPTS = check_nrg.sh check_cue.sh check_cd_read.sh \
|
||||
check_iso.sh check_fuzzyiso.sh check_paranoia.sh check_opts.sh
|
||||
@@ -70,30 +69,22 @@ check_SCRIPTS = check_nrg.sh check_cue.sh check_cd_read.sh \
|
||||
check_PROGRAMS = $(hack)
|
||||
|
||||
check_DATA = vcd_demo.right vcd_demo_vcdinfo.right \
|
||||
videocd.right videocd.nrg \
|
||||
cdda.right cdda.toc cdda.cue cdda.bin \
|
||||
videocd.right \
|
||||
cdda.right \
|
||||
isofs-m1.right isofs-m1-no-rr.right \
|
||||
isofs-m1.toc isofs-m1.cue isofs-m1.bin \
|
||||
cd-paranoia-log.right \
|
||||
check_opts0.right check_opts1.right check_opts2.right \
|
||||
check_opts3.right check_opts4.right check_opts5.right \
|
||||
check_opts6.right check_opts7.right \
|
||||
isofs-m1-read.right cdda-read.right \
|
||||
t1.toc t2.toc t3.toc t4.toc t5.toc t6.toc t7.toc t8.toc t9.toc \
|
||||
data1.toc data2.toc data5.toc data6.toc data7.toc \
|
||||
vcd2.toc cdtext.toc \
|
||||
bad-mode1.cue bad-msf-1.cue bad-msf-2.cue bad-msf-3.cue \
|
||||
bad-mode1.toc bad-msf-1.toc bad-msf-2.toc bad-msf-3.toc \
|
||||
bad-cat1.cue bad-cat2.cue bad-cat3.cue \
|
||||
bad-cat1.toc bad-cat2.toc bad-cat3.toc bad-file.toc \
|
||||
copying.iso copying.right copying-rr.iso copying-rr.right \
|
||||
joliet.iso joliet.right joliet-nojoliet.right \
|
||||
copying.right copying-rr.right \
|
||||
joliet.right joliet-nojoliet.right \
|
||||
udf102.iso copying.gpl copying-rr.gpl
|
||||
|
||||
EXTRA_DIST = $(check_SCRIPTS) $(check_DATA) \
|
||||
check_common_fn check_cue.sh.in check_nrg.sh.in \
|
||||
testbincue.c.in testpregap.c.in testnrg.c.in \
|
||||
testgetdevices.c.in check_iso.sh.in p1.bin p1.cue p1.nrg
|
||||
testgetdevices.c.in check_iso.sh.in
|
||||
|
||||
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
|
||||
XFAIL_TESTS = testassert
|
||||
@@ -113,5 +104,5 @@ test: check-am
|
||||
check-am: make-executable
|
||||
make-executable: check_nrg.sh check_cue.sh check_paranoia.sh
|
||||
chmod +x *.sh
|
||||
if test ! -f cdda.bin ; then $(LN_S) $(srcdir)/cdda.bin cdda.bin ; fi
|
||||
if test ! -f isofs-m1.bin ; then $(LN_S) $(srcdir)/isofs-m1.bin isofs-m1.bin ; fi
|
||||
if test ! -f cdda.bin ; then $(LN_S) $(abs_top_srcdir)/test/data/cdda.bin cdda.bin ; fi
|
||||
if test ! -f isofs-m1.bin ; then $(LN_S) $(abs_top_srcdir)/test/data/isofs-m1.bin isofs-m1.bin ; fi
|
||||
|
||||
BIN
test/cdda.bin
BIN
test/cdda.bin
Binary file not shown.
1
test/cdda.bin
Symbolic link
1
test/cdda.bin
Symbolic link
@@ -0,0 +1 @@
|
||||
/src/external-vcs/libcdio/test/data/cdda.bin
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# $Id: check_cd_read.sh,v 1.12 2008/03/22 18:08:25 karl Exp $
|
||||
#
|
||||
# Copyright (C) 2003, 2005, 2008 Rocky Bernstein <rocky@gnu.org>
|
||||
# Copyright (C) 2003, 2005, 2008, 2010 Rocky Bernstein <rocky@gnu.org>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -36,14 +36,14 @@ BASE=`basename $0 .sh`
|
||||
|
||||
fname=cdda
|
||||
testnum=CD-DA
|
||||
opts="-c ${srcdir}/${fname}.cue --mode=red --just-hex --start=0"
|
||||
opts="-c ${srcdir}/data/${fname}.cue --mode=red --just-hex --start=0"
|
||||
test_cd_read "$opts" ${fname}-read.dump ${srcdir}/${fname}-read.right
|
||||
RC=$?
|
||||
check_result $RC "cd-read CUE test $testnum" "cd-read $opts"
|
||||
|
||||
fname=isofs-m1
|
||||
testnum=MODE1
|
||||
opts="-i ${srcdir}/${fname}.cue --mode m1f1 -s 26 -n 2"
|
||||
opts="-i ${srcdir}/data/${fname}.cue --mode m1f1 -s 26 -n 2"
|
||||
test_cd_read "$opts" ${fname}-read.dump ${srcdir}/${fname}-read.right
|
||||
RC=$?
|
||||
check_result $RC "cd-read CUE test $testnum" "$CD_READ $opts"
|
||||
|
||||
@@ -29,18 +29,18 @@ BASE=`basename $0 .sh`
|
||||
|
||||
fname=cdda
|
||||
testnum=CD-DA
|
||||
opts="--quiet --no-device-info --cue-file ${srcdir}/${fname}.cue --no-cddb"
|
||||
opts="--quiet --no-device-info --cue-file ${srcdir}/data/${fname}.cue --no-cddb"
|
||||
test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right
|
||||
RC=$?
|
||||
check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts"
|
||||
|
||||
|
||||
opts="--quiet --no-device-info --bin-file ${srcdir}/${fname}.bin --no-cddb"
|
||||
opts="--quiet --no-device-info --bin-file ${srcdir}/data/${fname}.bin --no-cddb"
|
||||
test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right
|
||||
RC=$?
|
||||
check_result $RC "cd-info BIN test $testnum" "${CD_INFO} $opts"
|
||||
|
||||
opts="--quiet --no-device-info --toc-file ${srcdir}/${fname}.toc --no-cddb"
|
||||
opts="--quiet --no-device-info --toc-file ${srcdir}/data/${fname}.toc --no-cddb"
|
||||
test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right
|
||||
RC=$?
|
||||
check_result $RC "cd-info TOC test $testnum" "${CD_INFO} $opts"
|
||||
@@ -49,30 +49,30 @@ fname=isofs-m1
|
||||
testnum='ISO 9660 mode1 CUE'
|
||||
if test -f ${srcdir}/${fname}.bin ; then
|
||||
if test -n "@HAVE_ROCK@"; then
|
||||
opts="-q --no-device-info --no-disc-mode --cue-file ${srcdir}/${fname}.cue --iso9660"
|
||||
opts="-q --no-device-info --no-disc-mode --cue-file ${srcdir}/data/${fname}.cue --iso9660"
|
||||
test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right
|
||||
RC=$?
|
||||
check_result $RC "cd-info Rock-Ridge CUE test $testnum" "${CD_INFO} $opts"
|
||||
|
||||
opts="-q --no-device-info --no-disc-mode --no-rock-ridge --cue-file ${srcdir}/${fname}.cue --iso9660"
|
||||
opts="-q --no-device-info --no-disc-mode --no-rock-ridge --cue-file ${srcdir}/data/${fname}.cue --iso9660"
|
||||
test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}-no-rr.right
|
||||
RC=$?
|
||||
check_result $RC "cd-info no Rock-Ridge CUE test $testnum" "${CD_INFO} $opts"
|
||||
fi
|
||||
|
||||
else
|
||||
echo "Don't see CUE file ${srcdir}/${fname}.bin. Test $testnum skipped."
|
||||
echo "Don't see CUE file ${srcdir}/data/${fname}.bin. Test $testnum skipped."
|
||||
fi
|
||||
|
||||
if test -n "@HAVE_ROCK@"; then
|
||||
testnum='ISO 9660 mode1 TOC'
|
||||
if test -f ${srcdir}/${fname}.bin ; then
|
||||
opts="-q --no-device-info --no-disc-mode --toc-file ${srcdir}/${fname}.toc --iso9660"
|
||||
if test -f ${srcdir}/data/${fname}.bin ; then
|
||||
opts="-q --no-device-info --no-disc-mode --toc-file ${srcdir}/data/${fname}.toc --iso9660"
|
||||
test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right
|
||||
RC=$?
|
||||
check_result $RC "cd-info TOC test $testnum" "${CD_INFO} $opts"
|
||||
else
|
||||
echo "Don't see TOC file ${srcdir}/${fname}.bin. Test $testnum skipped."
|
||||
echo "Don't see TOC file ${srcdir}/data/${fname}.bin. Test $testnum skipped."
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -84,7 +84,7 @@ else
|
||||
fi
|
||||
testnum='Video CD'
|
||||
if test -f ${srcdir}/${fname}.bin ; then
|
||||
opts="-q --no-device-info --no-disc-mode -c ${srcdir}/${fname}.cue --iso9660"
|
||||
opts="-q --no-device-info --no-disc-mode -c ${srcdir}/data/${fname}.cue --iso9660"
|
||||
test_cdinfo "$opts" ${fname}.dump $right
|
||||
RC=$?
|
||||
check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts"
|
||||
@@ -94,7 +94,7 @@ if test -f ${srcdir}/${fname}.bin ; then
|
||||
else
|
||||
right=${srcdir}/${fname}_vcdinfo.right
|
||||
fi
|
||||
opts="-q --no-device-info --no-disc-mode -t ${srcdir}/${fname}.toc --iso9660"
|
||||
opts="-q --no-device-info --no-disc-mode -t ${srcdir}/data/${fname}.toc --iso9660"
|
||||
if test -f ${srcdir}/${fname}.toc ; then
|
||||
test_cdinfo "$opts" ${fname}.dump $right
|
||||
RC=$?
|
||||
@@ -109,12 +109,12 @@ fi
|
||||
fname=svcd_ogt_test_ntsc
|
||||
testnum='Super Video CD'
|
||||
if test -f ${srcdir}/${fname}.bin ; then
|
||||
opts="-q --no-device-info --no-disc-mode --cue-file ${srcdir}/${fname}.cue $vcd_opt --iso9660"
|
||||
opts="-q --no-device-info --no-disc-mode --cue-file ${srcdir}/data/${fname}.cue $vcd_opt --iso9660"
|
||||
test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right
|
||||
RC=$?
|
||||
check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts"
|
||||
else
|
||||
echo "Don't see CUE file ${srcdir}/${fname}.bin. Test $testnum skipped."
|
||||
echo "Don't see CUE file ${srcdir}/data/${fname}.bin. Test $testnum skipped."
|
||||
fi
|
||||
|
||||
exit $RC
|
||||
|
||||
@@ -20,9 +20,9 @@ if test ! -x $check_program ; then
|
||||
fi
|
||||
|
||||
cd $srcdir; src_dir=`pwd`
|
||||
for file in $src_dir/*.bin $src_dir/*.iso $src_dir/*.nrg ; do
|
||||
for file in $src_dir/data/*.bin $src_dir/data/*.iso $src_dir/data/*.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 )
|
||||
$src_dir/data/p1.nrg | $src_dir/data/p1.bin | $src_dir/data/cdda.bin | $src_dir/data/cdda-mcn.nrg | $src_dir/data/svcdgs.nrg )
|
||||
good_rc=1
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -18,24 +18,24 @@ fi
|
||||
BASE=`basename $0 .sh`
|
||||
fname=copying
|
||||
|
||||
opts="--quiet ${srcdir}/${fname}.iso --iso9660 "
|
||||
opts="--quiet ${srcdir}/data/${fname}.iso --iso9660 "
|
||||
test_iso_info "$opts" ${fname}.dump ${srcdir}/${fname}.right
|
||||
RC=$?
|
||||
check_result $RC 'iso-info basic test' "$ISO_INFO $opts"
|
||||
|
||||
opts="--ignore --image ${srcdir}/${fname}.iso --extract $fname "
|
||||
opts="--ignore --image ${srcdir}/data/${fname}.iso --extract $fname "
|
||||
test_iso_read "$opts" ${fname} ${srcdir}/copying.gpl
|
||||
RC=$?
|
||||
check_result $RC 'iso-read basic test' "$ISO_READ $opts"
|
||||
|
||||
if test -n "@HAVE_ROCK@"; then
|
||||
fname=copying-rr
|
||||
opts="--quiet ${srcdir}/${fname}.iso --iso9660 "
|
||||
opts="--quiet ${srcdir}/data/${fname}.iso --iso9660 "
|
||||
test_iso_info "$opts" ${fname}.dump ${srcdir}/${fname}.right
|
||||
RC=$?
|
||||
check_result $RC 'iso-info Rock Ridge test' "$ISO_INFO $opts"
|
||||
|
||||
opts="--image ${srcdir}/${fname}.iso --extract COPYING"
|
||||
opts="--image ${srcdir}/data/${fname}.iso --extract COPYING"
|
||||
test_iso_read "$opts" ${fname} ${srcdir}/copying-rr.gpl
|
||||
RC=$?
|
||||
check_result $RC 'iso-read RR test' "$ISO_READ $opts"
|
||||
@@ -44,11 +44,11 @@ fi
|
||||
if test -n "@HAVE_JOLIET@" ; then
|
||||
BASE=`basename $0 .sh`
|
||||
fname=joliet
|
||||
opts="--quiet ${srcdir}/${fname}.iso --iso9660 "
|
||||
opts="--quiet ${srcdir}/data/${fname}.iso --iso9660 "
|
||||
test_iso_info "$opts" ${fname}-nojoliet.dump ${srcdir}/${fname}.right
|
||||
RC=$?
|
||||
check_result $RC 'iso-info Joliet test' "$cmdline"
|
||||
opts="--quiet ${srcdir}/${fname}.iso --iso9660 --no-joliet "
|
||||
opts="--quiet ${srcdir}/data/${fname}.iso --iso9660 --no-joliet "
|
||||
test_iso_info "$opts" ${fname}-nojoliet.dump \
|
||||
${srcdir}/${fname}-nojoliet.right
|
||||
RC=$?
|
||||
|
||||
@@ -25,13 +25,13 @@ fi
|
||||
|
||||
BASE=`basename $0 .sh`
|
||||
test_name=videocd
|
||||
opts="--quiet --no-device-info --nrg-file ${srcdir}/${test_name}.nrg $vcd_opt --iso9660"
|
||||
opts="--quiet --no-device-info --nrg-file ${srcdir}/data/${test_name}.nrg $vcd_opt --iso9660"
|
||||
test_cdinfo "$opts" ${test_name}.dump ${srcdir}/${test_name}.right
|
||||
RC=$?
|
||||
check_result $RC 'cd-info NRG test 1' "${CD_INFO} $opts"
|
||||
|
||||
BASE=`basename $0 .sh`
|
||||
nrg_file=${srcdir}/monvoisin.nrg
|
||||
nrg_file=${srcdir}/data/monvoisin.nrg
|
||||
|
||||
if test -f $nrg_file ; then
|
||||
test_cdinfo "-q --no-device-info --nrg-file $nrg_file $vcd_opt --iso9660 " \
|
||||
@@ -44,7 +44,7 @@ else
|
||||
fi
|
||||
|
||||
test_name='svcdgs'
|
||||
nrg_file=${srcdir}/${test_name}.nrg
|
||||
nrg_file=${srcdir}/data/${test_name}.nrg
|
||||
opts="-q --no-device-info --nrg-file $nrg_file $vcd_opt --iso9660"
|
||||
if test -f $nrg_file ; then
|
||||
test_cdinfo "$opts" ${test_name}.dump ${srcdir}/${test_name}.right
|
||||
@@ -56,7 +56,7 @@ else
|
||||
fi
|
||||
|
||||
test_name='cdda-mcn'
|
||||
nrg_file=${srcdir}/${test_name}.nrg
|
||||
nrg_file=${srcdir}/data/${test_name}.nrg
|
||||
opts="-q --no-device-info --nrg-file $nrg_file --no-cddb"
|
||||
if test -f $nrg_file ; then
|
||||
test_cdinfo "$opts" ${test_name}.dump ${srcdir}/${test_name}.right
|
||||
|
||||
@@ -22,7 +22,7 @@ i=0
|
||||
for opt in '-T' '--no-tracks' '-A' '--no-analyze' '-I' '--no-ioctl' \
|
||||
'-q' '--quiet' ; do
|
||||
testname=${BASE}$i
|
||||
opts="--no-device-info --cue-file ${srcdir}/${fname}.cue $opt --quiet"
|
||||
opts="--no-device-info --cue-file ${srcdir}/data/${fname}.cue $opt --quiet"
|
||||
test_cdinfo "$opts" ${testname}.dump ${srcdir}/${testname}.right
|
||||
RC=$?
|
||||
check_result $RC "cd-info option test $opt" "../src/cd-info $opts"
|
||||
|
||||
@@ -16,7 +16,7 @@ fi
|
||||
|
||||
if test "@CMP@" != no -a "@BUILD_CD_PARANOIA_TRUE@"X = X ; then
|
||||
cd_paranoia=$top_builddir/src/cd-paranoia/cd-paranoia@EXEEXT@
|
||||
$cd_paranoia -d $srcdir/cdda.cue -v -r -- "1-"
|
||||
$cd_paranoia -d $srcdir/data/cdda.cue -v -r -- "1-"
|
||||
if test $? -ne 0 ; then
|
||||
exit 6
|
||||
fi
|
||||
@@ -29,9 +29,9 @@ if test "@CMP@" != no -a "@BUILD_CD_PARANOIA_TRUE@"X = X ; then
|
||||
exit 3
|
||||
fi
|
||||
mv cdda.raw cdda-good.raw
|
||||
$cd_paranoia -d $srcdir/cdda.cue -x 64 -v -r -- "1-"
|
||||
$cd_paranoia -d $srcdir/data/cdda.cue -x 64 -v -r -- "1-"
|
||||
mv cdda.raw cdda-underrun.raw
|
||||
$cd_paranoia -d $srcdir/cdda.cue -r -- "1-"
|
||||
$cd_paranoia -d $srcdir/data/cdda.cue -r -- "1-"
|
||||
if test $? -ne 0 ; then
|
||||
exit 6
|
||||
fi
|
||||
@@ -42,7 +42,7 @@ if test "@CMP@" != no -a "@BUILD_CD_PARANOIA_TRUE@"X = X ; then
|
||||
exit 3
|
||||
fi
|
||||
# Start out with small jitter
|
||||
$cd_paranoia -l ./cd-paranoia.log -d $srcdir/cdda.cue -x 5 -v -r -- "1-"
|
||||
$cd_paranoia -l ./cd-paranoia.log -d $srcdir/data/cdda.cue -x 5 -v -r -- "1-"
|
||||
if test $? -ne 0 ; then
|
||||
exit 6
|
||||
fi
|
||||
@@ -62,7 +62,7 @@ if test "@CMP@" != no -a "@BUILD_CD_PARANOIA_TRUE@"X = X ; then
|
||||
exit 4
|
||||
fi
|
||||
# A more massive set of failures: underrun + small jitter
|
||||
$cd_paranoia -d $srcdir/cdda.cue -x 69 -v -r -- "1-"
|
||||
$cd_paranoia -d $srcdir/data/cdda.cue -x 69 -v -r -- "1-"
|
||||
if test $? -ne 0 ; then
|
||||
exit 6
|
||||
fi
|
||||
|
||||
3
test/data/.gitignore
vendored
Normal file
3
test/data/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/*~
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
47
test/data/Makefile.am
Normal file
47
test/data/Makefile.am
Normal file
@@ -0,0 +1,47 @@
|
||||
check_DATA = \
|
||||
bad-cat1.cue \
|
||||
bad-cat1.toc \
|
||||
bad-cat2.cue \
|
||||
bad-cat2.toc \
|
||||
bad-cat3.cue \
|
||||
bad-cat3.toc \
|
||||
bad-file.toc \
|
||||
bad-mode1.cue \
|
||||
bad-mode1.toc \
|
||||
bad-msf-1.cue \
|
||||
bad-msf-1.toc \
|
||||
bad-msf-2.cue \
|
||||
bad-msf-2.toc \
|
||||
bad-msf-3.cue \
|
||||
bad-msf-3.toc \
|
||||
cdda.bin \
|
||||
cdda.cue \
|
||||
cdda.toc \
|
||||
copying-rr.iso \
|
||||
copying.iso \
|
||||
data1.toc \
|
||||
data2.toc \
|
||||
isofs-m1.bin \
|
||||
isofs-m1.cue \
|
||||
isofs-m1.toc \
|
||||
joliet.iso \
|
||||
p1.bin \
|
||||
p1.cue \
|
||||
p1.nrg \
|
||||
t1.toc \
|
||||
t2.toc \
|
||||
t3.toc \
|
||||
t4.toc \
|
||||
t5.toc \
|
||||
t6.toc \
|
||||
t7.toc \
|
||||
t8.toc \
|
||||
t9.toc \
|
||||
vcd2.toc \
|
||||
videocd.nrg \
|
||||
cdtext.toc \
|
||||
data5.toc \
|
||||
data6.toc \
|
||||
data7.toc
|
||||
|
||||
EXTRA_DIST = $(check_DATA)
|
||||
BIN
test/data/p1.bin
Normal file
BIN
test/data/p1.bin
Normal file
Binary file not shown.
9
test/driver/.gitignore
vendored
9
test/driver/.gitignore
vendored
@@ -1,19 +1,14 @@
|
||||
/*.o
|
||||
/*~
|
||||
/.deps
|
||||
/.libs
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
/follow_symlink
|
||||
/follow_symlink-follow_symlink.o
|
||||
/freebsd
|
||||
/freebsd-freebsd.o
|
||||
/gnu_linux
|
||||
/gnu_linux-gnu_linux.o
|
||||
/mmc
|
||||
/mmc-mmc.o
|
||||
/osx
|
||||
/osx-osx.o
|
||||
/realpath
|
||||
/solaris
|
||||
/solaris-solaris.o
|
||||
/win32
|
||||
/win32-win32.o
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2009 Rocky Bernstein <rocky@gnu.org>
|
||||
# Copyright (C) 2009, 2010 Rocky Bernstein <rocky@gnu.org>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -14,29 +14,33 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
INCLUDES = -I$(top_srcdir) $(LIBCDIO_CFLAGS) $(LIBISO9660_CFLAGS)
|
||||
DATA_DIR = $(abs_top_srcdir)/test/data
|
||||
|
||||
bincue_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
bincue_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
||||
|
||||
freebsd_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
freebsd_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
freebsd_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
||||
|
||||
realpath_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
realpath_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
realpath_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
||||
|
||||
gnu_linux_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
gnu_linux_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
gnu_linux_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
||||
|
||||
mmc_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
mmc_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
mmc_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
||||
|
||||
osx_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
osx_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
osx_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
||||
|
||||
solaris_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
solaris_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
solaris_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
||||
|
||||
win32_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
win32_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
win32_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
||||
|
||||
check_PROGRAMS = freebsd gnu_linux mmc osx realpath solaris win32
|
||||
check_PROGRAMS = bincue freebsd gnu_linux mmc osx realpath solaris win32
|
||||
|
||||
TESTS = $(check_PROGRAMS)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* -*- C -*-
|
||||
$Id: testbincue.c.in,v 1.2 2008/03/22 18:08:25 karl Exp $
|
||||
|
||||
Copyright (C) 2004, 2006, 2008 Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 2004, 2006, 2008, 2010 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -37,8 +37,8 @@
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#ifndef TEST_DIR
|
||||
#define TEST_DIR "@srcdir@"
|
||||
#ifndef DATA_DIR
|
||||
#define DATA_DIR "@abs_top_srcdir@/test/data"
|
||||
#endif
|
||||
|
||||
#define NUM_GOOD_CUES 2
|
||||
@@ -69,7 +69,7 @@ main(int argc, const char *argv[])
|
||||
for (i=0; i<NUM_GOOD_CUES; i++) {
|
||||
char *psz_binfile;
|
||||
snprintf(psz_cuefile, sizeof(psz_cuefile)-1,
|
||||
"%s/%s", TEST_DIR, cue_file[i]);
|
||||
"%s/%s", DATA_DIR, cue_file[i]);
|
||||
psz_binfile = cdio_is_cuefile(psz_cuefile);
|
||||
if (!psz_binfile) {
|
||||
printf("Incorrect: %s doesn't parse as a CDRWin CUE file.\n",
|
||||
@@ -85,7 +85,7 @@ main(int argc, const char *argv[])
|
||||
for (i=0; i<NUM_BAD_CUES; i++) {
|
||||
char *psz_binfile;
|
||||
snprintf(psz_cuefile, sizeof(psz_cuefile)-1,
|
||||
"%s/%s", TEST_DIR, badcue_file[i]);
|
||||
"%s/%s", DATA_DIR, badcue_file[i]);
|
||||
psz_binfile=cdio_is_cuefile(psz_cuefile);
|
||||
if (!psz_binfile) {
|
||||
printf("Correct: %s doesn't parse as a CDRWin CUE file.\n",
|
||||
@@ -102,23 +102,31 @@ main(int argc, const char *argv[])
|
||||
{
|
||||
CdIo_t *p_cdio;
|
||||
snprintf(psz_cuefile, sizeof(psz_cuefile)-1,
|
||||
"%s/%s", TEST_DIR, "cdda.cue");
|
||||
"%s/%s", DATA_DIR, "cdda.cue");
|
||||
p_cdio = cdio_open (psz_cuefile, DRIVER_UNKNOWN);
|
||||
if (!p_cdio) {
|
||||
printf("Can't open cdda.cue\n");
|
||||
} else {
|
||||
/* Just test performing some operations. */
|
||||
driver_return_code_t drc = cdio_set_blocksize(p_cdio, 2048);
|
||||
char *psz_device = cdio_get_default_device(p_cdio);
|
||||
/* Could chdir to srcdir to hedge the bet? */
|
||||
if (psz_device)
|
||||
free(psz_device);
|
||||
else {
|
||||
/* Unless we do the chdir, will fail. So don't set as an error. */
|
||||
printf("Can't get default device\n");
|
||||
char *psz_device;
|
||||
|
||||
#ifdef HAVE_CHDIR
|
||||
if (0 == chdir(DATA_DIR))
|
||||
#endif
|
||||
{
|
||||
psz_device = cdio_get_default_device(p_cdio);
|
||||
/* Could chdir to srcdir to hedge the bet? */
|
||||
if (psz_device)
|
||||
free(psz_device);
|
||||
else {
|
||||
/* Unless we do the chdir, will fail. So don't set as an error. */
|
||||
printf("Can't get default device\n");
|
||||
}
|
||||
drc = cdio_set_speed(p_cdio, 5);
|
||||
}
|
||||
drc = cdio_set_speed(p_cdio, 5);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return ret;
|
||||
Binary file not shown.
1
test/isofs-m1.bin
Symbolic link
1
test/isofs-m1.bin
Symbolic link
@@ -0,0 +1 @@
|
||||
/src/external-vcs/libcdio/test/data/isofs-m1.bin
|
||||
@@ -1,3 +0,0 @@
|
||||
FILE "ISOFS-M1.BIN" BINARY
|
||||
TRACK 01 MODE1/2352
|
||||
INDEX 01 00:00:00
|
||||
@@ -44,8 +44,8 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifndef TEST_DIR
|
||||
#define TEST_DIR "@srcdir@"
|
||||
#ifndef DATA_DIR
|
||||
#define DATA_DIR "@abs_top_srcdir@/test/data/"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ main(int argc, const char *argv[])
|
||||
|
||||
if (ret != 0) return ret;
|
||||
|
||||
if (0 == chdir(TEST_DIR)) {
|
||||
if (0 == chdir(DATA_DIR)) {
|
||||
nrg_images = cdio_get_devices(DRIVER_NRG);
|
||||
|
||||
for (imgs=nrg_images; *imgs != NULL; imgs++) {
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#endif
|
||||
|
||||
/* Set up a CD-DA image to test on which is in the libcdio distribution. */
|
||||
#define ISO9660_IMAGE_PATH "@srcdir@/"
|
||||
#define ISO9660_IMAGE_PATH "@abs_top_srcdir@/test/data/"
|
||||
#define ISO9660_IMAGE ISO9660_IMAGE_PATH "copying.iso"
|
||||
|
||||
#define SKIP_TEST_RC 77
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#ifndef TEST_DIR
|
||||
#define TEST_DIR "@srcdir@"
|
||||
#ifndef DATA_DIR
|
||||
#define DATA_DIR "@abs_top_srcdir@/test/data"
|
||||
#endif
|
||||
|
||||
#define NUM_FIELDS 2
|
||||
@@ -57,12 +57,12 @@ main(int argc, const char *argv[])
|
||||
|
||||
cdio_loglevel_default = (argc > 1) ? CDIO_LOG_DEBUG : CDIO_LOG_INFO;
|
||||
/* snprintf(psz_nrgfile, sizeof(psz_nrgfile)-1,
|
||||
"%s/%s", TEST_DIR, cue_file[i]);
|
||||
"%s/%s", DATA_DIR, cue_file[i]);
|
||||
*/
|
||||
if (!cdio_have_driver(DRIVER_NRG)) return(77);
|
||||
|
||||
snprintf(psz_nrgfile, sizeof(psz_nrgfile)-1, "%s/%s",
|
||||
TEST_DIR, "./p1.nrg");
|
||||
DATA_DIR, "p1.nrg");
|
||||
|
||||
p_cdio = cdio_open_nrg(psz_nrgfile);
|
||||
if (!p_cdio) {
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#ifndef TEST_DIR
|
||||
#define TEST_DIR "@srcdir@"
|
||||
#ifndef DATA_DIR
|
||||
#define DATA_DIR "@srcdir@/data"
|
||||
#endif
|
||||
|
||||
static void
|
||||
@@ -65,14 +65,14 @@ typedef struct _pregap_list_t {
|
||||
|
||||
static pregap_list_t pregapList[] =
|
||||
{
|
||||
{ "@srcdir@/t2.toc", 1, 4425 },
|
||||
{ "@srcdir@/t2.toc", 2, CDIO_INVALID_LSN },
|
||||
{ "@srcdir@/p1.cue", 1, 0 },
|
||||
{ "@srcdir@/p1.cue", 2, 150 },
|
||||
{ "@srcdir@/p1.cue", 3, CDIO_INVALID_LSN },
|
||||
{ "@abs_top_srcdir@/test/data/t2.toc", 1, 4425 },
|
||||
{ "@abs_top_srcdir@/test/data/t2.toc", 2, CDIO_INVALID_LSN },
|
||||
{ "@abs_top_srcdir@/test/data/p1.cue", 1, 0 },
|
||||
{ "@abs_top_srcdir@/test/data/p1.cue", 2, 150 },
|
||||
{ "@abs_top_srcdir@/test/data/p1.cue", 3, CDIO_INVALID_LSN },
|
||||
/* { "p1.nrg", 1, 0 }, Nero did not create the proper pre-gap - bleh */
|
||||
{ "@srcdir@/p1.nrg", 2, 225 },
|
||||
{ "@srcdir@/p1.nrg", 3, CDIO_INVALID_LSN }
|
||||
{ "@abs_top_srcdir@/test/data/p1.nrg", 2, 225 },
|
||||
{ "@abs_top_srcdir@/test/data/p1.nrg", 3, CDIO_INVALID_LSN }
|
||||
};
|
||||
|
||||
#define NELEMS(v) (sizeof(v) / sizeof(v[0]))
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#ifndef TEST_DIR
|
||||
#define TEST_DIR "."
|
||||
#ifndef DATA_DIR
|
||||
#define DATA_DIR "./data/"
|
||||
#endif
|
||||
|
||||
#define NUM_GOOD_TOCS 16
|
||||
@@ -84,7 +84,7 @@ main(int argc, const char *argv[])
|
||||
cdio_loglevel_default = (argc > 1) ? CDIO_LOG_DEBUG : CDIO_LOG_INFO;
|
||||
for (i=0; i<NUM_GOOD_TOCS; i++) {
|
||||
snprintf(psz_tocfile, sizeof(psz_tocfile)-1,
|
||||
"%s/%s", TEST_DIR, toc_file[i]);
|
||||
"%s/%s", DATA_DIR, toc_file[i]);
|
||||
if (!cdio_is_tocfile(psz_tocfile)) {
|
||||
printf("Incorrect: %s doesn't parse as a cdrdao TOC file.\n",
|
||||
toc_file[i]);
|
||||
@@ -97,7 +97,7 @@ main(int argc, const char *argv[])
|
||||
|
||||
for (i=0; i<NUM_BAD_TOCS; i++) {
|
||||
snprintf(psz_tocfile, sizeof(psz_tocfile)-1,
|
||||
"%s/%s", TEST_DIR, badtoc_file[i]);
|
||||
"%s/%s", DATA_DIR, badtoc_file[i]);
|
||||
if (!cdio_is_tocfile(psz_tocfile)) {
|
||||
printf("Correct: %s doesn't parse as a cdrdao TOC file.\n",
|
||||
badtoc_file[i]);
|
||||
|
||||
Reference in New Issue
Block a user