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

if [ ! -z "$BUILD" ]
then
	./configure --prefix=$PREFIX --enable-socket-wrapper
	mkdir -p $PREFIX $TMPDIR
	make proto all install
fi

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

mkdir -p $SOCKET_WRAPPER_DIR
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
$PREFIX/bin/smbtorture ncalrpc: LOCAL-*
$SRCDIR/script/tests/test_rpc.sh localhost administrator $PASSWORD $DOMAIN
$SRCDIR/script/tests/test_binding_string.sh localhost administrator $PASSWORD $DOMAIN
$SRCDIR/script/tests/test_echo.sh localhost administrator $PASSWORD $DOMAIN
$SRCDIR/script/tests/test_posix.sh //localhost/tmp administrator $PASSWORD 
kill `cat $PREFIX/var/locks/smbd.pid`