summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-02-03 16:23:13 +0100
committerStefan Metzmacher <metze@samba.org>2009-02-03 16:31:04 +0100
commit8b408f781970b3f2b310389f9ae73ad0c5e42881 (patch)
treea983f8474e5863e8babc93f03524e0166f41b4ea /source4
parent7c72853b50b14653fe3c62fde3bf653b45c755f8 (diff)
downloadsamba-8b408f781970b3f2b310389f9ae73ad0c5e42881.tar.gz
samba-8b408f781970b3f2b310389f9ae73ad0c5e42881.tar.bz2
samba-8b408f781970b3f2b310389f9ae73ad0c5e42881.zip
s4:selftest: avoid hardcoded pathes in blackbox tests
metze
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/client/tests/test_cifsdd.sh4
-rwxr-xr-xsource4/client/tests/test_smbclient.sh4
-rwxr-xr-xsource4/librpc/tests/test_ndrdump.sh4
-rwxr-xr-xsource4/torture/tests/test_gentest.sh4
-rwxr-xr-xsource4/torture/tests/test_locktest.sh4
-rwxr-xr-xsource4/torture/tests/test_masktest.sh4
-rwxr-xr-xsource4/utils/tests/test_net.sh7
-rwxr-xr-xsource4/utils/tests/test_nmblookup.sh15
8 files changed, 25 insertions, 21 deletions
diff --git a/source4/client/tests/test_cifsdd.sh b/source4/client/tests/test_cifsdd.sh
index 08bfb25e80..2268b6a091 100755
--- a/source4/client/tests/test_cifsdd.sh
+++ b/source4/client/tests/test_cifsdd.sh
@@ -16,8 +16,8 @@ DOMAIN=$4
. `dirname $0`/../../../testprogs/blackbox/subunit.sh
-samba4bindir=`dirname $0`/../../bin
-DD=$samba4bindir/cifsdd
+samba4bindir="$BUILDDIR/bin"
+DD="$samba4bindir/cifsdd$EXEEXT"
SHARE=tmp
DEBUGLEVEL=1
diff --git a/source4/client/tests/test_smbclient.sh b/source4/client/tests/test_smbclient.sh
index 7ff03ba6e2..7775422e33 100755
--- a/source4/client/tests/test_smbclient.sh
+++ b/source4/client/tests/test_smbclient.sh
@@ -18,8 +18,8 @@ PREFIX=$5
shift 5
failed=0
-samba4bindir=`dirname $0`/../../bin
-smbclient=$samba4bindir/smbclient
+samba4bindir="$BUILDDIR/bin"
+smbclient="$samba4bindir/smbclient$EXEEXT"
. `dirname $0`/../../../testprogs/blackbox/subunit.sh
diff --git a/source4/librpc/tests/test_ndrdump.sh b/source4/librpc/tests/test_ndrdump.sh
index 511856061c..dccf86df88 100755
--- a/source4/librpc/tests/test_ndrdump.sh
+++ b/source4/librpc/tests/test_ndrdump.sh
@@ -8,8 +8,8 @@
failed=0
-samba4bindir=`dirname $0`/../../bin
-ndrdump=$samba4bindir/ndrdump
+samba4bindir="$BUILDDIR/bin"
+ndrdump="$samba4bindir/ndrdump$EXEEXT"
files=`dirname $0`/
testit "ndrdump with in" $VALGRIND $ndrdump samr samr_CreateUser in $files/samr-CreateUser-in.dat $@ || failed=`expr $failed + 1`
diff --git a/source4/torture/tests/test_gentest.sh b/source4/torture/tests/test_gentest.sh
index 2f4d00dc77..c7f66c8445 100755
--- a/source4/torture/tests/test_gentest.sh
+++ b/source4/torture/tests/test_gentest.sh
@@ -17,8 +17,8 @@ DOMAIN=$4
shift 4
failed=0
-samba4bindir=`dirname $0`/../../bin
-gentest=$samba4bindir/gentest
+samba4bindir="$BUILDDIR/bin"
+gentest="$samba4bindir/gentest$EXEEXT"
. `dirname $0`/../../../testprogs/blackbox/subunit.sh
diff --git a/source4/torture/tests/test_locktest.sh b/source4/torture/tests/test_locktest.sh
index 1fe39b4d1d..a8f11ee0ba 100755
--- a/source4/torture/tests/test_locktest.sh
+++ b/source4/torture/tests/test_locktest.sh
@@ -18,8 +18,8 @@ PREFIX=$5
shift 5
failed=0
-samba4bindir=`dirname $0`/../../bin
-locktest=$samba4bindir/locktest
+samba4bindir="$BUILDDIR/bin"
+locktest="$samba4bindir/locktest$EXEEXT"
. `dirname $0`/../../../testprogs/blackbox/subunit.sh
diff --git a/source4/torture/tests/test_masktest.sh b/source4/torture/tests/test_masktest.sh
index 59165e47df..e4fa65ccfb 100755
--- a/source4/torture/tests/test_masktest.sh
+++ b/source4/torture/tests/test_masktest.sh
@@ -18,8 +18,8 @@ PREFIX=$5
shift 5
failed=0
-samba4bindir=`dirname $0`/../../bin
-masktest=$samba4bindir/masktest
+samba4bindir="$BUILDDIR/bin"
+masktest="$samba4bindir/masktest$EXEEXT"
. `dirname $0`/../../../testprogs/blackbox/subunit.sh
diff --git a/source4/utils/tests/test_net.sh b/source4/utils/tests/test_net.sh
index 3406c87cda..eb598bf5e1 100755
--- a/source4/utils/tests/test_net.sh
+++ b/source4/utils/tests/test_net.sh
@@ -9,8 +9,9 @@ shift 4
failed=0
-samba4bindir=`dirname $0`/../../bin
-smbclient=$samba4bindir/smbclient
+samba4bindir="$BUILDDIR/bin"
+smbclient="$samba4bindir/smbclient$EXEEXT"
+net="$samba4bindir/net$EXEEXT"
testit() {
name="$1"
@@ -28,7 +29,7 @@ testit() {
return $status
}
-testit "domain join" $VALGRIND bin/net join $DOMAIN $CONFIGURATION -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@ || failed=`expr $failed + 1`
+testit "domain join" $VALGRIND $net join $DOMAIN $CONFIGURATION -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@ || failed=`expr $failed + 1`
testit "Test login with --machine-pass without kerberos" $VALGRIND $smbclient -c 'ls' $CONFIGURATION //$SERVER/tmp --machine-pass -k no || failed=`expr $failed + 1`
diff --git a/source4/utils/tests/test_nmblookup.sh b/source4/utils/tests/test_nmblookup.sh
index ad9b3ba799..e2230e162f 100755
--- a/source4/utils/tests/test_nmblookup.sh
+++ b/source4/utils/tests/test_nmblookup.sh
@@ -26,11 +26,14 @@ testit() {
return $status
}
-testit "nmblookup -U \$SERVER_IP \$SERVER" bin/nmblookup $TORTURE_OPTIONS -U $SERVER_IP $SERVER
-testit "nmblookup -U \$SERVER_IP \$NETBIOSNAME" bin/nmblookup $TORTURE_OPTIONS -U $SERVER_IP $NETBIOSNAME
-testit "nmblookup -U \$SERVER_IP \$NETBIOSALIAS" bin/nmblookup $TORTURE_OPTIONS -U $SERVER_IP $NETBIOSALIAS
-testit "nmblookup \$SERVER" bin/nmblookup $TORTURE_OPTIONS $SERVER
-testit "nmblookup \$NETBIOSNAME" bin/nmblookup $TORTURE_OPTIONS $NETBIOSNAME
-testit "nmblookup \$NETBIOSALIAS" bin/nmblookup $TORTURE_OPTIONS $NETBIOSALIAS
+samba4bindir="$BUILDDIR/bin"
+nmblookup="$samba4bindir/nmblookup$EXEEXT"
+
+testit "nmblookup -U \$SERVER_IP \$SERVER" $nmblookup $TORTURE_OPTIONS -U $SERVER_IP $SERVER
+testit "nmblookup -U \$SERVER_IP \$NETBIOSNAME" $nmblookup $TORTURE_OPTIONS -U $SERVER_IP $NETBIOSNAME
+testit "nmblookup -U \$SERVER_IP \$NETBIOSALIAS" $nmblookup $TORTURE_OPTIONS -U $SERVER_IP $NETBIOSALIAS
+testit "nmblookup \$SERVER" $nmblookup $TORTURE_OPTIONS $SERVER
+testit "nmblookup \$NETBIOSNAME" $nmblookup $TORTURE_OPTIONS $NETBIOSNAME
+testit "nmblookup \$NETBIOSALIAS" $nmblookup $TORTURE_OPTIONS $NETBIOSALIAS
exit $failed