1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r17934: allow srcdir != builddir for 'make test'

This commit is contained in:
Gerald Carter 2006-08-30 16:58:29 +00:00 committed by Gerald (Jerry) Carter
parent 2829dbc3e0
commit 70f2235549
5 changed files with 9 additions and 8 deletions

View File

@ -1834,11 +1834,11 @@ test_pam_modules: pam_modules
##
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}"

View File

@ -32,7 +32,8 @@ SERVER_IP=127.0.0.2
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 @@ CONFIGURATION="-s $CONFFILE"
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

View File

@ -43,7 +43,7 @@ samba3_check_or_start() {
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 @@ samba3_check_or_start() {
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

View File

@ -11,7 +11,7 @@ fi
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

View File

@ -41,7 +41,7 @@ for t in $tests; do
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