1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r19369: - 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
(This used to be commit 0c26c2aefd)
This commit is contained in:
Stefan Metzmacher 2006-10-17 12:06:20 +00:00 committed by Gerald (Jerry) Carter
parent 38d4fe0d53
commit 87e8218d09

View File

@ -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]);