mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
libsmbconf: testsuite: add support for "--configfile" option.
Michael
This commit is contained in:
parent
bc8dc8626c
commit
9f6c909f46
@ -208,7 +208,8 @@ TORTURE_PROGS = bin/smbtorture@EXEEXT@ bin/msgtest@EXEEXT@ \
|
|||||||
bin/masktest@EXEEXT@ bin/locktest@EXEEXT@ \
|
bin/masktest@EXEEXT@ bin/locktest@EXEEXT@ \
|
||||||
bin/locktest2@EXEEXT@ bin/nsstest@EXEEXT@ bin/vfstest@EXEEXT@ \
|
bin/locktest2@EXEEXT@ bin/nsstest@EXEEXT@ bin/vfstest@EXEEXT@ \
|
||||||
bin/pdbtest@EXEEXT@ bin/talloctort@EXEEXT@ bin/replacetort@EXEEXT@ \
|
bin/pdbtest@EXEEXT@ bin/talloctort@EXEEXT@ bin/replacetort@EXEEXT@ \
|
||||||
bin/tdbtorture@EXEEXT@
|
bin/tdbtorture@EXEEXT@ \
|
||||||
|
bin/smbconftort@EXEEXT@
|
||||||
|
|
||||||
BIN_PROGS = @EXTRA_BIN_PROGS@ \
|
BIN_PROGS = @EXTRA_BIN_PROGS@ \
|
||||||
$(BIN_PROGS1) $(BIN_PROGS2) $(BIN_PROGS3) $(BIN_PROGS4)
|
$(BIN_PROGS1) $(BIN_PROGS2) $(BIN_PROGS3) $(BIN_PROGS4)
|
||||||
@ -843,7 +844,8 @@ SMBCONFTORT_OBJ = $(SMBCONFTORT_OBJ0) \
|
|||||||
$(RPC_PARSE_OBJ1) \
|
$(RPC_PARSE_OBJ1) \
|
||||||
$(LIBSAMBA_OBJ) \
|
$(LIBSAMBA_OBJ) \
|
||||||
$(DOSERR_OBJ) \
|
$(DOSERR_OBJ) \
|
||||||
$(SECRETS_OBJ)
|
$(SECRETS_OBJ) \
|
||||||
|
$(POPT_LIB_OBJ)
|
||||||
|
|
||||||
LIBNET_OBJ = libnet/libnet_join.o \
|
LIBNET_OBJ = libnet/libnet_join.o \
|
||||||
librpc/gen_ndr/ndr_libnet_join.o
|
librpc/gen_ndr/ndr_libnet_join.o
|
||||||
|
@ -89,6 +89,37 @@ static bool torture_smbconf(void)
|
|||||||
|
|
||||||
int main(int argc, const char **argv)
|
int main(int argc, const char **argv)
|
||||||
{
|
{
|
||||||
bool ret = torture_smbconf();
|
bool ret;
|
||||||
|
poptContext pc;
|
||||||
|
|
||||||
|
struct poptOption long_options[] = {
|
||||||
|
POPT_COMMON_CONFIGFILE
|
||||||
|
{0, 0, 0, 0}
|
||||||
|
};
|
||||||
|
|
||||||
|
load_case_tables();
|
||||||
|
|
||||||
|
/* parse options */
|
||||||
|
pc = poptGetContext("smbconftort", argc, (const char **)argv,
|
||||||
|
long_options, 0);
|
||||||
|
|
||||||
|
while(poptGetNextOpt(pc) != -1) { }
|
||||||
|
|
||||||
|
poptFreeContext(pc);
|
||||||
|
|
||||||
|
ret = lp_load(get_dyn_CONFIGFILE(),
|
||||||
|
true, /* globals_only */
|
||||||
|
false, /* save_defaults */
|
||||||
|
false, /* add_ipc */
|
||||||
|
true /* initialize globals */);
|
||||||
|
|
||||||
|
if (!ret) {
|
||||||
|
printf("failure: error loading the configuration\n");
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = torture_smbconf();
|
||||||
|
|
||||||
|
done:
|
||||||
return ret ? 0 : -1;
|
return ret ? 0 : -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user