blob: b3198e0f4612903acfb0863ea7e05fc8bd118ec1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
#!/bin/sh
DOMAIN=SAMBADOMAIN
USERNAME=administrator
REALM=$DOMAIN
PASSWORD=penguin
SRCDIR=`pwd`
if [ $# -lt 1 ]
then
echo "$0 PREFIX"
exit
fi
PREFIX=$1
TMPDIR=$PREFIX/tmp
LIBDIR=$PREFIX/lib
PIDDIR=$PREFIX/pid
CONFFILE=$LIBDIR/smb.conf
PRIVATEDIR=$PREFIX/private
NCALRPCDIR=$PREFIX/ncalrpc
LOCKDIR=$PREFIX/lockdir
incdir=`dirname $0`
. $incdir/test_functions.sh
rm -rf $PREFIX/*
mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $NCALRPCDIR $LOCKDIR $TMPDIR
./setup/provision.pl --quiet --outputdir $PRIVATEDIR --domain $DOMAIN --realm $REALM --adminpass $PASSWORD
cat >$CONFFILE<<EOF
[global]
workgroup = $DOMAIN
realm = $REALM
private dir = $PRIVATEDIR
pid directory = $PIDDIR
ncalrpc dir = $NCALRPCDIR
lock dir = $LOCKDIR
sam database = tdb://$PRIVATEDIR/sam.ldb
[tmp]
path = $TMPDIR
read only = no
ntvfs handler = posix
posix:sharedelay = 5000
EOF
ADDARG="-s $CONFFILE"
if [ x"$RUN_FROM_BUILD_FARM" = x"yes" ];then
ADDARG="$ADDARG --option=\"torture:progress=no\""
fi
SMBD_TEST_FIFO="$PREFIX/smbd_test.fifo"
export SMBD_TEST_FIFO
rm -f $SMBD_TEST_FIFO
mkfifo $SMBD_TEST_FIFO
($SRCDIR/bin/smbd -d1 -s $CONFFILE -M single -i < $SMBD_TEST_FIFO;
ret=$?;
rm -f $SMBD_TEST_FIFO;
echo "smbd exists with status $ret";
exit $ret;
)||exit $? &
sleep 2
START=`date`
(
failed=0
$SRCDIR/script/tests/test_rpc.sh localhost $USERNAME $PASSWORD $DOMAIN $ADDARG || failed=`expr $failed + $?`
$SRCDIR/script/tests/test_binding_string.sh localhost $USERNAME $PASSWORD $DOMAIN $ADDARG || failed=`expr $failed + $?`
$SRCDIR/script/tests/test_echo.sh localhost $USERNAME $PASSWORD $DOMAIN $ADDARG || failed=`expr $failed + $?`
$SRCDIR/script/tests/test_posix.sh //localhost/tmp $USERNAME $PASSWORD "" $ADDARG || failed=`expr $failed + $?`
$SRCDIR/script/tests/test_local.sh $ADDARG || failed=`expr $failed + $?`
exit $failed
) 9>$SMBD_TEST_FIFO
failed=$?
END=`date`
echo "START: $START ($0)";
echo "END: $END ($0)";
teststatus $0 $failed
|