From: Volker Lendecke Date: Wed, 26 Feb 2020 22:07:54 +0000 (-0800) Subject: selftest: Assemble smbtorture arguments as a list X-Git-Tag: ldb-2.2.0~1561 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4f399126e72111b92fcdc5acc749d0ce96aaf46;p=thirdparty%2Fsamba.git 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 Reviewed-by: Jeremy Allison --- diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py index 1afabf3cdca..97db3b8c97f 100644 --- a/selftest/selftesthelpers.py +++ b/selftest/selftesthelpers.py @@ -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)