diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-05-02 15:19:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:16:27 -0500 |
commit | bd638ea71c91d8c0a37eb59343ae561a260461c3 (patch) | |
tree | 44c22dc038c7d48a02e4ccb712c7160df444c79e /source4 | |
parent | d70232a747eee67624ea8798e0459674031ead1c (diff) | |
download | samba-bd638ea71c91d8c0a37eb59343ae561a260461c3.tar.gz samba-bd638ea71c91d8c0a37eb59343ae561a260461c3.tar.bz2 samba-bd638ea71c91d8c0a37eb59343ae561a260461c3.zip |
r6577: 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'
(This used to be commit 6d93fcc407cfd98e42045c65456cfb0c45f0ff1a)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/build/smb_build/makefile.pm | 8 | ||||
-rw-r--r-- | source4/librpc/idl/epmapper.idl | 2 | ||||
-rw-r--r-- | source4/librpc/idl/rot.idl | 2 | ||||
-rwxr-xr-x | source4/script/tests/selftest.sh | 40 |
4 files changed, 30 insertions, 22 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index bc5690ddf3..3b36a94334 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -151,14 +151,8 @@ pch_clean: 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; diff --git a/source4/librpc/idl/epmapper.idl b/source4/librpc/idl/epmapper.idl index a35b9c47a3..7881e47fe6 100644 --- a/source4/librpc/idl/epmapper.idl +++ b/source4/librpc/idl/epmapper.idl @@ -12,7 +12,7 @@ http://www.opengroup.org/onlinepubs/9629399/chap6.htm#tagcjh_11_02_03_01: bindin 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) ] diff --git a/source4/librpc/idl/rot.idl b/source4/librpc/idl/rot.idl index aa257dcf2f..fd9fd42467 100644 --- a/source4/librpc/idl/rot.idl +++ b/source4/librpc/idl/rot.idl @@ -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 ( diff --git a/source4/script/tests/selftest.sh b/source4/script/tests/selftest.sh index a52f38b3b1..d1a60c02e8 100755 --- a/source4/script/tests/selftest.sh +++ b/source4/script/tests/selftest.sh @@ -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 @@ then 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` |