blackbox: removed assumption of build directory
authorAndrew Tridgell <tridge@samba.org>
Thu, 3 Feb 2011 06:30:53 +0000 (17:30 +1100)
committerAndrew Tridgell <tridge@samba.org>
Mon, 7 Feb 2011 02:22:00 +0000 (13:22 +1100)
this fixes the blackbox tests for a top level build

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

testprogs/blackbox/subunit.sh
testprogs/blackbox/test_chgdcpass.sh
testprogs/blackbox/test_kinit.sh
testprogs/blackbox/test_ktpass.sh
testprogs/blackbox/test_pkinit.sh

index 990bee57a6290590ee2f3b1e7c503b9e15be38ab..b8e5b5b322858483dbeeb6cdeb7eb1db2776d99a 100755 (executable)
@@ -83,3 +83,11 @@ testit_expect_failure () {
        fi
        return $status
 }
+
+# work out the top level source directory
+if [ -d source4 ]; then
+    SRCDIR="."
+else
+    SRCDIR=".."
+fi
+export SRCDIR
index 7b89e5dcdd00406778c8f2d7fb4a6df1e97f6366..c609efc312b789bac0f6899ad2dd4d57eddaae8a 100755 (executable)
@@ -21,9 +21,11 @@ shift 7
 failed=0
 
 samba4bindir="$BUILDDIR/bin"
+samba4srcdir="$SRCDIR/source4"
 smbclient="$samba4bindir/smbclient$EXEEXT"
 samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
-machineaccountccache="$BUILDDIR/scripting/bin/machineaccountccache"
+
+machineaccountccache="$samba4srcdir/scripting/bin/machineaccountccache"
 
 . `dirname $0`/subunit.sh
 
@@ -52,7 +54,7 @@ testit "kinit with keytab" $samba4kinit $enctype -t $PROVDIR/private/secrets.key
 
 #This is important because it puts the ticket for the old KVNO and password into a local ccache
 test_smbclient "Test login with kerberos ccache before password change" 'ls' -k yes || failed=`expr $failed + 1`
-testit "change dc password" ./scripting/devel/chgtdcpass -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
+testit "change dc password" $samba4srcdir/scripting/devel/chgtdcpass -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
 
 #This is important because it shows that the old ticket remains valid (as it must) for incoming connections after the DC password is changed
 test_smbclient "Test login with kerberos ccache after password change" 'ls' -k yes || failed=`expr $failed + 1`
index baabbb0252f06b61a500101759059c9af83dfa4f..635e228e069c2e88b007210a341fb0d7c39d4fcf 100755 (executable)
@@ -21,6 +21,7 @@ shift 7
 failed=0
 
 samba4bindir="$BUILDDIR/bin"
+samba4srcdir="$SRCDIR/source4"
 smbclient="$samba4bindir/smbclient$EXEEXT"
 samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
 samba_tool="$samba4bindir/samba-tool$EXEEXT"
@@ -29,7 +30,7 @@ ldbsearch="$samba4bindir/ldbsearch$EXEEXT"
 rkpty="$samba4bindir/rkpty$EXEEXT"
 samba4kpasswd="$samba4bindir/samba4kpasswd$EXEEXT"
 enableaccount="$samba_tool enableaccount"
-machineaccountccache="$BUILDDIR/scripting/bin/machineaccountccache"
+machineaccountccache="$samba4srcdir/scripting/bin/machineaccountccache"
 
 . `dirname $0`/subunit.sh
 
index 579389f97eabf1386b9c39a925ee62accedabcf9..c44439544b49da8de46451df87aff28e31630ab8 100755 (executable)
@@ -15,6 +15,7 @@ shift 1
 
 samba_tool="$BUILDDIR/bin/samba-tool"
 samba4bindir="$BUILDDIR/bin"
+samba4srcdir="$SRCDIR/source4"
 samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
 CONFIG="--configfile=$PREFIX/dc/etc/smb.conf"
 
@@ -26,7 +27,7 @@ KRB5CCNAME="$PREFIX/tmpccache"
 export KRB5CCNAME
 echo "testp@ssw0Rd" >$PREFIX/tmppassfile
 testit "kinit with passwd" $samba4kinit -e arcfour-hmac-md5 --password-file=$PREFIX/tmppassfile   $TESTUSER@SAMBA.EXAMPLE.COM   || failed=`expr $failed + 1`
-testit "ktpass" $BUILDDIR/scripting/bin/ktpass.sh --host LOCALDC --out $PREFIX/testuser.kt --princ $TESTUSER --pass "testp@ssw0Rd" --path-to-ldbsearch=$BUILDDIR/bin|| failed=`expr $failed + 1`
+testit "ktpass" $samba4srcdir/scripting/bin/ktpass.sh --host LOCALDC --out $PREFIX/testuser.kt --princ $TESTUSER --pass "testp@ssw0Rd" --path-to-ldbsearch=$BUILDDIR/bin|| failed=`expr $failed + 1`
 
 rm -f $KRB5CCNAME
 
index 9a5741b16b9eed01ea595c1e4f8b021a1f223f95..41798eaf6e451813d247fea266a41742ee01ecab 100755 (executable)
@@ -21,6 +21,7 @@ shift 7
 failed=0
 
 samba4bindir="$BUILDDIR/bin"
+samba4srcdir="$SRCDIR/source4"
 smbclient="$samba4bindir/smbclient$EXEEXT"
 samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
 samba_tool="$samba4bindir/samba-tool$EXEEXT"
@@ -29,7 +30,7 @@ ldbsearch="$samba4bindir/ldbsearch$EXEEXT"
 rkpty="$samba4bindir/rkpty$EXEEXT"
 samba4kpasswd="$samba4bindir/samba4kpasswd$EXEEXT"
 enableaccount="$samba_tool enableaccount"
-machineaccountccache="$BUILDDIR/scripting/bin/machineaccountccache"
+machineaccountccache="$samba4srcdir/scripting/bin/machineaccountccache"
 
 . `dirname $0`/subunit.sh