svn commit: samba r8992 - in branches/SAMBA_3_0/source: .
script/tests
jerry at samba.org
jerry at samba.org
Wed Aug 3 06:24:29 GMT 2005
Author: jerry
Date: 2005-08-03 06:24:28 +0000 (Wed, 03 Aug 2005)
New Revision: 8992
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8992
Log:
More make test work. Adding a way to order tests (might change
my mind on this later).
Added:
branches/SAMBA_3_0/source/script/tests/functions
branches/SAMBA_3_0/source/script/tests/t_001.sh
Removed:
branches/SAMBA_3_0/source/script/tests/t_listing.sh
Modified:
branches/SAMBA_3_0/source/Makefile.in
branches/SAMBA_3_0/source/script/tests/runtests.sh
Changeset:
Modified: branches/SAMBA_3_0/source/Makefile.in
===================================================================
--- branches/SAMBA_3_0/source/Makefile.in 2005-08-03 05:51:50 UTC (rev 8991)
+++ branches/SAMBA_3_0/source/Makefile.in 2005-08-03 06:24:28 UTC (rev 8992)
@@ -776,7 +776,7 @@
##
test: all
@echo Running Samba 3 Test suite
- sh ./script/tests/runtests.sh t_dir
+ @sh ./script/tests/runtests.sh t_dir
# These dependencies are only approximately correct: we want to make
Added: branches/SAMBA_3_0/source/script/tests/functions
===================================================================
--- branches/SAMBA_3_0/source/script/tests/functions 2005-08-03 05:51:50 UTC (rev 8991)
+++ branches/SAMBA_3_0/source/script/tests/functions 2005-08-03 06:24:28 UTC (rev 8992)
@@ -0,0 +1,4 @@
+##
+## library file for test functions
+##
+
Modified: branches/SAMBA_3_0/source/script/tests/runtests.sh
===================================================================
--- branches/SAMBA_3_0/source/script/tests/runtests.sh 2005-08-03 05:51:50 UTC (rev 8991)
+++ branches/SAMBA_3_0/source/script/tests/runtests.sh 2005-08-03 06:24:28 UTC (rev 8992)
@@ -1,21 +1,28 @@
#!/bin/sh
-DOMAIN=SAMBA-TEST
-export DOMAIN
-
if [ "x$1" == "x" ]; then
echo "$0 <directory>"
exit 1
fi
+##
+## create the test directory
+##
PREFIX=`echo $1 | sed s+//+/+`
-
mkdir -p $PREFIX || exit $?
OLD_PWD=`pwd`
cd $PREFIX || exit $?
export PREFIX_ABS=`pwd`
cd $OLD_PWD
+##
+## setup the various environment variables we need
+##
+
+DOMAIN=SAMBA-TEST
+
+SRCDIR=`pwd`
+SCRIPTDIR=$SRCDIR/script/tests
TMPDIR=$PREFIX_ABS/tmp
LIBDIR=$PREFIX_ABS/lib
PIDDIR=$PREFIX_ABS/pid
@@ -31,11 +38,17 @@
rm -rf $PREFIX/*
mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $LOCKDIR $TMPDIR $LOGDIR $SOCKET_WRAPPER_DIR
-export PREFIX_ABS CONFIGURATION CONFFILE PATH SOCKET_WRAPPER_DIR
+export PREFIX_ABS CONFIGURATION CONFFILE PATH SOCKET_WRAPPER_DIR DOMAIN
export PRIVATEDIR LIBDIR PIDDIR LOCKDIR TMPDIR LOGDIR
+export SRCDIR SCRIPTDIR
-cd script/tests
-for testfile in t_*sh; do
+for testfile in `ls $SCRIPTDIR/t_*sh | sort`; do
+ echo ">>>>>> Starting test driver `basename $testfile` <<<<<"
sh $testfile
+ if [ $? = 0 ]; then
+ echo ">>>>> test ok <<<<<"
+ else
+ echo ">>>>> test failed <<<<<"
+ fi
done
Copied: branches/SAMBA_3_0/source/script/tests/t_001.sh (from rev 8991, branches/SAMBA_3_0/source/script/tests/t_listing.sh)
===================================================================
--- branches/SAMBA_3_0/source/script/tests/t_listing.sh 2005-08-03 05:51:50 UTC (rev 8991)
+++ branches/SAMBA_3_0/source/script/tests/t_001.sh 2005-08-03 06:24:28 UTC (rev 8992)
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+. $SCRIPTDIR/functions
+
+cat >$CONFFILE<<EOF
+[global]
+ netbios name = LOCALHOST
+ workgroup = $DOMAIN
+
+ private dir = $PRIVATEDIR
+ pid directory = $PIDDIR
+ lock directory = $LOCKDIR
+ log file = $LOGDIR/log.%m
+
+ interfaces = lo
+ bind interfaces only = yes
+
+ panic action = $PREFIX_ABS/script/tests/gdb_backtrace /proc/%d/exe %d
+
+[test]
+ path = $TMPDIR
+ read only = no
+EOF
+
+
+smbd $CONFIGURATION || exit $?
+sleep 1
+smbclient $CONFIGURATION -L localhost -N -p 139
+
+killall smbd
Deleted: branches/SAMBA_3_0/source/script/tests/t_listing.sh
===================================================================
--- branches/SAMBA_3_0/source/script/tests/t_listing.sh 2005-08-03 05:51:50 UTC (rev 8991)
+++ branches/SAMBA_3_0/source/script/tests/t_listing.sh 2005-08-03 06:24:28 UTC (rev 8992)
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-cat >$CONFFILE<<EOF
-[global]
- netbios name = LOCALHOST
- workgroup = $DOMAIN
-
- private dir = $PRIVATEDIR
- pid directory = $PIDDIR
- lock directory = $LOCKDIR
- log file = $LOGDIR/log.%m
-
- interfaces = lo
- bind interfaces only = yes
-
- panic action = $PREFIX_ABS/script/tests/gdb_backtrace /proc/%d/exe %d
-
-[test]
- path = $TMPDIR
- read only = no
-EOF
-
-
-smbd $CONFIGURATION || exit $?
-sleep 1
-smbclient $CONFIGURATION -L localhost -N -p 139
-
-killall smbd
More information about the samba-cvs
mailing list