]> git.samba.org - samba.git/commitdiff
Be consistent about what functions add $LISTOPT and $LOADLIST to the command-line.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 1 Nov 2014 23:36:54 +0000 (16:36 -0700)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 30 Nov 2014 15:43:52 +0000 (16:43 +0100)
Change-Id: Ife86624b53a99d48ce9f00d146b14f798c9bdb24
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Sun Nov 30 16:43:52 CET 2014 on sn-devel-104

selftest/selftesthelpers.py
source4/selftest/tests.py

index b2440054e605cd019c14eec33db6ab0277f508cb..6e387ec9dd3e6917b6d4b2b0fdbe5bcdf0866c6b 100644 (file)
@@ -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)
 
 
index 722e065fc30341d4b188683e31e8471075c9f1e5..7362b64c23e22492d45a8ad213f0fe26cee2b4b4 100755 (executable)
@@ -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