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

selftest: Assemble smbtorture arguments as a list

I'm planning to mess with libsmbclient tests calling into
smbtorture4. For this it will be much more convenient to have the
arguments available as a higher-level data structure than just a
string.

Checked by "diff" on the testlist before and after -- no change.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2020-02-26 14:07:54 -08:00 committed by Jeremy Allison
parent 536694d436
commit e4f399126e

View File

@ -176,10 +176,14 @@ smbtorture4_options = [
def plansmbtorture4testsuite(name, env, options, target, modname=None):
if modname is None:
modname = "samba4.%s" % name
if isinstance(options, list):
options = " ".join(options)
options = " ".join(smbtorture4_options + ["--target=%s" % target]) + " " + options
cmdline = "%s $LISTOPT $LOADLIST %s %s" % (valgrindify(smbtorture4), options, name)
if isinstance(options, str):
options = options.split()
cmdarray = [ valgrindify(smbtorture4), "$LISTOPT", "$LOADLIST" ]
cmdarray += smbtorture4_options
cmdarray += [ "--target=%s" % target ]
cmdarray += options
cmdarray += [ name ]
cmdline = " ".join(cmdarray)
plantestsuite_loadlist(modname, env, cmdline)