]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
selftest: Always and only run ldb test-tdb test in Samba selftest
authorAndrew Bartlett <abartlet@samba.org>
Mon, 5 Feb 2024 04:01:54 +0000 (17:01 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 1 Mar 2024 02:41:36 +0000 (02:41 +0000)
This is the last test left in the independent ldb testsuite,
removing this from there allows the test target to be removed.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
lib/ldb/wscript
source4/selftest/tests.py

index f89c5da7ab70c6983b2313643a5ad05b00f6b401..56e9f94a51748eadd1bbb4a45d05168c48c12af2 100644 (file)
@@ -593,25 +593,6 @@ def build(bld):
                              deps='cmocka ldb',
                              install=False)
 
-def test(ctx):
-    '''run ldb testsuite'''
-    env = samba_utils.LOAD_ENVIRONMENT()
-    ctx.env = env
-
-    test_prefix = "%s/st" % (Context.g_module.out)
-    shutil.rmtree(test_prefix, ignore_errors=True)
-    os.makedirs(test_prefix)
-    os.environ['TEST_DATA_PREFIX'] = test_prefix
-    os.environ['LDB_MODULES_PATH'] = Context.g_module.out + "/modules/ldb"
-    samba_utils.ADD_LD_LIBRARY_PATH('bin/shared')
-    samba_utils.ADD_LD_LIBRARY_PATH('bin/shared/private')
-
-    cmd = 'tests/test-tdb.sh %s' % Context.g_module.out
-    ret = samba_utils.RUN_COMMAND(cmd)
-    print("testsuite returned %d" % ret)
-
-    sys.exit(ret)
-
 def dist():
     '''makes a tarball for distribution'''
     samba_dist.dist()
index 7b6df50002927678270d4138b64eaef82da376f7..7964f158ac5899d9365a05766a00d850f15f044d 100755 (executable)
@@ -203,11 +203,7 @@ for t in smbtorture4_testsuites("dsdb."):
     plansmbtorture4testsuite(t, "ad_dc:local", "localhost")
 
 ldbdir = os.path.join(srcdir(), "lib/ldb")
-# Don't run LDB tests when using system ldb, as we won't have ldbtest installed
-if os.path.exists(os.path.join(samba4bindir, "ldbtest")):
-    plantestsuite("ldb.base", "none", "%s/tests/test-tdb-subunit.sh %s" % (ldbdir, samba4bindir))
-else:
-    skiptestsuite("ldb.base", "Using system LDB, ldbtest not available")
+plantestsuite("ldb.base", "none", "%s/tests/test-tdb-subunit.sh %s" % (ldbdir, samba4bindir))
 
 plantestsuite_loadlist("samba4.tests.attr_from_server.python(ad_dc_ntvfs)",
                        "ad_dc_ntvfs:local",