svn commit: samba r6577 - in branches/SAMBA_4_0/source: build/smb_build librpc/idl script/tests

jelmer at samba.org jelmer at samba.org
Mon May 2 15:19:25 GMT 2005


Author: jelmer
Date: 2005-05-02 15:19:25 +0000 (Mon, 02 May 2005)
New Revision: 6577

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6577

Log:
Make test works without installation now. 
Running as a non-root user using socket_wrapper is possible by simple 
export SOCKET_WRAPPER_DIR before running 'make test'

Modified:
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm
   branches/SAMBA_4_0/source/librpc/idl/epmapper.idl
   branches/SAMBA_4_0/source/librpc/idl/rot.idl
   branches/SAMBA_4_0/source/script/tests/selftest.sh


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2005-05-02 15:06:11 UTC (rev 6576)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2005-05-02 15:19:25 UTC (rev 6577)
@@ -151,14 +151,8 @@
 basics: idl proto_exists
 
 test: all
-	./script/tests/selftest.sh $(prefix)
+	./script/tests/selftest.sh `pwd`/prefix-test
 	
-export SOCKET_WRAPPER_DIR=$(shell pwd)/sockdir
-
-test-swrap: all
-	mkdir -p $(SOCKET_WRAPPER_DIR)
-	./script/tests/selftest.sh $(prefix)
-
 __EOD__
 
 	return $output;

Modified: branches/SAMBA_4_0/source/librpc/idl/epmapper.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/epmapper.idl	2005-05-02 15:06:11 UTC (rev 6576)
+++ branches/SAMBA_4_0/source/librpc/idl/epmapper.idl	2005-05-02 15:19:25 UTC (rev 6577)
@@ -12,7 +12,7 @@
  uuid("e1af8308-5d1f-11c9-91a4-08002b14a0fa"), 
  version(3.0), 
  endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]", 
-		  "ncalrpc:[EPMAPPER]", "ncacn_unix_stream:[/tmp/epmapper]"),
+		  "ncalrpc:[EPMAPPER]"),
  helpstring("EndPoint Mapper"),
  pointer_default(unique)
 ]

Modified: branches/SAMBA_4_0/source/librpc/idl/rot.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/rot.idl	2005-05-02 15:06:11 UTC (rev 6576)
+++ branches/SAMBA_4_0/source/librpc/idl/rot.idl	2005-05-02 15:19:25 UTC (rev 6577)
@@ -6,7 +6,7 @@
     pointer_default(unique),
 	depends(orpc),
  	endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]", 
-		  "ncalrpc:[EPMAPPER]", "ncacn_unix_stream:[/tmp/epmapper]")
+		  "ncalrpc:[EPMAPPER]")
 ] interface rot
 {
 	WERROR rot_add (

Modified: branches/SAMBA_4_0/source/script/tests/selftest.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/selftest.sh	2005-05-02 15:06:11 UTC (rev 6576)
+++ branches/SAMBA_4_0/source/script/tests/selftest.sh	2005-05-02 15:19:25 UTC (rev 6577)
@@ -1,9 +1,9 @@
 #!/bin/sh
 DOMAIN=SAMBADOMAIN
+USERNAME=administrator
 REALM=$DOMAIN
 PASSWORD=penguin
 SRCDIR=`pwd`
-TMPDIR=$PREFIX/tmp
 
 if [ $# -lt 1 ]
 then
@@ -12,26 +12,40 @@
 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
 
-rm -f $PREFIX/private/*
-./setup/provision.pl --quiet --outputdir $PREFIX/private --domain $DOMAIN --realm $REALM --adminpass $PASSWORD
+mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $NCALRPCDIR $LOCKDIR $TMPDIR
+rm -f $PRIVATEDIR/*
+./setup/provision.pl --quiet --outputdir $PRIVATEDIR --domain $DOMAIN --realm $REALM --adminpass $PASSWORD
 
-cat >$PREFIX/lib/smb.conf <<EOF
+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
 EOF
 
-export SOCKET_WRAPPER_DIR
-cd $PREFIX
-./sbin/smbd
+ADDARG="-s $CONFFILE"
+
+$SRCDIR/bin/smbd -s $CONFFILE -M single || exit 1
 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`
+$SRCDIR/script/tests/test_rpc.sh localhost $USERNAME $PASSWORD $DOMAIN $ADDARG || exit 1
+$SRCDIR/script/tests/test_binding_string.sh localhost $USERNAME $PASSWORD $DOMAIN $ADDARG || exit 1
+$SRCDIR/script/tests/test_echo.sh localhost $USERNAME $PASSWORD $DOMAIN $ADDARG || exit 1
+$SRCDIR/script/tests/test_posix.sh //localhost/tmp $USERNAME $PASSWORD $ADDARG || exit 1
+$SRCDIR/bin/smbtorture $ADDARG ncalrpc: LOCAL-* || exit 1
+kill `cat $PIDDIR/smbd.pid`



More information about the samba-cvs mailing list