Give sensible defaults to some variables that are set by the build
authorMartin Pool <mbp@samba.org>
Wed, 14 Nov 2001 06:07:21 +0000 (06:07 +0000)
committerMartin Pool <mbp@samba.org>
Wed, 14 Nov 2001 06:07:21 +0000 (06:07 +0000)
farm but not present in Make.
(This used to be commit 0d6d0c31f9aecf1e35487ad26cc2f2c4c7d732f0)

testsuite/build_farm/basicsmb.fns

index b3a00ea78393120f3646d12f558ab1d980dbdf7e..30964d8223080631f135faa3904bd4ae4827142f 100644 (file)
 # other data in $prefix, because somebody might unwittingly run this
 # with prefix=/usr.  
 
 # other data in $prefix, because somebody might unwittingly run this
 # with prefix=/usr.  
 
+# Really what we want is a consistent way to pass the location of the
+# configuration and all other files into *all* Samba programs
+# (smbclient, smd, ...) and be able to set them to a temporary
+# directory when testing.  Some of them take a -c parameter, but tpot
+# says it's not done consistently.
+
 template_smb_conf_setup() {
        cat basicsmb.smb.conf$1.template | \
               sed "s|PREFIX|$prefix|g" | \
 template_smb_conf_setup() {
        cat basicsmb.smb.conf$1.template | \
               sed "s|PREFIX|$prefix|g" | \
@@ -122,3 +128,29 @@ test_listfilesauth_should_deny() {
 }
 
 echo "LIBSMB_PROG=$LIBSMB_PROG" >&2
 }
 
 echo "LIBSMB_PROG=$LIBSMB_PROG" >&2
+
+
+
+# Give sensible defaults to some variables.  
+
+# "What's my age again?"
+
+if [ ! $USER = "" ]; then
+    whoami=$USER
+else 
+    if [ ! $LOGNAME = "" ]; then
+       whoami=$LOGNAME
+    else
+       whoami=build
+    fi
+fi
+
+
+
+if test -z "$loglevel"
+then
+    loglevel=1
+fi
+
+
+pwd=`pwd`