mirror of
https://github.com/samba-team/samba.git
synced 2025-12-05 12:23:50 +03:00
r8992: More make test work. Adding a way to order tests (might change
my mind on this later).
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
11c8863949
commit
136fe3f15e
@@ -776,7 +776,7 @@ pch:
|
|||||||
##
|
##
|
||||||
test: all
|
test: all
|
||||||
@echo Running Samba 3 Test suite
|
@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
|
# These dependencies are only approximately correct: we want to make
|
||||||
|
|||||||
4
source/script/tests/functions
Normal file
4
source/script/tests/functions
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
##
|
||||||
|
## library file for test functions
|
||||||
|
##
|
||||||
|
|
||||||
@@ -1,21 +1,28 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
DOMAIN=SAMBA-TEST
|
|
||||||
export DOMAIN
|
|
||||||
|
|
||||||
if [ "x$1" == "x" ]; then
|
if [ "x$1" == "x" ]; then
|
||||||
echo "$0 <directory>"
|
echo "$0 <directory>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
##
|
||||||
|
## create the test directory
|
||||||
|
##
|
||||||
PREFIX=`echo $1 | sed s+//+/+`
|
PREFIX=`echo $1 | sed s+//+/+`
|
||||||
|
|
||||||
mkdir -p $PREFIX || exit $?
|
mkdir -p $PREFIX || exit $?
|
||||||
OLD_PWD=`pwd`
|
OLD_PWD=`pwd`
|
||||||
cd $PREFIX || exit $?
|
cd $PREFIX || exit $?
|
||||||
export PREFIX_ABS=`pwd`
|
export PREFIX_ABS=`pwd`
|
||||||
cd $OLD_PWD
|
cd $OLD_PWD
|
||||||
|
|
||||||
|
##
|
||||||
|
## setup the various environment variables we need
|
||||||
|
##
|
||||||
|
|
||||||
|
DOMAIN=SAMBA-TEST
|
||||||
|
|
||||||
|
SRCDIR=`pwd`
|
||||||
|
SCRIPTDIR=$SRCDIR/script/tests
|
||||||
TMPDIR=$PREFIX_ABS/tmp
|
TMPDIR=$PREFIX_ABS/tmp
|
||||||
LIBDIR=$PREFIX_ABS/lib
|
LIBDIR=$PREFIX_ABS/lib
|
||||||
PIDDIR=$PREFIX_ABS/pid
|
PIDDIR=$PREFIX_ABS/pid
|
||||||
@@ -31,11 +38,17 @@ PATH=`pwd`/bin:$PATH
|
|||||||
rm -rf $PREFIX/*
|
rm -rf $PREFIX/*
|
||||||
mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $LOCKDIR $TMPDIR $LOGDIR $SOCKET_WRAPPER_DIR
|
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 PRIVATEDIR LIBDIR PIDDIR LOCKDIR TMPDIR LOGDIR
|
||||||
|
export SRCDIR SCRIPTDIR
|
||||||
|
|
||||||
cd script/tests
|
for testfile in `ls $SCRIPTDIR/t_*sh | sort`; do
|
||||||
for testfile in t_*sh; do
|
echo ">>>>>> Starting test driver `basename $testfile` <<<<<"
|
||||||
sh $testfile
|
sh $testfile
|
||||||
|
if [ $? = 0 ]; then
|
||||||
|
echo ">>>>> test ok <<<<<"
|
||||||
|
else
|
||||||
|
echo ">>>>> test failed <<<<<"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
. $SCRIPTDIR/functions
|
||||||
|
|
||||||
cat >$CONFFILE<<EOF
|
cat >$CONFFILE<<EOF
|
||||||
[global]
|
[global]
|
||||||
netbios name = LOCALHOST
|
netbios name = LOCALHOST
|
||||||
Reference in New Issue
Block a user