Contents of /trunk/ldb/patches/0002-ldb-Run-at-least-some-tests-on-32-bit-machines.patch
Parent Directory | Revision Log
Revision 3265 -
(show annotations)
(download)
Fri Dec 7 10:33:38 2018 UTC (5 years, 9 months ago) by niro
File size: 2115 byte(s)
Fri Dec 7 10:33:38 2018 UTC (5 years, 9 months ago) by niro
File size: 2115 byte(s)
-added 32bit fixes
1 | From 04e74153057d34b5dbdbc03f47d7684b4d4c1093 Mon Sep 17 00:00:00 2001 |
2 | From: Lukas Slebodnik <lslebodn@fedoraproject.org> |
3 | Date: Wed, 30 May 2018 23:22:40 +0200 |
4 | Subject: [PATCH] ldb: Run at least some tests on 32 bit machines |
5 | |
6 | lmdb is supported only on 64 bit machines. But there also |
7 | unit tests which pass just with tdb on 32 bit architectures. |
8 | |
9 | Signed-off-by: Lukas Slebodnik <lslebodn@fedoraproject.org> |
10 | --- |
11 | lib/ldb/wscript | 19 +++++++++++-------- |
12 | 1 file changed, 11 insertions(+), 8 deletions(-) |
13 | |
14 | diff --git a/lib/ldb/wscript b/lib/ldb/wscript |
15 | index f5cb1e0ab28dc01e5b031c7c290bed26c7007676..03279772557284d96f5b8c81ed4a8513e5c65f17 100644 |
16 | --- a/lib/ldb/wscript |
17 | +++ b/lib/ldb/wscript |
18 | @@ -518,10 +518,6 @@ def test(ctx): |
19 | env = samba_utils.LOAD_ENVIRONMENT() |
20 | ctx.env = env |
21 | |
22 | - if not env.HAVE_LMDB: |
23 | - raise Utils.WafError('make test called, but ldb was built ' |
24 | - '--without-ldb-lmdb') |
25 | - |
26 | test_prefix = "%s/st" % (Utils.g_module.blddir) |
27 | shutil.rmtree(test_prefix, ignore_errors=True) |
28 | os.makedirs(test_prefix) |
29 | @@ -537,9 +533,13 @@ def test(ctx): |
30 | tmp_dir = os.path.join(test_prefix, 'tmp') |
31 | if not os.path.exists(tmp_dir): |
32 | os.mkdir(tmp_dir) |
33 | - pyret = samba_utils.RUN_PYTHON_TESTS( |
34 | - ['tests/python/api.py', 'tests/python/index.py'], |
35 | - extra_env={'SELFTEST_PREFIX': test_prefix}) |
36 | + |
37 | + if env.HAVE_LMDB: |
38 | + pyret = samba_utils.RUN_PYTHON_TESTS( |
39 | + ['tests/python/api.py', 'tests/python/index.py'], |
40 | + extra_env={'SELFTEST_PREFIX': test_prefix}) |
41 | + else: |
42 | + pyret = 0 |
43 | print("Python testsuite returned %d" % pyret) |
44 | |
45 | cmocka_ret = 0 |
46 | @@ -549,7 +549,10 @@ def test(ctx): |
47 | 'ldb_tdb_guid_mod_op_test', |
48 | 'ldb_msg_test', |
49 | 'ldb_tdb_kv_ops_test', |
50 | - 'ldb_tdb_test', |
51 | + 'ldb_tdb_test'] |
52 | + |
53 | + if env.HAVE_LMDB: |
54 | + test_exes += [ |
55 | 'ldb_mdb_mod_op_test', |
56 | 'ldb_lmdb_test', |
57 | # we don't want to run ldb_lmdb_size_test (which proves we can |
58 | -- |
59 | 2.17.0 |
60 |