build: Remove special case for the build farm
authorAndrew Bartlett <abartlet@samba.org>
Mon, 20 Aug 2012 22:16:24 +0000 (08:16 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 21 Aug 2012 04:39:04 +0000 (06:39 +0200)
Except in the formatting of the selftest output, this removes the special case
of the build farm, so that an autobuild, a manual make test and the build farm
are more similar.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 21 06:39:04 CEST 2012 on sn-devel-104

12 files changed:
buildtools/wafsamba/symbols.py
lib/nss_wrapper/config.m4
lib/param/loadparm.h
lib/param/param_table.c
lib/socket_wrapper/config.m4
lib/uid_wrapper/config.m4
source3/configure.in
source3/m4/check_path.m4
source3/modules/vfs_aio_fork.c
source3/param/loadparm.c
source3/wscript
wscript

index c4b5599..13d84b9 100644 (file)
@@ -647,7 +647,7 @@ def SYMBOL_CHECK(bld):
 Build.BuildContext.SYMBOL_CHECK = SYMBOL_CHECK
 
 def DUP_SYMBOL_CHECK(bld):
-    if Options.options.DUP_SYMBOLCHECK and bld.env.DEVELOPER and not bld.env.BUILD_FARM:
+    if Options.options.DUP_SYMBOLCHECK and bld.env.DEVELOPER:
         '''check for duplicate symbols'''
         bld.SET_BUILD_GROUP('syslibcheck')
         task = bld(rule=symbols_dupcheck_fatal, always=True, name='symbol duplicate checking')
index ad1a168..1e864bf 100644 (file)
@@ -3,7 +3,7 @@ AS_HELP_STRING([--enable-nss-wrapper], [Turn on nss wrapper library (default=no)
 
 HAVE_NSS_WRAPPER=no
 
-if eval "test x$developer = xyes"; then
+if eval "test x$developer = xyes -o x$selftest = xyes"; then
        enable_nss_wrapper=yes
 fi
 
index 591e6e5..f9624d6 100644 (file)
@@ -157,7 +157,7 @@ enum acl_compatibility {ACL_COMPAT_AUTO, ACL_COMPAT_WINNT, ACL_COMPAT_WIN2K};
 enum printing_types {PRINT_BSD,PRINT_SYSV,PRINT_AIX,PRINT_HPUX,
                     PRINT_QNX,PRINT_PLP,PRINT_LPRNG,PRINT_SOFTQ,
                     PRINT_CUPS,PRINT_LPRNT,PRINT_LPROS2,PRINT_IPRINT
-#if defined(DEVELOPER) || defined(ENABLE_SELFTEST) || defined(ENABLE_BUILD_FARM_HACKS)
+#if defined(DEVELOPER) || defined(ENABLE_SELFTEST)
 ,PRINT_TEST,PRINT_VLP
 #endif /* DEVELOPER */
 };
index ea0fa3d..4126d89 100644 (file)
@@ -190,7 +190,7 @@ static const struct enum_list enum_printing[] = {
        {PRINT_IPRINT, "iprint"},
        {PRINT_LPRNT, "nt"},
        {PRINT_LPROS2, "os2"},
-#if defined(DEVELOPER) || defined(ENABLE_SELFTEST) || defined(ENABLE_BUILD_FARM_HACKS)
+#if defined(DEVELOPER) || defined(ENABLE_SELFTEST)
        {PRINT_TEST, "test"},
        {PRINT_VLP, "vlp"},
 #endif /* DEVELOPER */
index e20333e..ff6b67b 100644 (file)
@@ -4,7 +4,7 @@ AS_HELP_STRING([--enable-socket-wrapper], [Turn on socket wrapper library (defau
 DEFAULT_TEST_OPTIONS=
 HAVE_SOCKET_WRAPPER=no
 
-if eval "test x$developer = xyes"; then
+if eval "test x$developer = xyes -o x$selftest = xyes"; then
        enable_socket_wrapper=yes
 fi
     
index 2cd573e..a565233 100644 (file)
@@ -3,7 +3,7 @@ AS_HELP_STRING([--enable-uid-wrapper], [Turn on uid wrapper library (default=no)
 
 HAVE_UID_WRAPPER=no
 
-if eval "test x$developer = xyes"; then
+if eval "test x$developer = xyes -o x$selftest = xyes"; then
        enable_uid_wrapper=yes
 fi
 
index f0dde64..db7df4d 100644 (file)
@@ -476,7 +476,7 @@ if test "x$developer" = xyes; then
    default_shared_modules="$default_shared_modules perfcount_test"
 fi
 
-if test x"$RUN_FROM_BUILD_FARM" = x"yes" -o "x$developer" = xyes; then
+if test x"$selftest" = x"yes" -o "x$developer" = xyes; then
    default_shared_modules="$default_shared_modules vfs_fake_acls"
 fi
 
@@ -6602,10 +6602,10 @@ fi
 #################################################
 # If run from the build farm, enable NASTY hacks
 #################################################
-AC_MSG_CHECKING(whether to enable build farm hacks)
-if test x"$RUN_FROM_BUILD_FARM" = x"yes"; then
+AC_MSG_CHECKING(whether to enable features for selftest)
+if test x"$selftest" = x"yes"; then
        AC_MSG_RESULT(yes)
-       AC_DEFINE(ENABLE_BUILD_FARM_HACKS, 1, [Defined if running in the build farm])
+       AC_DEFINE(ENABLE_SELFTEST, 1, [Support features needed for selftest])
 else
        AC_MSG_RESULT(no)
 fi
index f0b98c9..1932a33 100644 (file)
@@ -44,6 +44,14 @@ AC_ARG_ENABLE(developer, [AS_HELP_STRING([--enable-developer], [Turn on develope
         developer=yes
     fi])
 
+AC_SUBST(selftest)
+selftest=no
+AC_ARG_ENABLE(selftest, [AS_HELP_STRING([--enable-selftest], [Turn on selftest capability (default=no)])],
+    [if eval "test x$enable_selftest = xyes"; then
+        debug=yes
+        selftest=yes
+    fi])
+
 krb5developer=no
 AC_ARG_ENABLE(krb5developer, [AS_HELP_STRING([--enable-krb5developer], [Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)])],
     [if eval "test x$enable_krb5developer = xyes"; then
index 1bbdae2..811d44e 100644 (file)
@@ -355,10 +355,10 @@ static void aio_child_loop(int sockfd, struct mmap_area *map)
                           cmd_type_str(cmd_struct.cmd),
                           (int)cmd_struct.n, (int)cmd_struct.offset, fd));
 
-#ifdef ENABLE_BUILD_FARM_HACKS
+#ifdef DEVELOPER
                {
                        /*
-                        * In the build farm, we want erratic behaviour for
+                        * For developer testing, we want erratic behaviour for
                         * async I/O times
                         */
                        uint8_t randval;
@@ -384,7 +384,7 @@ static void aio_child_loop(int sockfd, struct mmap_area *map)
                                cmd_struct.offset);
 #if 0
 /* This breaks "make test" when run with aio_fork module. */
-#ifdef ENABLE_BUILD_FARM_HACKS
+#ifdef DEVELOPER
                        ret_struct.size = MAX(1, ret_struct.size * 0.9);
 #endif
 #endif
index bce1c5b..0b5a0e8 100644 (file)
@@ -448,7 +448,7 @@ static void init_printer_values(struct loadparm_service *pService)
                        string_set(&pService->szPrintcommand, "lp -r -P%p %s");
                        break;
 
-#if defined(DEVELOPER) || defined(ENABLE_SELFTEST) || defined(ENABLE_BUILD_FARM_HACKS)
+#if defined(DEVELOPER) || defined(ENABLE_SELFTEST)
 
        case PRINT_TEST:
        case PRINT_VLP: {
index c807ddc..d05b21d 100755 (executable)
@@ -1014,9 +1014,6 @@ main() {
                     msg='Checking for ftruncate extend',
                     addmain=False,
                     execute=True)
-    if os.getenv('RUN_FROM_BUILD_FARM'):
-        Logs.info("enabling buildfarm hacks")
-        conf.DEFINE('ENABLE_BUILD_FARM_HACKS', '1')
 
     if Options.options.with_sendfile_support:
         if (host_os.rfind('linux') > -1) or (host_os.rfind('gnu') > -1) or (host_os.rfind('k*bsd*-gnu') > -1) or (host_os.rfind('kopensolaris*-gnu') > -1):
diff --git a/wscript b/wscript
index 159c486..3667a8d 100755 (executable)
--- a/wscript
+++ b/wscript
@@ -57,9 +57,6 @@ def set_options(opt):
                    action='store_true', dest='without_ad_dc', default=False)
 
     gr = opt.option_group('developer options')
-    gr.add_option('--enable-build-farm',
-                   help='enable special build farm options',
-                   action='store_true', dest='BUILD_FARM')
 
     opt.add_option('--disable-ntdb',
                    help=("disable ntdb"),
@@ -81,9 +78,6 @@ def configure(conf):
         conf.ADD_CFLAGS('-DDEVELOPER -DDEBUG_PASSWORD')
         conf.env.DEVELOPER = True
 
-    # this enables smbtorture.static for s3 in the build farm
-    conf.env.BUILD_FARM = Options.options.BUILD_FARM or os.environ.get('RUN_FROM_BUILD_FARM')
-
     conf.ADD_EXTRA_INCLUDES('#include/public #source4 #lib #source4/lib #source4/include #include #lib/replace')
 
     conf.RECURSE('lib/replace')