lib/param: Also enable vlp when --enable-selftest is specified
authorAndrew Bartlett <abartlet@samba.org>
Mon, 6 Aug 2012 08:32:21 +0000 (18:32 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 6 Aug 2012 10:51:55 +0000 (20:51 +1000)
lib/param/loadparm.h
lib/param/param_table.c
selftest/wscript
source3/param/loadparm.c

index eb9c768..8c4a7b1 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_BUILD_FARM_HACKS)
+#if defined(DEVELOPER) || defined(ENABLE_SELFTEST) || defined(ENABLE_BUILD_FARM_HACKS)
 ,PRINT_TEST,PRINT_VLP
 #endif /* DEVELOPER */
 };
index a793695..ea0fa3d 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_BUILD_FARM_HACKS)
+#if defined(DEVELOPER) || defined(ENABLE_SELFTEST) || defined(ENABLE_BUILD_FARM_HACKS)
        {PRINT_TEST, "test"},
        {PRINT_VLP, "vlp"},
 #endif /* DEVELOPER */
index 6359e1a..0277eb5 100644 (file)
@@ -77,6 +77,10 @@ def configure(conf):
         conf.ADD_LDFLAGS('-lgcov', testflags=True)
         conf.ADD_CFLAGS('--coverage')
 
+    if Options.options.enable_selftest or Options.options.developer:
+        conf.DEFINE('ENABLE_SELFTEST', 1)
+
+
 def cmd_testonly(opt):
     '''run tests without doing a build first'''
     env = LOAD_ENVIRONMENT()
index 59f74d7..dc23868 100644 (file)
@@ -397,7 +397,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_BUILD_FARM_HACKS)
+#if defined(DEVELOPER) || defined(ENABLE_SELFTEST) || defined(ENABLE_BUILD_FARM_HACKS)
 
        case PRINT_TEST:
        case PRINT_VLP: {