summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/build/smb_build/makefile.pm8
-rw-r--r--source4/lib/socket_wrapper/config.m416
2 files changed, 20 insertions, 4 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 3b36a94334..98d70f6c1c 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -150,9 +150,15 @@ pch_clean:
basics: idl proto_exists
-test: all
+test: @DEFAULT_TEST_TARGET@
+
+test-swrap: all
+ export SOCKET_WRAPPER_DIR=.
./script/tests/selftest.sh `pwd`/prefix-test
+test-noswrap: all
+ ./script/tests/selftest.sh `pwd`/prefix-test
+
__EOD__
return $output;
diff --git a/source4/lib/socket_wrapper/config.m4 b/source4/lib/socket_wrapper/config.m4
index 97984d0436..69024c869d 100644
--- a/source4/lib/socket_wrapper/config.m4
+++ b/source4/lib/socket_wrapper/config.m4
@@ -1,5 +1,15 @@
AC_ARG_ENABLE(socket-wrapper,
-[ --enable-socket-wrapper Turn on socket wrapper library (default=no)],
- [if eval "test x$enable_socket_wrapper = xyes"; then
+[ --enable-socket-wrapper Turn on socket wrapper library (default=no)])
+
+DEFAULT_TEST_TARGET=test-noswrap
+
+if eval "test x$developer = xyes"; then
+ enable_socket_wrapper=yes
+fi
+
+if eval "test x$enable_socket_wrapper = xyes"; then
AC_DEFINE(SOCKET_WRAPPER,1,[Use socket wrapper library])
- fi])
+ DEFAULT_TEST_TARGET=test-swrap
+fi
+
+AC_SUBST(DEFAULT_TEST_TARGET)