diff options
| author | Noel Power <noel.power@suse.com> | 2018-12-07 18:52:17 +0000 |
|---|---|---|
| committer | Andrew Bartlett <abartlet@samba.org> | 2018-12-14 00:51:32 +0100 |
| commit | d20f06986ee8f176106446c8ae32f0900ea4e4cf (patch) | |
| tree | 3388a12e749197aeaa8e07914dd31a7139bf9161 | |
| parent | e9a13d7fc84beb9546c75c8de15aa7246bed71e5 (diff) | |
| download | samba-d20f06986ee8f176106446c8ae32f0900ea4e4cf.tar.gz samba-d20f06986ee8f176106446c8ae32f0900ea4e4cf.tar.bz2 samba-d20f06986ee8f176106446c8ae32f0900ea4e4cf.zip | |
selftest: Convert samba4.ldap.sort.python to planoldpythontest
Currently the test only runs fully under python2. As an interim
measure while we figure out how to get this to work property under
python3 I have converted the test to planoldpythontest so it also
can run under python2
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
| -rw-r--r-- | source4/dsdb/tests/python/sort.py | 8 | ||||
| -rwxr-xr-x | source4/selftest/tests.py | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/source4/dsdb/tests/python/sort.py b/source4/dsdb/tests/python/sort.py index 0b87442af39..f9c7ecd37bb 100644 --- a/source4/dsdb/tests/python/sort.py +++ b/source4/dsdb/tests/python/sort.py @@ -43,7 +43,10 @@ if len(args) < 1: parser.print_usage() sys.exit(1) -host = args[0] +host = os.getenv("SERVER", None) +if not host: + print("Please specify the host with env variable SERVER") + sys.exit(1) lp = sambaopts.get_loadparm() creds = credopts.get_credentials(lp) @@ -387,6 +390,3 @@ if "://" not in host: host = "tdb://%s" % host else: host = "ldap://%s" % host - - -TestProgram(module=__name__, opts=subunitopts) diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index e8ff47c5ef4..5be30673ccc 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -869,7 +869,8 @@ plantestsuite_loadlist("samba4.ldap.match_rules.python", "ad_dc_ntvfs", [python, plantestsuite_loadlist("samba4.ldap.notification.python(ad_dc_ntvfs)", "ad_dc_ntvfs", [python, os.path.join(samba4srcdir, "dsdb/tests/python/notification.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT']) plantestsuite_loadlist("samba4.ldap.sites.python(ad_dc_ntvfs)", "ad_dc_ntvfs", [python, os.path.join(samba4srcdir, "dsdb/tests/python/sites.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT']) -plantestsuite_loadlist("samba4.ldap.sort.python(ad_dc_ntvfs)", "ad_dc_ntvfs", [python, os.path.join(samba4srcdir, "dsdb/tests/python/sort.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT']) +planoldpythontestsuite("ad_dc_ntvfs", "sort", environ={'SERVER' : '$SERVER'}, name="samba4.ldap.sort.python", extra_path=[os.path.join(samba4srcdir, 'dsdb/tests/python')], extra_args=['-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'], py3_compatible=True) + plantestsuite_loadlist("samba4.ldap.vlv.python(ad_dc_ntvfs)", "ad_dc_ntvfs", [python, os.path.join(samba4srcdir, "dsdb/tests/python/vlv.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT']) plantestsuite_loadlist("samba4.ldap.linked_attributes.python(ad_dc_ntvfs)", "ad_dc_ntvfs:local", [python, os.path.join(samba4srcdir, "dsdb/tests/python/linked_attributes.py"), '$PREFIX_ABS/ad_dc_ntvfs/private/sam.ldb', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT']) |
