1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

selftest: Factor out smbtorture4testsuite_cmdarray()

This will be used in the libsmbclient tests soon

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:36:32 -08:00 committed by Jeremy Allison
parent e4f399126e
commit ac65874ef4

View File

@ -172,17 +172,20 @@ smbtorture4_options = [
"--format=subunit"
] + get_env_torture_options()
def smbtorture4testsuite_cmdarray(name, env, options, target):
cmdarray = [ valgrindify(smbtorture4), "$LISTOPT", "$LOADLIST" ]
cmdarray += smbtorture4_options
cmdarray += [ "--target=%s" % target ]
cmdarray += options
cmdarray += [ name ]
return cmdarray
def plansmbtorture4testsuite(name, env, options, target, modname=None):
if modname is None:
modname = "samba4.%s" % name
if isinstance(options, str):
options = options.split()
cmdarray = [ valgrindify(smbtorture4), "$LISTOPT", "$LOADLIST" ]
cmdarray += smbtorture4_options
cmdarray += [ "--target=%s" % target ]
cmdarray += options
cmdarray += [ name ]
cmdarray = smbtorture4testsuite_cmdarray(name, env, options, target)
cmdline = " ".join(cmdarray)
plantestsuite_loadlist(modname, env, cmdline)