diff options
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | doc/.gitignore | 11 | ||||
-rw-r--r-- | doc/doxygen/.gitignore | 5 | ||||
-rw-r--r-- | test/Makefile.am | 49 | ||||
l---------[-rw-r--r--] | test/cdda.bin | bin | 710304 -> 44 bytes | |||
-rwxr-xr-x | test/check_cd_read.sh | 6 | ||||
-rw-r--r-- | test/check_cue.sh.in | 26 | ||||
-rwxr-xr-x | test/check_fuzzyiso.sh | 4 | ||||
-rw-r--r-- | test/check_iso.sh.in | 12 | ||||
-rwxr-xr-x | test/check_nrg.sh.in | 8 | ||||
-rwxr-xr-x | test/check_opts.sh | 2 | ||||
-rw-r--r-- | test/check_paranoia.sh.in | 10 | ||||
-rw-r--r-- | test/data/.gitignore | 3 | ||||
-rw-r--r-- | test/data/Makefile.am | 47 | ||||
-rw-r--r-- | test/data/bad-cat1.cue (renamed from test/bad-cat1.cue) | 0 | ||||
-rw-r--r-- | test/data/bad-cat1.toc (renamed from test/bad-cat1.toc) | 0 | ||||
-rw-r--r-- | test/data/bad-cat2.cue (renamed from test/bad-cat2.cue) | 0 | ||||
-rw-r--r-- | test/data/bad-cat2.toc (renamed from test/bad-cat2.toc) | 0 | ||||
-rw-r--r-- | test/data/bad-cat3.cue (renamed from test/bad-cat3.cue) | 0 | ||||
-rw-r--r-- | test/data/bad-cat3.toc (renamed from test/bad-cat3.toc) | 0 | ||||
-rw-r--r-- | test/data/bad-file.toc (renamed from test/bad-file.toc) | 0 | ||||
-rw-r--r-- | test/data/bad-mode1.cue (renamed from test/bad-mode1.cue) | 0 | ||||
-rw-r--r-- | test/data/bad-mode1.toc (renamed from test/bad-mode1.toc) | 0 | ||||
-rw-r--r-- | test/data/bad-msf-1.cue (renamed from test/bad-msf-1.cue) | 0 | ||||
-rw-r--r-- | test/data/bad-msf-1.toc (renamed from test/bad-msf-1.toc) | 0 | ||||
-rw-r--r-- | test/data/bad-msf-2.cue (renamed from test/bad-msf-2.cue) | 0 | ||||
-rw-r--r-- | test/data/bad-msf-2.toc (renamed from test/bad-msf-2.toc) | 0 | ||||
-rw-r--r-- | test/data/bad-msf-3.cue (renamed from test/bad-msf-3.cue) | 0 | ||||
-rw-r--r-- | test/data/bad-msf-3.toc (renamed from test/bad-msf-3.toc) | 0 | ||||
-rw-r--r-- | test/data/cdda.bin (renamed from test/p1.bin) | bin | 710304 -> 710304 bytes | |||
-rw-r--r-- | test/data/cdda.cue (renamed from test/cdda.cue) | 0 | ||||
-rw-r--r-- | test/data/cdda.toc (renamed from test/cdda.toc) | 0 | ||||
-rw-r--r-- | test/data/cdtext.toc (renamed from test/cdtext.toc) | 0 | ||||
-rw-r--r-- | test/data/copying-rr.iso (renamed from test/copying-rr.iso) | bin | 380928 -> 380928 bytes | |||
-rw-r--r-- | test/data/copying.iso (renamed from test/copying.iso) | bin | 131072 -> 131072 bytes | |||
-rw-r--r-- | test/data/data1.toc (renamed from test/data1.toc) | 0 | ||||
-rw-r--r-- | test/data/data2.toc (renamed from test/data2.toc) | 0 | ||||
-rw-r--r-- | test/data/data5.toc (renamed from test/data5.toc) | 0 | ||||
-rw-r--r-- | test/data/data6.toc (renamed from test/data6.toc) | 0 | ||||
-rw-r--r-- | test/data/data7.toc (renamed from test/data7.toc) | 0 | ||||
-rw-r--r-- | test/data/isofs-m1.toc (renamed from test/isofs-m1.toc) | 0 | ||||
-rw-r--r-- | test/data/joliet.iso (renamed from test/joliet.iso) | bin | 405504 -> 405504 bytes | |||
-rw-r--r-- | test/data/p1.bin | bin | 0 -> 710304 bytes | |||
-rw-r--r-- | test/data/p1.cue (renamed from test/p1.cue) | 0 | ||||
-rwxr-xr-x | test/data/p1.nrg (renamed from test/p1.nrg) | bin | 1063470 -> 1063470 bytes | |||
-rw-r--r-- | test/data/t1.toc (renamed from test/t1.toc) | 0 | ||||
-rw-r--r-- | test/data/t2.toc (renamed from test/t2.toc) | 0 | ||||
-rw-r--r-- | test/data/t3.toc (renamed from test/t3.toc) | 0 | ||||
-rw-r--r-- | test/data/t4.toc (renamed from test/t4.toc) | 0 | ||||
-rw-r--r-- | test/data/t5.toc (renamed from test/t5.toc) | 0 | ||||
-rw-r--r-- | test/data/t6.toc (renamed from test/t6.toc) | 0 | ||||
-rw-r--r-- | test/data/t7.toc (renamed from test/t7.toc) | 0 | ||||
-rw-r--r-- | test/data/t8.toc (renamed from test/t8.toc) | 0 | ||||
-rw-r--r-- | test/data/t9.toc (renamed from test/t9.toc) | 0 | ||||
-rw-r--r-- | test/data/vcd2.toc (renamed from test/vcd2.toc) | 0 | ||||
-rw-r--r-- | test/data/vcd_demo.toc (renamed from test/vcd_demo.toc) | 0 | ||||
-rw-r--r-- | test/data/videocd.nrg (renamed from test/videocd.nrg) | bin | 2630472 -> 2630472 bytes | |||
-rw-r--r-- | test/driver/.gitignore | 9 | ||||
-rw-r--r-- | test/driver/Makefile.am | 22 | ||||
-rw-r--r-- | test/driver/bincue.c.in (renamed from test/testbincue.c.in) | 36 | ||||
l---------[-rw-r--r--] | test/isofs-m1.bin | bin | 710304 -> 48 bytes | |||
-rw-r--r-- | test/isofs-m1.cue | 3 | ||||
-rw-r--r-- | test/testgetdevices.c.in | 6 | ||||
-rw-r--r-- | test/testisocd2.c.in | 2 | ||||
-rw-r--r-- | test/testnrg.c.in | 8 | ||||
-rw-r--r-- | test/testpregap.c.in | 18 | ||||
-rw-r--r-- | test/testtoc.c | 8 |
67 files changed, 181 insertions, 123 deletions
diff --git a/configure.ac b/configure.ac index 10c48740..bf0a1a35 100644 --- a/configure.ac +++ b/configure.ac @@ -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 \ diff --git a/doc/.gitignore b/doc/.gitignore index a07183bf..9872ee2e 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -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 diff --git a/doc/doxygen/.gitignore b/doc/doxygen/.gitignore index c547d0a2..8bbd50c0 100644 --- a/doc/doxygen/.gitignore +++ b/doc/doxygen/.gitignore @@ -1,4 +1,5 @@ -/html -/latex /Doxyfile /Doxyfile.bak +/html +/latex +/libcdio.xml diff --git a/test/Makefile.am b/test/Makefile.am index 553a6dd0..8337b331 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -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 diff --git a/test/cdda.bin b/test/cdda.bin Binary files differindex b1ba1f5e..6df1e12e 100644..120000 --- a/test/cdda.bin +++ b/test/cdda.bin diff --git a/test/check_cd_read.sh b/test/check_cd_read.sh index fe312564..1d5667f9 100755 --- a/test/check_cd_read.sh +++ b/test/check_cd_read.sh @@ -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" diff --git a/test/check_cue.sh.in b/test/check_cue.sh.in index 8f669a7e..b0aad8ad 100644 --- a/test/check_cue.sh.in +++ b/test/check_cue.sh.in @@ -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 diff --git a/test/check_fuzzyiso.sh b/test/check_fuzzyiso.sh index e2ae3e4a..251409ed 100755 --- a/test/check_fuzzyiso.sh +++ b/test/check_fuzzyiso.sh @@ -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 ;; *) diff --git a/test/check_iso.sh.in b/test/check_iso.sh.in index ed4efbf2..a3482883 100644 --- a/test/check_iso.sh.in +++ b/test/check_iso.sh.in @@ -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=$? diff --git a/test/check_nrg.sh.in b/test/check_nrg.sh.in index f72cec7d..84b7e2c8 100755 --- a/test/check_nrg.sh.in +++ b/test/check_nrg.sh.in @@ -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 diff --git a/test/check_opts.sh b/test/check_opts.sh index 6cbfdd94..31036865 100755 --- a/test/check_opts.sh +++ b/test/check_opts.sh @@ -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" diff --git a/test/check_paranoia.sh.in b/test/check_paranoia.sh.in index b955b7ba..14374ef8 100644 --- a/test/check_paranoia.sh.in +++ b/test/check_paranoia.sh.in @@ -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 diff --git a/test/data/.gitignore b/test/data/.gitignore new file mode 100644 index 00000000..ddeeca75 --- /dev/null +++ b/test/data/.gitignore @@ -0,0 +1,3 @@ +/*~ +/Makefile +/Makefile.in diff --git a/test/data/Makefile.am b/test/data/Makefile.am new file mode 100644 index 00000000..35fa1fc1 --- /dev/null +++ b/test/data/Makefile.am @@ -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) diff --git a/test/bad-cat1.cue b/test/data/bad-cat1.cue index d48fda63..d48fda63 100644 --- a/test/bad-cat1.cue +++ b/test/data/bad-cat1.cue diff --git a/test/bad-cat1.toc b/test/data/bad-cat1.toc index 864c9b4f..864c9b4f 100644 --- a/test/bad-cat1.toc +++ b/test/data/bad-cat1.toc diff --git a/test/bad-cat2.cue b/test/data/bad-cat2.cue index 90c0b9bc..90c0b9bc 100644 --- a/test/bad-cat2.cue +++ b/test/data/bad-cat2.cue diff --git a/test/bad-cat2.toc b/test/data/bad-cat2.toc index f1927cf5..f1927cf5 100644 --- a/test/bad-cat2.toc +++ b/test/data/bad-cat2.toc diff --git a/test/bad-cat3.cue b/test/data/bad-cat3.cue index 0e65e3bf..0e65e3bf 100644 --- a/test/bad-cat3.cue +++ b/test/data/bad-cat3.cue diff --git a/test/bad-cat3.toc b/test/data/bad-cat3.toc index 1e389a34..1e389a34 100644 --- a/test/bad-cat3.toc +++ b/test/data/bad-cat3.toc diff --git a/test/bad-file.toc b/test/data/bad-file.toc index 5dfb1289..5dfb1289 100644 --- a/test/bad-file.toc +++ b/test/data/bad-file.toc diff --git a/test/bad-mode1.cue b/test/data/bad-mode1.cue index 589de652..589de652 100644 --- a/test/bad-mode1.cue +++ b/test/data/bad-mode1.cue diff --git a/test/bad-mode1.toc b/test/data/bad-mode1.toc index 9dbc6459..9dbc6459 100644 --- a/test/bad-mode1.toc +++ b/test/data/bad-mode1.toc diff --git a/test/bad-msf-1.cue b/test/data/bad-msf-1.cue index bea0ad6d..bea0ad6d 100644 --- a/test/bad-msf-1.cue +++ b/test/data/bad-msf-1.cue diff --git a/test/bad-msf-1.toc b/test/data/bad-msf-1.toc index 2d9f656e..2d9f656e 100644 --- a/test/bad-msf-1.toc +++ b/test/data/bad-msf-1.toc diff --git a/test/bad-msf-2.cue b/test/data/bad-msf-2.cue index fdd4bfc2..fdd4bfc2 100644 --- a/test/bad-msf-2.cue +++ b/test/data/bad-msf-2.cue diff --git a/test/bad-msf-2.toc b/test/data/bad-msf-2.toc index 77873486..77873486 100644 --- a/test/bad-msf-2.toc +++ b/test/data/bad-msf-2.toc diff --git a/test/bad-msf-3.cue b/test/data/bad-msf-3.cue index e02774bb..e02774bb 100644 --- a/test/bad-msf-3.cue +++ b/test/data/bad-msf-3.cue diff --git a/test/bad-msf-3.toc b/test/data/bad-msf-3.toc index b1cfac1a..b1cfac1a 100644 --- a/test/bad-msf-3.toc +++ b/test/data/bad-msf-3.toc diff --git a/test/p1.bin b/test/data/cdda.bin Binary files differindex b1ba1f5e..b1ba1f5e 100644 --- a/test/p1.bin +++ b/test/data/cdda.bin diff --git a/test/cdda.cue b/test/data/cdda.cue index e48e1a93..e48e1a93 100644 --- a/test/cdda.cue +++ b/test/data/cdda.cue diff --git a/test/cdda.toc b/test/data/cdda.toc index 44046d71..44046d71 100644 --- a/test/cdda.toc +++ b/test/data/cdda.toc diff --git a/test/cdtext.toc b/test/data/cdtext.toc index 93c8000b..93c8000b 100644 --- a/test/cdtext.toc +++ b/test/data/cdtext.toc diff --git a/test/copying-rr.iso b/test/data/copying-rr.iso Binary files differindex 19429eb4..19429eb4 100644 --- a/test/copying-rr.iso +++ b/test/data/copying-rr.iso diff --git a/test/copying.iso b/test/data/copying.iso Binary files differindex 5e57cd06..5e57cd06 100644 --- a/test/copying.iso +++ b/test/data/copying.iso diff --git a/test/data1.toc b/test/data/data1.toc index 9c5285cc..9c5285cc 100644 --- a/test/data1.toc +++ b/test/data/data1.toc diff --git a/test/data2.toc b/test/data/data2.toc index 8504c0f6..8504c0f6 100644 --- a/test/data2.toc +++ b/test/data/data2.toc diff --git a/test/data5.toc b/test/data/data5.toc index a3d38b9c..a3d38b9c 100644 --- a/test/data5.toc +++ b/test/data/data5.toc diff --git a/test/data6.toc b/test/data/data6.toc index eee4834f..eee4834f 100644 --- a/test/data6.toc +++ b/test/data/data6.toc diff --git a/test/data7.toc b/test/data/data7.toc index 61e4bea3..61e4bea3 100644 --- a/test/data7.toc +++ b/test/data/data7.toc diff --git a/test/isofs-m1.toc b/test/data/isofs-m1.toc index b21572f7..b21572f7 100644 --- a/test/isofs-m1.toc +++ b/test/data/isofs-m1.toc diff --git a/test/joliet.iso b/test/data/joliet.iso Binary files differindex 00071060..00071060 100644 --- a/test/joliet.iso +++ b/test/data/joliet.iso diff --git a/test/data/p1.bin b/test/data/p1.bin Binary files differnew file mode 100644 index 00000000..b1ba1f5e --- /dev/null +++ b/test/data/p1.bin diff --git a/test/p1.cue b/test/data/p1.cue index 40855d6e..40855d6e 100644 --- a/test/p1.cue +++ b/test/data/p1.cue diff --git a/test/p1.nrg b/test/data/p1.nrg Binary files differindex ba76e8be..ba76e8be 100755 --- a/test/p1.nrg +++ b/test/data/p1.nrg diff --git a/test/t1.toc b/test/data/t1.toc index 1ad10d59..1ad10d59 100644 --- a/test/t1.toc +++ b/test/data/t1.toc diff --git a/test/t2.toc b/test/data/t2.toc index edd5fedc..edd5fedc 100644 --- a/test/t2.toc +++ b/test/data/t2.toc diff --git a/test/t3.toc b/test/data/t3.toc index cacce970..cacce970 100644 --- a/test/t3.toc +++ b/test/data/t3.toc diff --git a/test/t4.toc b/test/data/t4.toc index 48f3c5f2..48f3c5f2 100644 --- a/test/t4.toc +++ b/test/data/t4.toc diff --git a/test/t5.toc b/test/data/t5.toc index b662c0be..b662c0be 100644 --- a/test/t5.toc +++ b/test/data/t5.toc diff --git a/test/t6.toc b/test/data/t6.toc index b959a365..b959a365 100644 --- a/test/t6.toc +++ b/test/data/t6.toc diff --git a/test/t7.toc b/test/data/t7.toc index d87d3c05..d87d3c05 100644 --- a/test/t7.toc +++ b/test/data/t7.toc diff --git a/test/t8.toc b/test/data/t8.toc index 793d423d..793d423d 100644 --- a/test/t8.toc +++ b/test/data/t8.toc diff --git a/test/t9.toc b/test/data/t9.toc index 9bd3453b..9bd3453b 100644 --- a/test/t9.toc +++ b/test/data/t9.toc diff --git a/test/vcd2.toc b/test/data/vcd2.toc index 1dce90b2..1dce90b2 100644 --- a/test/vcd2.toc +++ b/test/data/vcd2.toc diff --git a/test/vcd_demo.toc b/test/data/vcd_demo.toc index 9b9b0e05..9b9b0e05 100644 --- a/test/vcd_demo.toc +++ b/test/data/vcd_demo.toc diff --git a/test/videocd.nrg b/test/data/videocd.nrg Binary files differindex a9161e70..a9161e70 100644 --- a/test/videocd.nrg +++ b/test/data/videocd.nrg diff --git a/test/driver/.gitignore b/test/driver/.gitignore index 40caf85c..92abc817 100644 --- a/test/driver/.gitignore +++ b/test/driver/.gitignore @@ -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 diff --git a/test/driver/Makefile.am b/test/driver/Makefile.am index 630ca253..d17c6d04 100644 --- a/test/driver/Makefile.am +++ b/test/driver/Makefile.am @@ -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) diff --git a/test/testbincue.c.in b/test/driver/bincue.c.in index 1c2f66e0..bf46e616 100644 --- a/test/testbincue.c.in +++ b/test/driver/bincue.c.in @@ -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; diff --git a/test/isofs-m1.bin b/test/isofs-m1.bin Binary files differindex adaea5c3..e67ac79d 100644..120000 --- a/test/isofs-m1.bin +++ b/test/isofs-m1.bin diff --git a/test/isofs-m1.cue b/test/isofs-m1.cue deleted file mode 100644 index 677a803f..00000000 --- a/test/isofs-m1.cue +++ /dev/null @@ -1,3 +0,0 @@ -FILE "ISOFS-M1.BIN" BINARY
- TRACK 01 MODE1/2352
- INDEX 01 00:00:00
diff --git a/test/testgetdevices.c.in b/test/testgetdevices.c.in index 2a4844a9..f5124ae6 100644 --- a/test/testgetdevices.c.in +++ b/test/testgetdevices.c.in @@ -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++) { diff --git a/test/testisocd2.c.in b/test/testisocd2.c.in index 12475d47..35e0cbed 100644 --- a/test/testisocd2.c.in +++ b/test/testisocd2.c.in @@ -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 diff --git a/test/testnrg.c.in b/test/testnrg.c.in index eaa42274..caed4828 100644 --- a/test/testnrg.c.in +++ b/test/testnrg.c.in @@ -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) { diff --git a/test/testpregap.c.in b/test/testpregap.c.in index a224e082..1a26c560 100644 --- a/test/testpregap.c.in +++ b/test/testpregap.c.in @@ -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])) diff --git a/test/testtoc.c b/test/testtoc.c index af60dbe7..dae7d94b 100644 --- a/test/testtoc.c +++ b/test/testtoc.c @@ -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]); |