summaryrefslogtreecommitdiff
path: root/source3/script
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-08-30 16:58:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:39:00 -0500
commitf2b3143cf72c9d8f391b867353757770d1f0b012 (patch)
treef5d575590ce00eef1b17b96d6625016dfb3a9f36 /source3/script
parentbc28b5c7008e5df45fbd6bf413d8177e8ba7c367 (diff)
downloadsamba-f2b3143cf72c9d8f391b867353757770d1f0b012.tar.gz
samba-f2b3143cf72c9d8f391b867353757770d1f0b012.tar.bz2
samba-f2b3143cf72c9d8f391b867353757770d1f0b012.zip
r17934: allow srcdir != builddir for 'make test'
(This used to be commit 70f223554922947a17e81f1002b184db879a2195)
Diffstat (limited to 'source3/script')
-rwxr-xr-xsource3/script/tests/selftest.sh5
-rw-r--r--source3/script/tests/test_functions.sh4
-rwxr-xr-xsource3/script/tests/test_smbclient_s3.sh2
-rwxr-xr-xsource3/script/tests/test_smbtorture_s3.sh2
4 files changed, 7 insertions, 6 deletions
diff --git a/source3/script/tests/selftest.sh b/source3/script/tests/selftest.sh
index 38aa4d2727..ccbc90bda9 100755
--- a/source3/script/tests/selftest.sh
+++ b/source3/script/tests/selftest.sh
@@ -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
diff --git a/source3/script/tests/test_functions.sh b/source3/script/tests/test_functions.sh
index 368832a506..06c77c89d5 100644
--- a/source3/script/tests/test_functions.sh
+++ b/source3/script/tests/test_functions.sh
@@ -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
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh
index d95657467d..01efebcd53 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -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
diff --git a/source3/script/tests/test_smbtorture_s3.sh b/source3/script/tests/test_smbtorture_s3.sh
index 842d914ecf..cd45f3419e 100755
--- a/source3/script/tests/test_smbtorture_s3.sh
+++ b/source3/script/tests/test_smbtorture_s3.sh
@@ -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