summaryrefslogtreecommitdiff
path: root/source4/script/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-05-01 19:08:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:16:26 -0500
commit7fca1d46cea38229faf9a7092d86a452658f2ca0 (patch)
tree88de5023abd77282d81a260f795b7289b17991bc /source4/script/tests
parent0e5de220d988c51e9bc322dadfafd6d1ba0fa131 (diff)
downloadsamba-7fca1d46cea38229faf9a7092d86a452658f2ca0.tar.gz
samba-7fca1d46cea38229faf9a7092d86a452658f2ca0.tar.bz2
samba-7fca1d46cea38229faf9a7092d86a452658f2ca0.zip
r6564: - Fix bug in socket_wrapper
- Add options --quiet and --outputdir options to the provisioning script - Add simple 'make test' and 'make test-swrap' (This used to be commit 7d2d4a57e0e58a51c76c2e86ea447e81a1d79544)
Diffstat (limited to 'source4/script/tests')
-rwxr-xr-xsource4/script/tests/selftest.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/source4/script/tests/selftest.sh b/source4/script/tests/selftest.sh
new file mode 100755
index 0000000000..55e28696a8
--- /dev/null
+++ b/source4/script/tests/selftest.sh
@@ -0,0 +1,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`