diff options
-rwxr-xr-x | source3/selftest/tests.py | 78 | ||||
-rwxr-xr-x | source4/selftest/tests.py | 27 |
2 files changed, 41 insertions, 64 deletions
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index d50b3bae14..662d275bc9 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -33,18 +33,6 @@ try: except KeyError: config_h = os.path.join(samba3srcdir, "include/autoconf/config.h") -f = open(config_h, 'r') -try: - have_ads_support = ("HAVE_LDAP 1" in f.read()) -finally: - f.close() - -f = open(config_h, 'r') -try: - have_ads_support &= ("HAVE_KRB5 1" in f.read()) -finally: - f.close() - torture_options = [configuration, "--maximum-runtime=$SELFTEST_MAXTIME", "--target=samba3", "--basedir=$SELFTEST_TMPDIR", '--option="torture:winbindd_netbios_name=$SERVER"', @@ -283,48 +271,46 @@ for s in signseal_options: plantestsuite("samba3.blackbox.rpcclient over ncacn_np with [%s%s%s] " % (a, s, e), "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient.sh"), "none", options, configuration]) - if have_ads_support: - # We should try more combinations in future, but this is all - # the pre-calculated credentials cache supports at the moment - e = "" - a = "" - binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e) - options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-2" - plansmbtorturetestsuite(test, "ktest", options, 'krb5 with old ccache ncacn_np with [%s%s%s] ' % (a, s, e)) + # We should try more combinations in future, but this is all + # the pre-calculated credentials cache supports at the moment + e = "" + a = "" + binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e) + options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-2" + plansmbtorturetestsuite(test, "ktest", options, 'krb5 with old ccache ncacn_np with [%s%s%s] ' % (a, s, e)) - options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-3" - plansmbtorturetestsuite(test, "ktest", options, 'krb5 ncacn_np with [%s%s%s] ' % (a, s, e)) + options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-3" + plansmbtorturetestsuite(test, "ktest", options, 'krb5 ncacn_np with [%s%s%s] ' % (a, s, e)) - auth_options2 = ["krb5", "spnego,krb5"] - for a in auth_options2: - binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e) + auth_options2 = ["krb5", "spnego,krb5"] + for a in auth_options2: + binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e) - plantestsuite("samba3.blackbox.rpcclient krb5 ncacn_np with [%s%s%s] " % (a, s, e), "ktest:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient.sh"), + plantestsuite("samba3.blackbox.rpcclient krb5 ncacn_np with [%s%s%s] " % (a, s, e), "ktest:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient.sh"), "$PREFIX/ktest/krb5_ccache-3", binding_string, "-k", configuration]) options_list = ["", "-e"] for options in options_list: - if have_ads_support: - plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local", - [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"), - "$PREFIX/ktest/krb5_ccache-2", - binpath('smbclient3'), "$SERVER", options, configuration]) - - plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local", - [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"), - "$PREFIX/ktest/krb5_ccache-2", - binpath('smbclient3'), "$SERVER", options, configuration]) - - plantestsuite("samba3.blackbox.smbclient_large_file %s" % options, "ktest:local", - [os.path.join(samba3srcdir, "script/tests/test_smbclient_posix_large.sh"), - "$PREFIX/ktest/krb5_ccache-3", - binpath('smbclient3'), "$SERVER", "$PREFIX", options, "-k " + configuration]) - - plantestsuite("samba3.blackbox.smbclient_posix_large %s krb5" % options, "ktest:local", - [os.path.join(samba3srcdir, "script/tests/test_smbclient_posix_large.sh"), - "$PREFIX/ktest/krb5_ccache-3", - binpath('smbclient3'), "$SERVER", "$PREFIX", options, "-k " + configuration]) + plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local", + [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"), + "$PREFIX/ktest/krb5_ccache-2", + binpath('smbclient3'), "$SERVER", options, configuration]) + + plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local", + [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"), + "$PREFIX/ktest/krb5_ccache-2", + binpath('smbclient3'), "$SERVER", options, configuration]) + + plantestsuite("samba3.blackbox.smbclient_large_file %s" % options, "ktest:local", + [os.path.join(samba3srcdir, "script/tests/test_smbclient_posix_large.sh"), + "$PREFIX/ktest/krb5_ccache-3", + binpath('smbclient3'), "$SERVER", "$PREFIX", options, "-k " + configuration]) + + plantestsuite("samba3.blackbox.smbclient_posix_large %s krb5" % options, "ktest:local", + [os.path.join(samba3srcdir, "script/tests/test_smbclient_posix_large.sh"), + "$PREFIX/ktest/krb5_ccache-3", + binpath('smbclient3'), "$SERVER", "$PREFIX", options, "-k " + configuration]) plantestsuite("samba3.blackbox.smbclient_posix_large %s NTLM" % options, "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_smbclient_posix_large.sh"), diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index 8529cc991c..39c0f4b7ca 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -70,13 +70,6 @@ try: except KeyError: config_h = os.path.join(samba4bindir, "default/include/config.h") -f = open(config_h, 'r') -try: - # The other parts of the HAVE_ADS test are always supplied by the top level build - have_ads_support = ("HAVE_LDAP 1" in f.read()) -finally: - f.close() - # see if we support ldaps f = open(config_h, 'r') try: @@ -139,12 +132,11 @@ for bindoptions in ["seal,padcheck"] + validate_list + ["bigendian"]: #Plugin S4 DC tests (confirms named pipe auth forwarding). This can be expanded once kerberos is supported in the plugin DC # -if have_ads_support: - for bindoptions in ["seal,padcheck"] + validate_list + ["bigendian"]: - for t in ncacn_np_tests: - env = "plugin_s4_dc" - transport = "ncacn_np" - plansmbtorturetestsuite(t, env, ["%s:$SERVER[%s]" % (transport, bindoptions), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '-k', 'no'], "samba4.%s with %s" % (t, bindoptions)) +for bindoptions in ["seal,padcheck"] + validate_list + ["bigendian"]: + for t in ncacn_np_tests: + env = "plugin_s4_dc" + transport = "ncacn_np" + plansmbtorturetestsuite(t, env, ["%s:$SERVER[%s]" % (transport, bindoptions), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '-k', 'no'], "samba4.%s with %s" % (t, bindoptions)) for bindoptions in [""] + validate_list + ["bigendian"]: for t in auto_rpc_tests: @@ -361,11 +353,10 @@ for mech in [ signoptions = "%s --signing=off" % mech name = "smb.signing disabled on with %s" % signoptions plansmbtorturetestsuite('base.xcopy', "s4member", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s domain-creds" % name) - if have_ads_support: - plansmbtorturetestsuite('base.xcopy', "s3member", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s domain-creds" % name) - plansmbtorturetestsuite('base.xcopy', "plugin_s4_dc", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$USERNAME%$PASSWORD'], "samba4.%s" % name) - plansmbtorturetestsuite('base.xcopy', "plugin_s4_dc", - ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s administrator" % name) + plansmbtorturetestsuite('base.xcopy', "s3member", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s domain-creds" % name) + plansmbtorturetestsuite('base.xcopy', "plugin_s4_dc", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$USERNAME%$PASSWORD'], "samba4.%s" % name) + plansmbtorturetestsuite('base.xcopy', "plugin_s4_dc", + ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s administrator" % name) plantestsuite("samba4.blackbox.bogusdomain", "s3member", ["testprogs/blackbox/bogus.sh", "$NETBIOSNAME", "xcopy_share", '$DC_USERNAME', '$DC_PASSWORD'], allow_empty_output=True) for mech in [ |