From cfec6c3083544599a4047863e1f109ee8fb80283 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 5 Nov 2007 09:49:08 +0100 Subject: make test: activate nss_wrapper for make test metze (This used to be commit 02cfd283627bd8f10d7beb8d43cead35dd867346) --- source3/Makefile.in | 4 ++-- source3/script/tests/selftest.sh | 31 ++++++++++++++++++++++++++++--- 2 files changed, 30 insertions(+), 5 deletions(-) (limited to 'source3') diff --git a/source3/Makefile.in b/source3/Makefile.in index 664f75ddc5..a850174439 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -2044,11 +2044,11 @@ test_pam_modules: pam_modules ## test: all torture timelimit @echo Running Test suite - @sh $(srcdir)/script/tests/selftest.sh ${selftest_prefix}/st all "${smbtorture4_path}" + @PERL="$(PERL)" $(srcdir)/script/tests/selftest.sh ${selftest_prefix}/st all "${smbtorture4_path}" valgrindtest: all torture timelimit @echo Running Test suite with valgrind @NMBD_VALGRIND="xterm -n nmbd -e valgrind -q --db-attach=yes --num-callers=30" \ SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \ VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/st/valgrind.log" \ - $(srcdir)/script/tests/selftest.sh ${selftest_prefix}/st all "${smbtorture4_path}" + PERL="$(PERL)" $(srcdir)/script/tests/selftest.sh ${selftest_prefix}/st all "${smbtorture4_path}" diff --git a/source3/script/tests/selftest.sh b/source3/script/tests/selftest.sh index 30355a829d..0801ec5c2c 100755 --- a/source3/script/tests/selftest.sh +++ b/source3/script/tests/selftest.sh @@ -30,6 +30,8 @@ export TORTURE_MAXTIME SERVER=localhost2 SERVER_IP=127.0.0.2 USERNAME=`PATH=/usr/ucb:$PATH whoami` +USERID=`PATH=/usr/ucb:$PATH id -u` +GROUPID=`PATH=/usr/ucb:$PATH id -g` PASSWORD=test SRCDIR="`dirname $0`/../.." @@ -48,6 +50,8 @@ LOGDIR=$PREFIX_ABS/logs SOCKET_WRAPPER_DIR=$PREFIX/sw CONFIGURATION="-s $CONFFILE" SAMBA4CONFIGURATION="-s $SAMBA4CONFFILE" +NSS_WRAPPER_PASSWD="$PRIVATEDIR/passwd" +NSS_WRAPPER_GROUP="$PRIVATEDIR/group" export PREFIX PREFIX_ABS export CONFIGURATION CONFFILE SAMBA4CONFIGURATION SAMBA4CONFFILE @@ -57,6 +61,7 @@ export SRCDIR SCRIPTDIR BINDIR export USERNAME PASSWORD export SMBTORTURE4 export SERVER SERVER_IP +export NSS_WRAPPER_PASSWD NSS_WRAPPER_GROUP PATH=bin:$PATH export PATH @@ -73,6 +78,15 @@ if test "x`smbd -b | grep SOCKET_WRAPPER`" = "x"; then exit 1 fi +if test "x`smbd -b | grep NSS_WRAPPER`" = "x"; then + echo "***" + echo "*** You must include --enable-nss-wrapper when compiling Samba" + echo "*** in order to execute 'make test'. Exiting...." + echo "***" + exit 1 +fi + + ## ## create the test directory layout ## @@ -128,9 +142,9 @@ cat >$SERVERCONFFILE<$NSS_WRAPPER_PASSWD<$NSS_WRAPPER_GROUP</dev/null || exit 1 -- cgit