mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
Use the subunit shell library.
This commit is contained in:
parent
9b364bf390
commit
49367e044e
@ -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.$$
|
||||
|
@ -20,20 +20,7 @@ failed=0
|
||||
samba4bindir=`dirname $0`/../../source/bin
|
||||
gentest=$samba4bindir/gentest
|
||||
|
||||
testit() {
|
||||
name="$1"
|
||||
shift
|
||||
cmdline="$*"
|
||||
echo "test: $name"
|
||||
$cmdline
|
||||
status=$?
|
||||
if [ x$status = x0 ]; then
|
||||
echo "success: $name"
|
||||
else
|
||||
echo "failure: $name"
|
||||
fi
|
||||
return $status
|
||||
}
|
||||
. `dirname $0`/subunit.sh
|
||||
|
||||
cat <<EOF > st/gentest.ignore
|
||||
all_info.out.fname
|
||||
|
@ -25,21 +25,7 @@ samba4kinit=$samba4bindir/samba4kinit
|
||||
net=$samba4bindir/net
|
||||
enableaccount="$samba4bindir/smbpython `dirname $0`/../../source/setup/enableaccount"
|
||||
|
||||
testit() {
|
||||
name="$1"
|
||||
shift
|
||||
cmdline="$*"
|
||||
echo "test: $name"
|
||||
$cmdline
|
||||
status=$?
|
||||
if [ x$status = x0 ]; then
|
||||
echo "success: $name"
|
||||
else
|
||||
echo "failure: $name"
|
||||
fi
|
||||
return $status
|
||||
}
|
||||
|
||||
. `dirname $0`/subunit.sh
|
||||
|
||||
test_smbclient() {
|
||||
name="$1"
|
||||
|
@ -14,6 +14,8 @@ PREFIX=$3
|
||||
shift 2
|
||||
options="$*"
|
||||
|
||||
. `dirname $0`/subunit.sh
|
||||
|
||||
check() {
|
||||
name="$1"
|
||||
shift
|
||||
|
@ -21,20 +21,7 @@ failed=0
|
||||
samba4bindir=`dirname $0`/../../source/bin
|
||||
locktest=$samba4bindir/locktest
|
||||
|
||||
testit() {
|
||||
name="$1"
|
||||
shift
|
||||
cmdline="$*"
|
||||
echo "test: $name"
|
||||
$cmdline
|
||||
status=$?
|
||||
if [ x$status = x0 ]; then
|
||||
echo "success: $name"
|
||||
else
|
||||
echo "failure: $name"
|
||||
fi
|
||||
return $status
|
||||
}
|
||||
. `dirname $0`/subunit.sh
|
||||
|
||||
testit "locktest" $VALGRIND $locktest //$SERVER/test1 //$SERVER/test2 --num-ops=100 -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@ || failed=`expr $failed + 1`
|
||||
|
||||
|
@ -21,20 +21,7 @@ failed=0
|
||||
samba4bindir=`dirname $0`/../../source/bin
|
||||
masktest=$samba4bindir/masktest
|
||||
|
||||
testit() {
|
||||
name="$1"
|
||||
shift
|
||||
cmdline="$*"
|
||||
echo "test: $name"
|
||||
$cmdline
|
||||
status=$?
|
||||
if [ x$status = x0 ]; then
|
||||
echo "success: $name"
|
||||
else
|
||||
echo "failure: $name"
|
||||
fi
|
||||
return $status
|
||||
}
|
||||
. `dirname $0`/subunit.sh
|
||||
|
||||
testit "masktest" $VALGRIND $masktest //$SERVER/tmp --num-ops=200 --dieonerror -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@ || failed=`expr $failed + 1`
|
||||
|
||||
|
@ -4,27 +4,14 @@
|
||||
# Copyright (C) 2008 Andrew Bartlett
|
||||
# based on test_smbclient.sh
|
||||
|
||||
. `dirname $0`/subunit.sh
|
||||
|
||||
failed=0
|
||||
|
||||
samba4bindir=`dirname $0`/../../source/bin
|
||||
ndrdump=$samba4bindir/ndrdump
|
||||
files=`dirname $0`/ndrdump
|
||||
|
||||
testit() {
|
||||
name="$1"
|
||||
shift
|
||||
cmdline="$*"
|
||||
echo "test: $name"
|
||||
$cmdline
|
||||
status=$?
|
||||
if [ x$status = x0 ]; then
|
||||
echo "success: $name"
|
||||
else
|
||||
echo "failure: $name"
|
||||
fi
|
||||
return $status
|
||||
}
|
||||
|
||||
testit "ndrdump with in" $VALGRIND $ndrdump samr samr_CreateUser in $files/samr-CreateUser-in.dat $@ || failed=`expr $failed + 1`
|
||||
testit "ndrdump with out" $VALGRIND $ndrdump samr samr_CreateUser out $files/samr-CreateUser-out.dat $@ || failed=`expr $failed + 1`
|
||||
testit "ndrdump with --context-file" $VALGRIND $ndrdump --context-file $files/samr-CreateUser-in.dat samr samr_CreateUser out $files/samr-CreateUser-out.dat $@ || failed=`expr $failed + 1`
|
||||
|
@ -21,20 +21,7 @@ failed=0
|
||||
samba4bindir=`dirname $0`/../../source/bin
|
||||
smbclient=$samba4bindir/smbclient
|
||||
|
||||
testit() {
|
||||
name="$1"
|
||||
shift
|
||||
cmdline="$*"
|
||||
echo "test: $name"
|
||||
$cmdline
|
||||
status=$?
|
||||
if [ x$status = x0 ]; then
|
||||
echo "success: $name"
|
||||
else
|
||||
echo "failure: $name"
|
||||
fi
|
||||
return $status
|
||||
}
|
||||
. `dirname $0`/subunit.sh
|
||||
|
||||
runcmd() {
|
||||
name="$1"
|
||||
|
@ -17,20 +17,7 @@ failed=0
|
||||
samba4bindir=`dirname $0`/../../source/bin
|
||||
wbinfo=$samba4bindir/wbinfo
|
||||
|
||||
testit() {
|
||||
name="$1"
|
||||
shift
|
||||
cmdline="$*"
|
||||
echo "test: $name"
|
||||
$cmdline
|
||||
status=$?
|
||||
if [ x$status = x0 ]; then
|
||||
echo "success: $name"
|
||||
else
|
||||
echo "failure: $name"
|
||||
fi
|
||||
return $status
|
||||
}
|
||||
. `dirname $0`/subunit.sh
|
||||
|
||||
testfail() {
|
||||
name="$1"
|
||||
|
Loading…
Reference in New Issue
Block a user