Author: metze
Date: 2006-10-17 12:06:20 +0000 (Tue, 17 Oct 2006)
New Revision: 19369

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19369

Log:
- we need to set the target:samba3 before calling torture_init()
  otherwise BASE-DELETE will run all tests

- call ldb_global_init() directly after torture_init()
  this isn't strictly needed but looks better

metze

Modified:
   branches/SAMBA_4_0/source/torture/smbtorture.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/smbtorture.c
===================================================================
--- branches/SAMBA_4_0/source/torture/smbtorture.c      2006-10-17 12:06:17 UTC 
(rev 19368)
+++ branches/SAMBA_4_0/source/torture/smbtorture.c      2006-10-17 12:06:20 UTC 
(rev 19369)
@@ -518,6 +518,12 @@
                }
        }
 
+       if (strcmp(target, "samba3") == 0) {
+               lp_set_cmdline("target:samba3", "true");
+       } else if (strcmp(target, "samba4") == 0) {
+               lp_set_cmdline("target:samba4", "true");
+       }
+
        if (max_runtime) {
                /* this will only work if nobody else uses alarm(),
                   which means it won't work for some tests, but we
@@ -529,6 +535,7 @@
        }
 
        torture_init();
+       ldb_global_init();
 
        subunit_dir = lp_parm_string_list(-1, "torture", "subunitdir", ":");
        if (subunit_dir == NULL) 
@@ -538,10 +545,6 @@
                        torture_subunit_load_testsuites(subunit_dir[i], true, 
NULL);
        }
 
-
-
-       ldb_global_init();
-
        if (torture_seed == 0) {
                torture_seed = time(NULL);
        } 
@@ -563,12 +566,6 @@
                exit(1);
        }
 
-       if (strcmp(target, "samba3") == 0) {
-               lp_set_cmdline("target:samba3", "true");
-       } else if (strcmp(target, "samba4") == 0) {
-               lp_set_cmdline("target:samba4", "true");
-       }
-
        /* see if its a RPC transport specifier */
        if (is_binding_string(argv_new[1])) {
                lp_set_cmdline("torture:binding", argv_new[1]);

Reply via email to