torture_options.append("--option=torture:quick=yes")
smb4torture += " " + " ".join(torture_options)
+
+# check whether samba was build with cluster support:
+try:
+ config_h = os.environ["CONFIG_H"]
+except KeyError:
+ config_h = os.path.join(bindir(), "default/include/config.h")
+
+f = open(config_h, 'r')
+try:
+ with_cluster_support = ("CLUSTER_SUPPORT 1" in f.read())
+finally:
+ f.close
+
+memberenvs = ["member"]
+localmemberenvs = ["member:local"]
+if with_cluster_support:
+ memberenvs.append("clusteredmember")
+ localmemberenvs.append("clusteredmember:local")
+
+
def plansmbtorturetestsuite(name, env, options, description=''):
modname = "samba3.posix_s3.%s %s" % (name, description)
cmdline = "%s $LISTOPT %s %s" % (valgrindify(smb4torture), options, name)
plantestsuite("samba3.wbinfo_s3.(s3dc:local).%s" % t, "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_wbinfo_s3.sh"), t])
plantestsuite("samba3.wbinfo_s3.(member:local).%s" % t, "member:local", [os.path.join(samba3srcdir, "script/tests/test_wbinfo_s3.sh"), t])
-plantestsuite(
- "samba3.wbinfo_sids2xids.(member:local)", "member:local",
- [os.path.join(samba3srcdir, "script/tests/test_wbinfo_sids2xids.sh")])
+for env in localmemberenvs:
+ plantestsuite(
+ "samba3.wbinfo_sids2xids.(%s)" % env, env,
+ [os.path.join(samba3srcdir, "script/tests/test_wbinfo_sids2xids.sh")])
plantestsuite("samba3.ntlm_auth.(s3dc:local)", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_ntlm_auth_s3.sh"), valgrindify(python), samba3srcdir, binpath('ntlm_auth3'), configuration])
for env in ["s3dc"]:
plantestsuite("samba3.blackbox.smbclient_s3.plain (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_s3.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', binpath('smbclient3'), binpath('wbinfo'), configuration])
-for env in ["member"]:
+for env in memberenvs:
plantestsuite("samba3.blackbox.smbclient_s3.plain (%s) member creds" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_s3.sh"), '$SERVER', '$SERVER_IP', '$SERVER', '$SERVER\\\\$USERNAME', '$PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', binpath('smbclient3'), binpath('wbinfo'), configuration])
for env in ["s3dc"]: