summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/build/m4/check_path.m415
-rw-r--r--source4/build/smb_build/makefile.pm4
-rwxr-xr-xsource4/script/tests/selftest.sh19
3 files changed, 30 insertions, 8 deletions
diff --git a/source4/build/m4/check_path.m4 b/source4/build/m4/check_path.m4
index 5fec1c3f05..7ff0a353b8 100644
--- a/source4/build/m4/check_path.m4
+++ b/source4/build/m4/check_path.m4
@@ -130,6 +130,21 @@ AC_SUBST(bindir)
AC_SUBST(sbindir)
AC_SUBST(swatdir)
+#################################################
+# set prefix for 'make test'
+selftest_prefix="./"
+AC_SUBST(selftest_prefix)
+AC_ARG_WITH(selftest-prefix,
+[ --with-selftest-prefix=DIR The prefix where make test will be runned (\$selftest_prefix)],
+[ case "$withval" in
+ yes|no)
+ AC_MSG_WARN([--with-selftest-prefix called without argument - will use default])
+ ;;
+ * )
+ selftest_prefix="$withval"
+ ;;
+ esac])
+
developer=no
AC_ARG_ENABLE(developer, [ --enable-developer Turn on developer warnings and debugging (default=no)],
[if test x$enable_developer = xyes; then
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index a9ac1d76b1..97dd0b5710 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -148,10 +148,10 @@ basics: idl proto_exists
test: @DEFAULT_TEST_TARGET@
test-swrap: all
- ./script/tests/selftest.sh `pwd`/prefix-test SOCKET_WRAPPER
+ ./script/tests/selftest.sh @selftest_prefix@/prefix-test SOCKET_WRAPPER
test-noswrap: all
- ./script/tests/selftest.sh `pwd`/prefix-test
+ ./script/tests/selftest.sh @selftest_prefix@/prefix-test
__EOD__
}
diff --git a/source4/script/tests/selftest.sh b/source4/script/tests/selftest.sh
index bf1b80c099..d99857f2d0 100755
--- a/source4/script/tests/selftest.sh
+++ b/source4/script/tests/selftest.sh
@@ -17,13 +17,20 @@ fi
PREFIX=$1
export PREFIX
-TMPDIR=$PREFIX/tmp
-LIBDIR=$PREFIX/lib
-PIDDIR=$PREFIX/pid
+mkdir -p $PREFIX || exit $?
+OLD_PWD=`pwd`
+cd $PREFIX || exit $?
+PREFIX_ABS=`pwd`
+export PREFIX_ABS
+cd $OLD_PWD
+
+TMPDIR=$PREFIX_ABS/tmp
+LIBDIR=$PREFIX_ABS/lib
+PIDDIR=$PREFIX_ABS/pid
CONFFILE=$LIBDIR/smb.conf
-PRIVATEDIR=$PREFIX/private
-NCALRPCDIR=$PREFIX/ncalrpc
-LOCKDIR=$PREFIX/lockdir
+PRIVATEDIR=$PREFIX_ABS/private
+NCALRPCDIR=$PREFIX_ABS/ncalrpc
+LOCKDIR=$PREFIX_ABS/lockdir
TLSDIR=$PRIVATEDIR/tls
CONFIGURATION="--configfile=$CONFFILE"
export CONFIGURATION