From 02e063bd5be06925489f735c51225b65ff961d6b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 1 Nov 2014 16:36:54 -0700 Subject: [PATCH] Be consistent about what functions add $LISTOPT and $LOADLIST to the command-line. Change-Id: Ife86624b53a99d48ce9f00d146b14f798c9bdb24 Signed-off-by: Jelmer Vernooij Reviewed-by: Andrew Bartlett Autobuild-User(master): Jelmer Vernooij Autobuild-Date(master): Sun Nov 30 16:43:52 CET 2014 on sn-devel-104 --- selftest/selftesthelpers.py | 10 ++++++---- source4/selftest/tests.py | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py index b2440054e60..6e387ec9dd3 100644 --- a/selftest/selftesthelpers.py +++ b/selftest/selftesthelpers.py @@ -133,9 +133,11 @@ def plantestsuite_loadlist(name, env, cmdline, subunit_version=1): cmdline = " ".join(cmdline) support_list = ("$LISTOPT" in cmdline) if not "$LISTOPT" in cmdline: - raise AssertionError("test %s supports --load-list, but not --list" % name) - print ("%s | %s" % (cmdline, add_prefix(name, env, support_list))).replace("$LISTOPT", "--list") - print cmdline + " $LOADLIST 2>&1 " + to_subunit1(subunit_version) + "| " + add_prefix(name, env, support_list) + raise AssertionError("loadlist test %s does not support not --list" % name) + if not "$LOADLIST" in cmdline: + raise AssertionError("loadlist test %s does not support --load-list" % name) + print ("%s | %s" % (cmdline.replace("$LOADLIST", ""), add_prefix(name, env, support_list))).replace("$LISTOPT", "--list") + print cmdline.replace("$LISTOPT", "") + " 2>&1 " + to_subunit1(subunit_version) + " | " + add_prefix(name, env, False) def skiptestsuite(name, reason): @@ -207,7 +209,7 @@ def plansmbtorture4testsuite(name, env, options, target, modname=None): if isinstance(options, list): options = " ".join(options) options = " ".join(smbtorture4_options + ["--target=%s" % target]) + " " + options - cmdline = "%s $LISTOPT %s %s" % (valgrindify(smbtorture4), options, name) + cmdline = "%s $LISTOPT $LOADLIST %s %s" % (valgrindify(smbtorture4), options, name) plantestsuite_loadlist(modname, env, cmdline) diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index 722e065fc30..7362b64c23e 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -313,7 +313,7 @@ plantestsuite("samba4.blackbox.gentest(dc)", "dc", [os.path.join(samba4srcdir, " plantestsuite("samba4.blackbox.rfc2307_mapping(dc:local)", "dc:local", [os.path.join(samba4srcdir, "../nsswitch/tests/test_rfc2307_mapping.sh"), '$DOMAIN', '$USERNAME', '$PASSWORD', "$SERVER", "$UID_RFC2307TEST", "$GID_RFC2307TEST", configuration]) plantestsuite("samba4.blackbox.chgdcpass", "chgdcpass", [os.path.join(bbdir, "test_chgdcpass.sh"), '$SERVER', "CHGDCPASS\$", '$REALM', '$DOMAIN', '$PREFIX', "aes256-cts-hmac-sha1-96", '$SELFTEST_PREFIX/chgdcpass', smbclient4]) plantestsuite("samba4.blackbox.samba_upgradedns(chgdcpass:local)", "chgdcpass:local", [os.path.join(bbdir, "test_samba_upgradedns.sh"), '$SERVER', '$REALM', '$PREFIX', '$SELFTEST_PREFIX/chgdcpass']) -plantestsuite_loadlist("samba4.rpc.echo against NetBIOS alias", "dc", [valgrindify(smbtorture4), "$LISTOPT", 'ncacn_np:$NETBIOSALIAS', '-U$DOMAIN/$USERNAME%$PASSWORD', 'rpc.echo']) +plantestsuite_loadlist("samba4.rpc.echo against NetBIOS alias", "dc", [valgrindify(smbtorture4), "$LISTOPT", "$LOADLIST", 'ncacn_np:$NETBIOSALIAS', '-U$DOMAIN/$USERNAME%$PASSWORD', 'rpc.echo']) # Tests using the "Simple" NTVFS backend for t in ["base.rw1"]: @@ -432,7 +432,7 @@ def planoldpythontestsuite(env, module, name=None, extra_path=[], environ={}, ex if py_path: environ["PYTHONPATH"] = ":".join(["$PYTHONPATH"] + py_path) args = ["%s=%s" % item for item in environ.iteritems()] - args += [subunitrun, "$LISTOPT", module] + args += [subunitrun, "$LISTOPT", "$LOADLIST", module] args += extra_args if name is None: name = module -- 2.34.1