build: Remove --enable-smbtorture, require bin/smbtorture (from waf) for make test
authorAndrew Bartlett <abartlet@samba.org>
Wed, 21 Nov 2012 06:52:35 +0000 (17:52 +1100)
committerAndreas Schneider <asn@samba.org>
Thu, 22 Nov 2012 09:21:17 +0000 (10:21 +0100)
This simply moves this to being a side-effect of --enable-selftest.

The flag was renamed from --enable-smbtorture4 in a recent patch.

Make test now relies on smbtorture4, and so this code to make the dependency
optional for the tests is not required any more.

Andrew Bartlett

Reviewed-by: Andreas Schneider <asn@samba.org>
packaging/RHEL-CTDB/configure.rpm
packaging/RHEL-CTDB/samba.spec.tmpl
source3/Makefile.in
source3/configure.in
source3/m4/check_path.m4

index d0ae8b5a458efb50a7ae4e8cc38eb56071263628..d6d7c5bdae0e33fbe3ac30a3a9fac1729a874146 100755 (executable)
@@ -66,7 +66,6 @@ CC="$CC" CFLAGS="-Wall -g -D_GNU_SOURCE -O3" ./configure -C \
        --without-dnsupdate \
        --with-aio-support \
        --disable-merged-build \
-       --disable-smbtorture \
        --disable-external-libtalloc \
        --disable-external-libtdb \
        $*
index a57269ea0522943a6b82e0e988a6d3aada5e221d..978f1a6a30d4465afd3cc0a6de27590f9d0b5436 100644 (file)
@@ -184,7 +184,6 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \
        --without-dnsupdate \
        --with-aio-support \
        --disable-merged-build \
-       --disable-smbtorture \
        --disable-external-libtalloc \
        --disable-external-libtdb
 
index c533929f7380f3f34f3e0b967f4f619e3ebfac0f..a2d7906e0328f79df94ad08fffc2e7342b540377 100644 (file)
@@ -1602,7 +1602,7 @@ pam_winbind: SHOWFLAGS bin/pam_winbind.@SHLIBEXT@
 
 gpext_modules:: $(GPEXT_MODULES)
 
-torture:: SHOWFLAGS basics $(TORTURE_PROGS) @SMBTORTURE@
+torture:: SHOWFLAGS basics $(TORTURE_PROGS)
 
 smbtorture3 : SHOWFLAGS bin/smbtorture3
 
@@ -3274,7 +3274,7 @@ test_pam_modules:: pam_modules
 ## Targets for 'make test'
 ##
 
-valgrindtest:: all torture timelimit
+valgrindtest:: all torture timelimit bin/smbtorture
        @echo Running Test suite with valgrind
        @$(MAKE) test \
         NMBD_VALGRIND="xterm -n nmbd -e valgrind -q --db-attach=yes --num-callers=30" \
@@ -3286,7 +3286,7 @@ selftestdir = ../selftest
 
 S3_LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)="$(builddir)/bin:$$$(LIB_PATH_VAR)"
 
-test:: all torture timelimit
+test:: all torture timelimit bin/smbtorture
        @LIB_PATH_VAR=$(LIB_PATH_VAR) $(S3_LD_LIBPATH_OVERRIDE) \
                NSS_WRAPPER_WINBIND_SO_PATH="$(srcdir)/../nsswitch/libnss_winbind.so" \
                SELFTESTDIR="$(selftestdir)" SELFTESTPREFIX="$(selftest_prefix)" \
index cd80571474faaea746526e687b0055e4e02878ad..b872ab794cc5ff5921fc05e2b3b36910ad46de8c 100644 (file)
@@ -202,29 +202,21 @@ AC_ARG_WITH(profiling-data,
   AC_MSG_RESULT(no)
 )
 
-dnl Checks for programs.
-AC_ARG_ENABLE(smbtorture,
-       [AS_HELP_STRING([--enable-smbtorture], [Enable building smbtorture (default=auto)])])
-
-if test x$enable_smbtorture != xno; then
-       smbtorture_possible=yes
-else
-       smbtorture_possible=no
-fi
-
 AC_PROG_INSTALL
 AC_PROG_AWK
 # Check for GNU make
 m4_include(../m4/check_make.m4)
 AC_SAMBA_GNU_MAKE([true], [true])
 
+selftest_possible="yes"
+
 # Check for perl
 m4_include(../m4/check_perl.m4)
-AC_SAMBA_PERL([true], [smbtorture_possible=no])
+AC_SAMBA_PERL([true], [selftest_possible=no])
 
 # Check for python
 m4_include(../m4/check_python.m4)
-AC_SAMBA_PYTHON_DEVEL([true], [smbtorture_possible=no])
+AC_SAMBA_PYTHON_DEVEL([true], [selftest_possible=no])
 
 AC_CHECK_TOOL(AR, ar)
 
@@ -6441,6 +6433,9 @@ AC_MSG_CHECKING(whether to enable features for selftest)
 if test x"$selftest" = x"yes"; then
        AC_MSG_RESULT(yes)
        AC_DEFINE(ENABLE_SELFTEST, 1, [Support features needed for selftest])
+       if test x"$selftest_possible" != xyes; then
+               AC_MSG_ERROR(selftest support only possible with python, including development headers, and perl installed)
+       fi
 else
        AC_MSG_RESULT(no)
 fi
@@ -6519,11 +6514,6 @@ fi
 
 m4_include(../lib/zlib/zlib.m4)
 
-if test x$smbtorture_possible = xyes; then
-       SMBTORTURE="bin/smbtorture"
-       AC_SUBST(SMBTORTURE)
-fi
-
 AC_SUBST(ZLIB_LIBS)
 AC_SUBST(ZLIB_OBJS)
 AC_ZLIB([ZLIB_OBJS=""], [
index 1932a33cc87e5d1d605be737736de96fcf945ada..94c36bc6bdf925b8fdb2f6c5c450f8a6402a0b8c 100644 (file)
@@ -42,6 +42,7 @@ AC_ARG_ENABLE(developer, [AS_HELP_STRING([--enable-developer], [Turn on develope
     [if eval "test x$enable_developer = xyes"; then
         debug=yes
         developer=yes
+        selftest=yes
     fi])
 
 AC_SUBST(selftest)