r21700: Run mktestsetup as an external program. This guarantees that it can be used...
authorJelmer Vernooij <jelmer@samba.org>
Mon, 5 Mar 2007 13:51:05 +0000 (13:51 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:49:15 +0000 (14:49 -0500)
source/script/tests/mktestsetup.sh
source/script/tests/selftest.sh
source/script/tests/test_ejs.sh
source/script/tests/test_ldap.sh
testprogs/blackbox/test_ldb.sh

index 4c9a828315a64e10e9592dcd0b550f4c1e80bec0..a92def64fd2e0591ff8435870ecac6b83030ddc3 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# Build a test environment for running Samba
 
 if [ $# -lt 1 ]
 then
@@ -39,11 +40,9 @@ srcdir=`dirname $0`/../..
 mkdir -p $PREFIX || exit $?
 cd $PREFIX
 PREFIX_ABS=`pwd`
-export PREFIX_ABS
 cd $oldpwd
 
 TEST_DATA_PREFIX=$PREFIX_ABS
-export TEST_DATA_PREFIX
 
 TMPDIR=$PREFIX_ABS/tmp
 ETCDIR=$PREFIX_ABS/etc
@@ -58,13 +57,6 @@ WINBINDD_SOCKET_DIR=$PREFIX_ABS/winbind_socket
 CONFIGURATION="--configfile=$CONFFILE"
 LDAPDIR=$PREFIX_ABS/ldap
 
-export CONFIGURATION
-export CONFFILE
-export PIDDIR
-export AUTH
-export SERVER
-export NETBIOSNAME
-
 rm -rf $PREFIX/*
 mkdir -p $PRIVATEDIR $ETCDIR $PIDDIR $NCALRPCDIR $LOCKDIR $TMPDIR $LDAPDIR/db $LDAPDIR/db/bdb-logs $LDAPDIR/db/tmp
 
@@ -239,7 +231,6 @@ cat >$KRB5_CONFIG<<EOF
 [domain_realm]
  .samba.example.com = SAMBA.EXAMPLE.COM
 EOF
-export KRB5_CONFIG
 
 . `dirname $0`/mk-keyblobs.sh
 
@@ -301,11 +292,7 @@ echo "REALM=$REALM"
 echo "DNSNAME=$DNSNAME"
 echo "BASEDN=$BASEDN"
 echo "PASSWORD=$PASSWORD"
-echo "AUTH=$AUTH"
 echo "SRCDIR=$SRCDIR"
-echo "ROOT=$ROOT"
-echo "SERVER=$SERVER"
-echo "NETBIOSNAME=$NETBIOSNAME"
 echo "PREFIX=$PREFIX"
 echo "SMBD_LOGLEVEL=$SMBD_LOGLEVEL"
 echo "LDAPDIR=$LDAPDIR"
index 7af5891abb927884f4ecd6b985d5dadd5deeff60..fa94412136dd9f21fe4e6481c04f9f06f9059afb 100755 (executable)
@@ -52,9 +52,19 @@ export PKG_CONFIG_PATH
 
 incdir=`dirname $ARG0`
 echo -n "PROVISIONING..."
-. $incdir/mktestsetup.sh $PREFIX >/dev/null || exit 1
+eval `$incdir/mktestsetup.sh $PREFIX || exit 1`
 echo "DONE"
 
+export KRB5_CONFIG
+export PREFIX_ABS
+export TEST_DATA_PREFIX
+export CONFIGURATION
+export CONFFILE
+export PIDDIR
+export AUTH
+export SERVER
+export NETBIOSNAME
+
 PATH=bin:$PATH
 export PATH
 
index f08fdec3ba6bc955e08b7cf2938a600f343c8553..6cd727e3e3c4d89cbe06cb1ec25bef0fbd74412f 100755 (executable)
@@ -3,7 +3,7 @@
 
 if [ $# -lt 3 ]; then
 cat <<EOF
-Usage: test_ejs.sh DOMAIN USERNAME PASSWORD
+Usage: test_ejs.sh DOMAIN USERNAME PASSWORD [OPTIONS]
 EOF
 exit 1;
 fi
@@ -11,6 +11,8 @@ fi
 DOMAIN="$1"
 USERNAME="$2"
 PASSWORD="$3"
+shift 3
+CONFIGURATION="$*"
 
 incdir=`dirname $0`
 . $incdir/test_functions.sh
index a0a7fac3bf3ff86db9d4d5731ee1c27ba049d54e..e50d062fca2cdc64a3e43592127aa49ae9c645b1 100755 (executable)
@@ -18,13 +18,13 @@ incdir=`dirname $0`
 
 p=ldap
 for options in "" "--option=socket:testnonblock=true" "-U$USERNAME%$PASSWORD --option=socket:testnonblock=true" "-U$USERNAME%$PASSWORD"; do
-    testit "TESTING PROTOCOL $p with options $options" ../testprogs/blackbox/test_ldb.sh $p $options
+    testit "TESTING PROTOCOL $p with options $options" ../testprogs/blackbox/test_ldb.sh $p $SERVER $options
 done
 # see if we support ldaps
 if grep ENABLE_GNUTLS.1 include/config.h > /dev/null; then
     p=ldaps
     for options in "" "-U$USERNAME%$PASSWORD"; do
-       testit "TESTING PROTOCOL $p with options $options" ../testprogs/blackbox/test_ldb.sh $p $options
+       testit "TESTING PROTOCOL $p with options $options" ../testprogs/blackbox/test_ldb.sh $p $SERVER $options
     done
 fi
 for t in LDAP-CLDAP LDAP-BASIC LDAP-SCHEMA LDAP-UPTODATENESS
index d46f371353210b9a9f66376f6abac9cde31570f3..32e80e19956e72131e9d5ef3bd6fcff2233327a7 100755 (executable)
@@ -1,7 +1,8 @@
 #!/bin/sh
 
 p=$1
-shift 1
+SERVER=$2
+shift 2
 options="$*"
 
 check() {