From 228f342b1f12accbf3c07e1d2a1c9a5459ed966b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 16 Apr 2008 14:52:29 +0200 Subject: Use the subunit shell library. (This used to be commit 49367e044e3ab94639ab3209bfd06c6286b44b59) --- testprogs/blackbox/test_cifsdd.sh | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'testprogs/blackbox/test_cifsdd.sh') diff --git a/testprogs/blackbox/test_cifsdd.sh b/testprogs/blackbox/test_cifsdd.sh index 23df04c84c..43564a0c77 100755 --- a/testprogs/blackbox/test_cifsdd.sh +++ b/testprogs/blackbox/test_cifsdd.sh @@ -14,40 +14,24 @@ USERNAME=$2 PASSWORD=$3 DOMAIN=$4 +. `dirname $0`/subunit.sh + samba4bindir=`dirname $0`/../../source/bin DD=$samba4bindir/cifsdd SHARE=tmp DEBUGLEVEL=1 -failed=0 - -testit() { - name="$1" - shift - cmdline="$*" - echo "test: $name" - $cmdline - status=$? - if [ x$status = x0 ]; then - echo "success: $name" - else - echo "failure: $name" - failed=`expr $failed + 1` - fi - return $status -} - runcopy() { message="$1" shift testit "$message" $VALGRIND $DD $CONFIGURATION --debuglevel=$DEBUGLEVEL -W "$DOMAIN" -U "$USERNAME"%"$PASSWORD" \ - "$@" + "$@" || failed=`expr $failed + 1` } compare() { - testit "$1" cmp "$2" "$3" + testit "$1" cmp "$2" "$3" || failed=`expr $failed + 1` } sourcepath=tempfile.src.$$ -- cgit