From 4d5471f1c634450020c4530f8d0c8dfcd7252fb3 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 21 Aug 2012 08:16:24 +1000 Subject: [PATCH] build: Remove special case for the build farm 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 Autobuild-Date(master): Tue Aug 21 06:39:04 CEST 2012 on sn-devel-104 --- buildtools/wafsamba/symbols.py | 2 +- lib/nss_wrapper/config.m4 | 2 +- lib/param/loadparm.h | 2 +- lib/param/param_table.c | 2 +- lib/socket_wrapper/config.m4 | 2 +- lib/uid_wrapper/config.m4 | 2 +- source3/configure.in | 8 ++++---- source3/m4/check_path.m4 | 8 ++++++++ source3/modules/vfs_aio_fork.c | 6 +++--- source3/param/loadparm.c | 2 +- source3/wscript | 3 --- wscript | 6 ------ 12 files changed, 22 insertions(+), 23 deletions(-) diff --git a/buildtools/wafsamba/symbols.py b/buildtools/wafsamba/symbols.py index c4b5599988c..13d84b9a412 100644 --- a/buildtools/wafsamba/symbols.py +++ b/buildtools/wafsamba/symbols.py @@ -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') diff --git a/lib/nss_wrapper/config.m4 b/lib/nss_wrapper/config.m4 index ad1a168e734..1e864bfc3a8 100644 --- a/lib/nss_wrapper/config.m4 +++ b/lib/nss_wrapper/config.m4 @@ -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 diff --git a/lib/param/loadparm.h b/lib/param/loadparm.h index 591e6e5dbe1..f9624d6ca93 100644 --- a/lib/param/loadparm.h +++ b/lib/param/loadparm.h @@ -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 */ }; diff --git a/lib/param/param_table.c b/lib/param/param_table.c index ea0fa3de6fa..4126d89c65c 100644 --- a/lib/param/param_table.c +++ b/lib/param/param_table.c @@ -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 */ diff --git a/lib/socket_wrapper/config.m4 b/lib/socket_wrapper/config.m4 index e20333e3ed3..ff6b67b2778 100644 --- a/lib/socket_wrapper/config.m4 +++ b/lib/socket_wrapper/config.m4 @@ -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 diff --git a/lib/uid_wrapper/config.m4 b/lib/uid_wrapper/config.m4 index 2cd573e7f2b..a5652336f00 100644 --- a/lib/uid_wrapper/config.m4 +++ b/lib/uid_wrapper/config.m4 @@ -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 diff --git a/source3/configure.in b/source3/configure.in index f0dde646e3d..db7df4d59c6 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -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 diff --git a/source3/m4/check_path.m4 b/source3/m4/check_path.m4 index f0b98c9d53a..1932a33cc87 100644 --- a/source3/m4/check_path.m4 +++ b/source3/m4/check_path.m4 @@ -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 diff --git a/source3/modules/vfs_aio_fork.c b/source3/modules/vfs_aio_fork.c index 1bbdae2985c..811d44e6bbe 100644 --- a/source3/modules/vfs_aio_fork.c +++ b/source3/modules/vfs_aio_fork.c @@ -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 diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index bce1c5b6105..0b5a0e87f01 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -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: { diff --git a/source3/wscript b/source3/wscript index c807ddcfc91..d05b21d57dc 100755 --- a/source3/wscript +++ b/source3/wscript @@ -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 159c486229d..3667a8db345 100755 --- 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') -- 2.34.1