summaryrefslogtreecommitdiff
path: root/source4/script/tests/selftest.sh
blob: a52f38b3b1b8aca5b69dd801803a4cbe16fb2f63 (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
#!/bin/sh
DOMAIN=SAMBADOMAIN
REALM=$DOMAIN
PASSWORD=penguin
SRCDIR=`pwd`
TMPDIR=$PREFIX/tmp

if [ $# -lt 1 ]
then
	echo "$0 PREFIX"
	exit
fi

PREFIX=$1

rm -f $PREFIX/private/*
./setup/provision.pl --quiet --outputdir $PREFIX/private --domain $DOMAIN --realm $REALM --adminpass $PASSWORD

cat >$PREFIX/lib/smb.conf <<EOF
[global]
	workgroup = $DOMAIN

[tmp]
	path = $TMPDIR
	read only = no
EOF

export SOCKET_WRAPPER_DIR
cd $PREFIX
./sbin/smbd
sleep 2
$SRCDIR/script/tests/test_rpc.sh localhost administrator $PASSWORD $DOMAIN || exit 1
$SRCDIR/script/tests/test_binding_string.sh localhost administrator $PASSWORD $DOMAIN || exit 1
$SRCDIR/script/tests/test_echo.sh localhost administrator $PASSWORD $DOMAIN || exit 1
$SRCDIR/script/tests/test_posix.sh //localhost/tmp administrator $PASSWORD || exit 1
$PREFIX/bin/smbtorture ncalrpc: LOCAL-* || exit 1
kill `cat $PREFIX/var/locks/smbd.pid`