From 90b7edfd267e61c1ba666d7eb2a8fc2d47451aa5 Mon Sep 17 00:00:00 2001 From: rocky Date: Sat, 29 Jan 2005 14:50:34 +0000 Subject: [PATCH] Slightly more descriptive and accurate error messages when regression tests fail. Also if no Joliet support, one test is skipped. --- test/check_common_fn.in | 9 ++++----- test/check_cue.sh.in | 4 ++-- test/check_iso.sh.in | 22 +++++++++++----------- test/check_opts.sh | 4 ++-- 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/test/check_common_fn.in b/test/check_common_fn.in index 77619dcd..f9163eda 100755 --- a/test/check_common_fn.in +++ b/test/check_common_fn.in @@ -1,4 +1,4 @@ -# $Id: check_common_fn.in,v 1.10 2005/01/09 00:10:48 rocky Exp $ +# $Id: check_common_fn.in,v 1.11 2005/01/29 14:50:34 rocky Exp $ # # Copyright (C) 2003, 2004, 2005 Rocky Bernstein # @@ -33,10 +33,9 @@ check_result() { cmdline=$* if test $RC -ne 0 ; then if test $RC -ne $SKIP_TEST_EXITCODE ; then - if test -z "$cmdline" ; then - echo "$0: $msg failed." - else - echo "$0: $msg failed running:" + echo "$0: $msg failed in comparing output." + if test -n "$cmdline" ; then + echo "$0: failed command:" echo " $cmdline" fi exit $RC diff --git a/test/check_cue.sh.in b/test/check_cue.sh.in index a690608c..0cec7dbe 100644 --- a/test/check_cue.sh.in +++ b/test/check_cue.sh.in @@ -1,5 +1,5 @@ #!/bin/sh -#$Id: check_cue.sh.in,v 1.24 2005/01/22 23:57:11 rocky Exp $ +#$Id: check_cue.sh.in,v 1.25 2005/01/29 14:50:34 rocky Exp $ # Tests to see that BIN/CUE and cdrdao TOC file iamge reading is correct # (via cd-info). @@ -30,7 +30,7 @@ check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts" opts="--quiet --no-device-info --bin-file ${srcdir}/${fname}.bin --no-cddb" test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right RC=$? -check_result $RC "cd-info BIN test $testnum" "cd-info $opts" +check_result $RC "cd-info BIN test $testnum" "${CD_INFO} $opts" opts="--quiet --no-device-info --toc-file ${srcdir}/${fname}.toc --no-cddb" test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right diff --git a/test/check_iso.sh.in b/test/check_iso.sh.in index cb65d612..c3bfa307 100644 --- a/test/check_iso.sh.in +++ b/test/check_iso.sh.in @@ -1,5 +1,5 @@ #!/bin/sh -#$Id: check_iso.sh.in,v 1.4 2004/10/28 11:13:40 rocky Exp $ +#$Id: check_iso.sh.in,v 1.5 2005/01/29 14:50:34 rocky Exp $ if test -z $srcdir ; then srcdir=`pwd` @@ -14,17 +14,12 @@ fi BASE=`basename $0 .sh` fname=copying -opts="--quiet ${srcdir}/${fname}.iso --iso9660 " -test_iso_info "$opts" ${fname}.dump ${srcdir}/${fname}.right -RC=$? -check_result $RC 'iso-info basic test' "iso-info $opts" - -opts="--image ${srcdir}/${fname}.iso --extract $fname " -test_iso_read "$opts" ${fname} ${srcdir}/../COPYING -RC=$? -check_result $RC 'iso-read test 1' "iso-read $opts" - if test -n "@HAVE_JOLIET@" ; then + opts="--quiet ${srcdir}/${fname}.iso --iso9660 " + test_iso_info "$opts" ${fname}.dump ${srcdir}/${fname}.right + RC=$? + check_result $RC 'iso-info basic test' "$ISO_INFO $opts" + BASE=`basename $0 .sh` fname=joliet opts="--quiet ${srcdir}/${fname}.iso --iso9660 " @@ -38,6 +33,11 @@ if test -n "@HAVE_JOLIET@" ; then check_result $RC 'iso-info --no-joliet test' "$cmdline" fi +opts="--image ${srcdir}/${fname}.iso --extract $fname " +test_iso_read "$opts" ${fname} ${srcdir}/../COPYING +RC=$? +check_result $RC 'iso-read test 1' "$ISO_READ $opts" + exit $RC #;;; Local Variables: *** diff --git a/test/check_opts.sh b/test/check_opts.sh index 258db53a..27e80195 100755 --- a/test/check_opts.sh +++ b/test/check_opts.sh @@ -1,5 +1,5 @@ #!/bin/sh -#$Id: check_opts.sh,v 1.7 2004/09/04 00:06:50 rocky Exp $ +#$Id: check_opts.sh,v 1.8 2005/01/29 14:50:34 rocky Exp $ # Check cd-info options if test -z "$srcdir" ; then srcdir=`pwd` @@ -21,7 +21,7 @@ for opt in '-T' '--no-tracks' '-A' '--no-analyze' '-I' '--no-ioctl' \ opts="--no-device-info --cue-file ${srcdir}/${fname}.cue $opt --quiet" test_cdinfo "$opts" ${testname}.dump ${srcdir}/${testname}.right RC=$? - check_result $RC "cd-info option test $opt" "cd-info $opts" + check_result $RC "cd-info option test $opt" "../src/cd-info $opts" i=`expr $i + 1` done