test/*: Add first UDF test - test sequential file extraction.
example/extract.c: give non-zero return code if we can't find UDF image test/*
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
# Copyright (C) 2003, 2004, 2006, 2008, 2009, 2010 Rocky Bernstein <rocky@gnu.org>
|
||||
# Copyright (C) 2003, 2004, 2006, 2008, 2009, 2010
|
||||
# 2012 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
|
||||
@@ -51,9 +52,11 @@ test_lib_driver_util_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
||||
testpregap_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
testpregap_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
||||
|
||||
check_SCRIPTS = check_nrg.sh check_cue.sh check_cd_read.sh \
|
||||
check_SCRIPTS = check_nrg.sh check_cue.sh check_cd_read.sh check_udf.sh \
|
||||
check_iso.sh check_fuzzyiso.sh check_opts.sh
|
||||
|
||||
check_udf.sh: @abs_top_builddir@/example/extract$(EXEEXT)
|
||||
|
||||
check_PROGRAMS = $(hack)
|
||||
|
||||
check_DATA = vcd_demo.right vcd_demo_vcdinfo.right \
|
||||
@@ -67,7 +70,7 @@ check_DATA = vcd_demo.right vcd_demo_vcdinfo.right \
|
||||
isofs-m1-read.right cdda-read.right cdtext.right \
|
||||
copying.right copying-rr.right \
|
||||
joliet.right joliet-nojoliet.right \
|
||||
udf102.iso copying.gpl copying-rr.gpl
|
||||
copying.gpl copying-rr.gpl
|
||||
|
||||
EXTRA_DIST = $(check_SCRIPTS) $(check_DATA) \
|
||||
check_common_fn check_cue.sh.in check_nrg.sh.in \
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/bin/sh
|
||||
# $Id: check_cd_read.sh,v 1.12 2008/03/22 18:08:25 karl Exp $
|
||||
#
|
||||
# Copyright (C) 2003, 2005, 2008, 2010 Rocky Bernstein <rocky@gnu.org>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -39,7 +39,7 @@ check_result() {
|
||||
cmdline="$cmd $*"
|
||||
if test $RC -ne 0 ; then
|
||||
if test $RC -ne $SKIP_TEST_EXITCODE ; then
|
||||
echo "$0: $msg failed in comparing output."
|
||||
echo "$0: $msg failed."
|
||||
if test -n "$cmdline" ; then
|
||||
echo "$0: failed command:"
|
||||
echo " $cmdline"
|
||||
|
||||
54
test/check_udf.sh
Executable file
54
test/check_udf.sh
Executable file
@@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2012 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
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Tests to see that CD reading is correct (via cd-read).
|
||||
|
||||
if test -z $srcdir ; then
|
||||
srcdir=`pwd`
|
||||
fi
|
||||
|
||||
if test "X$top_builddir" = "X" ; then
|
||||
top_builddir=`pwd`/..
|
||||
fi
|
||||
|
||||
if test ! -x $top_builddir/example/extract ; then
|
||||
exit 77
|
||||
fi
|
||||
|
||||
. ${top_builddir}/test/check_common_fn
|
||||
|
||||
extract_dir=/tmp/udf-$$
|
||||
if test -d $extract_dir ; then
|
||||
rm -fr $extract_dir
|
||||
fi
|
||||
|
||||
udf_iso=$srcdir/data/test-udf1.iso
|
||||
extract_program=$top_builddir/example/extract
|
||||
cmd="$extract_program $udf_iso $extract_dir"
|
||||
$cmd
|
||||
RC=$?
|
||||
check_result $RC "$cmd"
|
||||
|
||||
if test $RC -eq 0 ; then
|
||||
rm -fr $extract_dir
|
||||
fi
|
||||
|
||||
exit $RC
|
||||
|
||||
#;;; Local Variables: ***
|
||||
#;;; mode:shell-script ***
|
||||
#;;; eval: (sh-set-shell "bash") ***
|
||||
#;;; End: ***
|
||||
BIN
test/data/test-udf1.iso
Normal file
BIN
test/data/test-udf1.iso
Normal file
Binary file not shown.
Reference in New Issue
Block a user