summaryrefslogtreecommitdiff
path: root/testsuite/build_farm/basicsmb.fns
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2001-11-14 05:12:03 +0000
committerMartin Pool <mbp@samba.org>2001-11-14 05:12:03 +0000
commitda0128e566a9e96d518ffaf9ebca1585600b40fb (patch)
treeb2f94ca784595665bb0040fa2075d729dad600b7 /testsuite/build_farm/basicsmb.fns
parent413fa03cd63b4802aa185ddcc919a60c3c8b1573 (diff)
downloadsamba-da0128e566a9e96d518ffaf9ebca1585600b40fb.tar.gz
samba-da0128e566a9e96d518ffaf9ebca1585600b40fb.tar.bz2
samba-da0128e566a9e96d518ffaf9ebca1585600b40fb.zip
Doc.
Try not to run tests if the user specified --prefix=/usr* or something similar, because it would not be nice(!) to clobber their configuration file and passwords. Eventually I think we want to run the installed versions, but specify different paths for everything. (This used to be commit b18703fc8e15244dd840d1a1e9455a114e3f0408)
Diffstat (limited to 'testsuite/build_farm/basicsmb.fns')
-rw-r--r--testsuite/build_farm/basicsmb.fns35
1 files changed, 35 insertions, 0 deletions
diff --git a/testsuite/build_farm/basicsmb.fns b/testsuite/build_farm/basicsmb.fns
index 33dc6a7614..b3a00ea783 100644
--- a/testsuite/build_farm/basicsmb.fns
+++ b/testsuite/build_farm/basicsmb.fns
@@ -1,3 +1,20 @@
+#! /bin/sh
+
+# Common functions for Samba build scripts.
+
+# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
+
+# The following variables are passed in by the calling script. They
+# originate in either the buildfarm scripts or the configured
+# Makefile.
+
+# PREFIX = Installed prefix of samba test installation. Used to
+# locate binaries, configuration files, etc.
+
+# XXX: It's pretty bad to clobber the installed configuration file and
+# other data in $prefix, because somebody might unwittingly run this
+# with prefix=/usr.
+
template_smb_conf_setup() {
cat basicsmb.smb.conf$1.template | \
sed "s|PREFIX|$prefix|g" | \
@@ -5,9 +22,25 @@ template_smb_conf_setup() {
sed "s|WHOAMI|$whoami|g" | \
sed "s|LOGLEVEL|$loglevel|g" \
> $prefix/lib/smb.conf$1
+ echo "template_smb_conf_setup: Created $prefix/lib/smb.conf$1"
}
test_smb_conf_setup() {
+ echo "test_smb_conf_setup: Configuring: "
+ echo " PREFIX=$prefix"
+ echo " BUILD_FARM=$pwd"
+ echo " WHOAMI=$whoami"
+ echo " LOGLEVEL=$loglevel"
+
+ case "$prefix" in
+ /usr*|/|//)
+ echo "** I don't want to clobber your installation in "
+ echo "** $prefix"
+ echo "** by running tests there. Please reconfigure this source tree to"
+ echo "** use a different prefix."
+ exit 1
+ esac
+
template_smb_conf_setup
template_smb_conf_setup .hostsequiv
template_smb_conf_setup .invalidusers
@@ -87,3 +120,5 @@ test_listfilesauth_should_deny() {
fi
return 0
}
+
+echo "LIBSMB_PROG=$LIBSMB_PROG" >&2