2019-01-17 22:41:53 +00:00
|
|
|
From c161c5d4a3184c0ae9a33d977f061458337d4ca1 Mon Sep 17 00:00:00 2001
|
2018-05-30 21:29:28 +00:00
|
|
|
From: Lukas Slebodnik <lslebodn@fedoraproject.org>
|
|
|
|
Date: Wed, 30 May 2018 23:22:40 +0200
|
|
|
|
Subject: [PATCH] ldb: Run at least some tests on 32 bit machines
|
|
|
|
|
|
|
|
lmdb is supported only on 64 bit machines. But there also
|
|
|
|
unit tests which pass just with tdb on 32 bit architectures.
|
|
|
|
|
|
|
|
Signed-off-by: Lukas Slebodnik <lslebodn@fedoraproject.org>
|
|
|
|
---
|
2019-01-17 22:41:53 +00:00
|
|
|
wscript | 19 +++++++++++--------
|
2018-05-30 21:29:28 +00:00
|
|
|
1 file changed, 11 insertions(+), 8 deletions(-)
|
|
|
|
|
2019-01-17 22:41:53 +00:00
|
|
|
diff --git a/wscript b/wscript
|
|
|
|
index ca0bf410f1029f33bab9b71514935011d57b1dbc..851344733645f51186d0b568f2741ac888a52660 100644
|
|
|
|
--- a/wscript
|
|
|
|
+++ b/wscript
|
|
|
|
@@ -540,10 +540,6 @@ def test(ctx):
|
2018-05-30 21:29:28 +00:00
|
|
|
env = samba_utils.LOAD_ENVIRONMENT()
|
|
|
|
ctx.env = env
|
|
|
|
|
|
|
|
- if not env.HAVE_LMDB:
|
2019-01-17 22:41:53 +00:00
|
|
|
- raise Errors.WafError('make test called, but ldb was built '
|
2018-05-30 21:29:28 +00:00
|
|
|
- '--without-ldb-lmdb')
|
|
|
|
-
|
2019-01-17 22:41:53 +00:00
|
|
|
test_prefix = "%s/st" % (Context.g_module.out)
|
2018-05-30 21:29:28 +00:00
|
|
|
shutil.rmtree(test_prefix, ignore_errors=True)
|
|
|
|
os.makedirs(test_prefix)
|
2019-01-17 22:41:53 +00:00
|
|
|
@@ -559,9 +555,13 @@ def test(ctx):
|
2018-05-30 21:29:28 +00:00
|
|
|
tmp_dir = os.path.join(test_prefix, 'tmp')
|
|
|
|
if not os.path.exists(tmp_dir):
|
|
|
|
os.mkdir(tmp_dir)
|
|
|
|
- pyret = samba_utils.RUN_PYTHON_TESTS(
|
|
|
|
- ['tests/python/api.py', 'tests/python/index.py'],
|
|
|
|
- extra_env={'SELFTEST_PREFIX': test_prefix})
|
|
|
|
+
|
|
|
|
+ if env.HAVE_LMDB:
|
|
|
|
+ pyret = samba_utils.RUN_PYTHON_TESTS(
|
|
|
|
+ ['tests/python/api.py', 'tests/python/index.py'],
|
|
|
|
+ extra_env={'SELFTEST_PREFIX': test_prefix})
|
|
|
|
+ else:
|
|
|
|
+ pyret = 0
|
|
|
|
print("Python testsuite returned %d" % pyret)
|
|
|
|
|
|
|
|
cmocka_ret = 0
|
2019-01-17 22:41:53 +00:00
|
|
|
@@ -572,7 +572,10 @@ def test(ctx):
|
2018-05-30 21:29:28 +00:00
|
|
|
'ldb_tdb_guid_mod_op_test',
|
|
|
|
'ldb_msg_test',
|
|
|
|
'ldb_tdb_kv_ops_test',
|
|
|
|
- 'ldb_tdb_test',
|
|
|
|
+ 'ldb_tdb_test']
|
|
|
|
+
|
|
|
|
+ if env.HAVE_LMDB:
|
|
|
|
+ test_exes += [
|
|
|
|
'ldb_mdb_mod_op_test',
|
|
|
|
'ldb_lmdb_test',
|
|
|
|
# we don't want to run ldb_lmdb_size_test (which proves we can
|
|
|
|
--
|
2019-01-17 22:41:53 +00:00
|
|
|
2.20.1
|
2018-05-30 21:29:28 +00:00
|
|
|
|