From: Volker Lendecke Date: Wed, 26 Feb 2020 22:36:32 +0000 (-0800) Subject: selftest: Factor out smbtorture4testsuite_cmdarray() X-Git-Tag: ldb-2.2.0~1560 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac65874ef48f43507474d2b05030e2fc6afa180f;p=thirdparty%2Fsamba.git selftest: Factor out smbtorture4testsuite_cmdarray() This will be used in the libsmbclient tests soon Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py index 97db3b8c97f..1fdb2e461e1 100644 --- a/selftest/selftesthelpers.py +++ b/selftest/selftesthelpers.py @@ -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)