svn commit: samba r17934 - in branches/SAMBA_3_0/source: . script/tests

jerry at samba.org jerry at samba.org
Wed Aug 30 16:58:30 GMT 2006


Author: jerry
Date: 2006-08-30 16:58:29 +0000 (Wed, 30 Aug 2006)
New Revision: 17934

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

Log:
allow srcdir != builddir for 'make test'
Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/script/tests/selftest.sh
   branches/SAMBA_3_0/source/script/tests/test_functions.sh
   branches/SAMBA_3_0/source/script/tests/test_smbclient_s3.sh
   branches/SAMBA_3_0/source/script/tests/test_smbtorture_s3.sh


Changeset:
Modified: branches/SAMBA_3_0/source/Makefile.in
===================================================================
--- branches/SAMBA_3_0/source/Makefile.in	2006-08-30 16:02:08 UTC (rev 17933)
+++ branches/SAMBA_3_0/source/Makefile.in	2006-08-30 16:58:29 UTC (rev 17934)
@@ -1834,11 +1834,11 @@
 ##
 test: all torture timelimit
 	@echo Running Test suite
-	@sh ./script/tests/selftest.sh ${selftest_prefix}/st all "${smbtorture4_path}"
+	@sh $(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 smbd -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" \
-	 ./script/tests/selftest.sh ${selftest_prefix}/st all "${smbtorture4_path}"
+	 $(srcdir)/script/tests/selftest.sh ${selftest_prefix}/st all "${smbtorture4_path}"

Modified: branches/SAMBA_3_0/source/script/tests/selftest.sh
===================================================================
--- branches/SAMBA_3_0/source/script/tests/selftest.sh	2006-08-30 16:02:08 UTC (rev 17933)
+++ branches/SAMBA_3_0/source/script/tests/selftest.sh	2006-08-30 16:58:29 UTC (rev 17934)
@@ -32,7 +32,8 @@
 USERNAME=`PATH=/usr/ucb:$PATH whoami`
 PASSWORD=test
 
-SRCDIR=`pwd`
+SRCDIR="`dirname $0`/../.."
+BINDIR="`pwd`/bin"
 SCRIPTDIR=$SRCDIR/script/tests
 SHRDIR=$PREFIX_ABS/tmp
 LIBDIR=$PREFIX_ABS/lib
@@ -48,7 +49,7 @@
 
 export PREFIX PREFIX_ABS CONFIGURATION CONFFILE PATH SOCKET_WRAPPER_DIR DOMAIN
 export PRIVATEDIR LIBDIR PIDDIR LOCKDIR LOGDIR SERVERCONFFILE
-export SRCDIR SCRIPTDIR
+export SRCDIR SCRIPTDIR BINDIR
 export USERNAME PASSWORD
 export SMBTORTURE4
 export SERVER SERVER_IP

Modified: branches/SAMBA_3_0/source/script/tests/test_functions.sh
===================================================================
--- branches/SAMBA_3_0/source/script/tests/test_functions.sh	2006-08-30 16:02:08 UTC (rev 17933)
+++ branches/SAMBA_3_0/source/script/tests/test_functions.sh	2006-08-30 16:58:29 UTC (rev 17934)
@@ -43,7 +43,7 @@
 			if test x"$NMBD_MAXTIME" = x; then
 			    NMBD_MAXTIME=2700
 			fi
-			timelimit $NMBD_MAXTIME $NMBD_VALGRIND $SRCDIR/bin/nmbd -F -S --no-process-group -d0 -s $SERVERCONFFILE > $NMBD_TEST_LOG 2>&1 &
+			timelimit $NMBD_MAXTIME $NMBD_VALGRIND $BINDIR/nmbd -F -S --no-process-group -d0 -s $SERVERCONFFILE > $NMBD_TEST_LOG 2>&1 &
 			TIMELIMIT_NMBD_PID=$!
 			echo $TIMELIMIT_NMBD_PID > $PIDDIR/timelimit.nmbd.pid
 			wait $TIMELIMIT_NMBD_PID
@@ -72,7 +72,7 @@
 			if test x"$SMBD_MAXTIME" = x; then
 			    SMBD_MAXTIME=2700
 			fi
-			timelimit $SMBD_MAXTIME $SMBD_VALGRIND $SRCDIR/bin/smbd -F -S --no-process-group -d0 -s $SERVERCONFFILE > $SMBD_TEST_LOG 2>&1 &
+			timelimit $SMBD_MAXTIME $SMBD_VALGRIND $BINDIR/smbd -F -S --no-process-group -d0 -s $SERVERCONFFILE > $SMBD_TEST_LOG 2>&1 &
 			TIMELIMIT_SMBD_PID=$!
 			echo $TIMELIMIT_SMBD_PID > $PIDDIR/timelimit.smbd.pid
 			wait $TIMELIMIT_SMBD_PID

Modified: branches/SAMBA_3_0/source/script/tests/test_smbclient_s3.sh
===================================================================
--- branches/SAMBA_3_0/source/script/tests/test_smbclient_s3.sh	2006-08-30 16:02:08 UTC (rev 17933)
+++ branches/SAMBA_3_0/source/script/tests/test_smbclient_s3.sh	2006-08-30 16:58:29 UTC (rev 17934)
@@ -11,7 +11,7 @@
 
 SERVER="$1"
 SERVER_IP="$2"
-SMBCLIENT="$VALGRIND ${SMBCLIENT:-$SRCDIR/bin/smbclient} $CONFIGURATION"
+SMBCLIENT="$VALGRIND ${SMBCLIENT:-$BINDIR/smbclient} $CONFIGURATION"
 
 incdir=`dirname $0`
 . $incdir/test_functions.sh

Modified: branches/SAMBA_3_0/source/script/tests/test_smbtorture_s3.sh
===================================================================
--- branches/SAMBA_3_0/source/script/tests/test_smbtorture_s3.sh	2006-08-30 16:02:08 UTC (rev 17933)
+++ branches/SAMBA_3_0/source/script/tests/test_smbtorture_s3.sh	2006-08-30 16:58:29 UTC (rev 17934)
@@ -41,7 +41,7 @@
     fi
     start=""
     name="$t"
-    testit "$name" $VALGRIND $SRCDIR/bin/smbtorture $ADDARGS $unc -U"$username"%"$password" $t || failed=`expr $failed + 1`
+    testit "$name" $VALGRIND $BINDIR/smbtorture $ADDARGS $unc -U"$username"%"$password" $t || failed=`expr $failed + 1`
 done
 
 testok $0 $failed



More information about the samba-cvs mailing list