diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-03-05 13:51:05 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:49:15 -0500 |
commit | 000a094318989eb5a221515e7870e71f28e36133 (patch) | |
tree | 530b20eee614c6519585eaba3765999ce14058e3 /source4 | |
parent | 0a1fefe5397d4bcc4c81f0102b38f868e4c84dbf (diff) | |
download | samba-000a094318989eb5a221515e7870e71f28e36133.tar.gz samba-000a094318989eb5a221515e7870e71f28e36133.tar.bz2 samba-000a094318989eb5a221515e7870e71f28e36133.zip |
r21700: Run mktestsetup as an external program. This guarantees that it can be used for other selftest implementations (in particular the perl one I've been working on).
(This used to be commit aa29907327a91a64c769b1f2712f553e13964418)
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/script/tests/mktestsetup.sh | 15 | ||||
-rwxr-xr-x | source4/script/tests/selftest.sh | 12 | ||||
-rwxr-xr-x | source4/script/tests/test_ejs.sh | 4 | ||||
-rwxr-xr-x | source4/script/tests/test_ldap.sh | 4 |
4 files changed, 17 insertions, 18 deletions
diff --git a/source4/script/tests/mktestsetup.sh b/source4/script/tests/mktestsetup.sh index 4c9a828315..a92def64fd 100755 --- a/source4/script/tests/mktestsetup.sh +++ b/source4/script/tests/mktestsetup.sh @@ -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" diff --git a/source4/script/tests/selftest.sh b/source4/script/tests/selftest.sh index 7af5891abb..fa94412136 100755 --- a/source4/script/tests/selftest.sh +++ b/source4/script/tests/selftest.sh @@ -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 diff --git a/source4/script/tests/test_ejs.sh b/source4/script/tests/test_ejs.sh index f08fdec3ba..6cd727e3e3 100755 --- a/source4/script/tests/test_ejs.sh +++ b/source4/script/tests/test_ejs.sh @@ -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 diff --git a/source4/script/tests/test_ldap.sh b/source4/script/tests/test_ldap.sh index a0a7fac3bf..e50d062fca 100755 --- a/source4/script/tests/test_ldap.sh +++ b/source4/script/tests/test_ldap.sh @@ -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 |