summaryrefslogtreecommitdiff
path: root/source4/torture/smbtorture.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/smbtorture.c')
-rw-r--r--source4/torture/smbtorture.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c
index 3733d72492..d83d1310ae 100644
--- a/source4/torture/smbtorture.c
+++ b/source4/torture/smbtorture.c
@@ -518,6 +518,12 @@ const static struct torture_ui_ops quiet_ui_ops = {
}
}
+ 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 @@ const static struct torture_ui_ops quiet_ui_ops = {
}
torture_init();
+ ldb_global_init();
subunit_dir = lp_parm_string_list(-1, "torture", "subunitdir", ":");
if (subunit_dir == NULL)
@@ -538,10 +545,6 @@ const static struct torture_ui_ops quiet_ui_ops = {
torture_subunit_load_testsuites(subunit_dir[i], true, NULL);
}
-
-
- ldb_global_init();
-
if (torture_seed == 0) {
torture_seed = time(NULL);
}
@@ -563,12 +566,6 @@ const static struct torture_ui_ops quiet_ui_ops = {
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]);