ldb: version 1.4.1
[samba.git] / lib / ldb / wscript
1 #!/usr/bin/env python
2
3 APPNAME = 'ldb'
4 VERSION = '1.4.1'
5
6 blddir = 'bin'
7
8 import sys, os
9 import Logs
10
11 # find the buildtools directory
12 srcdir = '.'
13 while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
14     srcdir = srcdir + '/..'
15 sys.path.insert(0, srcdir + '/buildtools/wafsamba')
16
17 import wafsamba, samba_dist, Utils, Options
18
19 samba_dist.DIST_DIRS('''lib/ldb:. lib/replace:lib/replace lib/talloc:lib/talloc
20                         lib/tdb:lib/tdb lib/tdb:lib/tdb lib/tevent:lib/tevent
21                         third_party/popt:third_party/popt
22                         third_party/cmocka:third_party/cmocka
23                         buildtools:buildtools third_party/waf:third_party/waf''')
24
25 samba_dist.DIST_FILES('''lib/util/binsearch.h:lib/util/binsearch.h''')
26
27 def set_options(opt):
28     opt.BUILTIN_DEFAULT('replace')
29     opt.PRIVATE_EXTENSION_DEFAULT('ldb', noextension='ldb')
30     opt.RECURSE('lib/tdb')
31     opt.RECURSE('lib/tevent')
32     opt.RECURSE('lib/replace')
33     opt.tool_options('python') # options for disabling pyc or pyo compilation
34
35     opt.add_option('--without-ldb-lmdb',
36                    help='disable new LMDB backend for LDB',
37                    action='store_true', dest='without_ldb_lmdb', default=False)
38
39
40 def configure(conf):
41     conf.RECURSE('lib/tdb')
42     conf.RECURSE('lib/tevent')
43
44     if conf.CHECK_FOR_THIRD_PARTY():
45         conf.RECURSE('third_party/popt')
46         conf.RECURSE('third_party/cmocka')
47     else:
48         if not conf.CHECK_POPT():
49             raise Utils.WafError('popt development packages have not been found.\nIf third_party is installed, check that it is in the proper place.')
50         else:
51             conf.define('USING_SYSTEM_POPT', 1)
52
53         if not conf.CHECK_CMOCKA():
54             raise Utils.WafError('cmocka development package have not been found.\nIf third_party is installed, check that it is in the proper place.')
55         else:
56             conf.define('USING_SYSTEM_CMOCKA', 1)
57
58     conf.RECURSE('lib/replace')
59     conf.find_program('python', var='PYTHON')
60     conf.find_program('xsltproc', var='XSLTPROC')
61     conf.check_tool('python')
62     conf.check_python_version((2,4,2))
63     conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=not conf.env.disable_python)
64
65     # where does the default LIBDIR end up? in conf.env somewhere?
66     #
67     conf.CONFIG_PATH('LDB_MODULESDIR', conf.SUBST_ENV_VAR('MODULESDIR') + '/ldb')
68
69     conf.env.standalone_ldb = conf.IN_LAUNCH_DIR()
70
71     if not conf.env.standalone_ldb:
72         max_ldb_version = [int(x) for x in VERSION.split(".")]
73         max_ldb_version[2] = 999
74         max_ldb_version_dots = "%d.%d.%d" % tuple(max_ldb_version)
75
76         if conf.env.disable_python:
77             if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb',
78                                              minversion=VERSION,
79                                              maxversion=max_ldb_version_dots,
80                                              onlyif='talloc tdb tevent',
81                                              implied_deps='replace talloc tdb tevent'):
82                 conf.define('USING_SYSTEM_LDB', 1)
83         else:
84             using_system_pyldb_util = True
85             if not conf.CHECK_BUNDLED_SYSTEM_PKG('pyldb-util',
86                                                  minversion=VERSION,
87                                                  maxversion=max_ldb_version_dots,
88                                                  onlyif='talloc tdb tevent',
89                                                  implied_deps='replace talloc tdb tevent ldb'):
90                 using_system_pyldb_util = False
91
92             # We need to get a pyldb-util for all the python versions
93             # we are building for
94             if conf.env['EXTRA_PYTHON']:
95                 name = 'pyldb-util' + conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG']
96                 if not conf.CHECK_BUNDLED_SYSTEM_PKG(name,
97                                                      minversion=VERSION,
98                                                      maxversion=max_ldb_version_dots,
99                                                      onlyif='talloc tdb tevent',
100                                                      implied_deps='replace talloc tdb tevent ldb'):
101                     using_system_pyldb_util = False
102
103             if using_system_pyldb_util:
104                 conf.define('USING_SYSTEM_PYLDB_UTIL', 1)
105
106             if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb',
107                                              minversion=VERSION,
108                                              maxversion=max_ldb_version_dots,
109                                              onlyif='talloc tdb tevent pyldb-util',
110                                              implied_deps='replace talloc tdb tevent'):
111                 conf.define('USING_SYSTEM_LDB', 1)
112
113     if not conf.CHECK_CODE('return !(sizeof(size_t) >= 8)',
114                            "HAVE_64_BIT_SIZE_T_FOR_LMDB",
115                            execute=True,
116                            msg='Checking for a 64-bit host to '
117                            'support lmdb'):
118         Logs.warn("--without-ldb-lmdb implied as this "
119                   "host is not 64-bit")
120
121         if not conf.env.standalone_ldb and \
122            not Options.options.without_ad_dc and \
123            conf.CONFIG_GET('ENABLE_SELFTEST'):
124             Logs.warn("NOTE: Some AD DC parts of selftest will fail")
125
126         conf.env.REQUIRE_LMDB = False
127     else:
128         if conf.env.standalone_ldb:
129             if Options.options.without_ldb_lmdb:
130                 conf.env.REQUIRE_LMDB = False
131             else:
132                 conf.env.REQUIRE_LMDB = True
133         elif Options.options.without_ad_dc:
134             conf.env.REQUIRE_LMDB = False
135         else:
136             if Options.options.without_ldb_lmdb:
137                 if not Options.options.without_ad_dc and \
138                    conf.CONFIG_GET('ENABLE_SELFTEST'):
139                     raise Utils.WafError('--without-ldb-lmdb conflicts '
140                                          'with --enable-selftest while '
141                                          'building the AD DC')
142
143                 conf.env.REQUIRE_LMDB = False
144             else:
145                 conf.env.REQUIRE_LMDB = True
146
147
148     if conf.CONFIG_SET('USING_SYSTEM_LDB'):
149         v = VERSION.split('.')
150         conf.DEFINE('EXPECTED_SYSTEM_LDB_VERSION_MAJOR', int(v[0]))
151         conf.DEFINE('EXPECTED_SYSTEM_LDB_VERSION_MINOR', int(v[1]))
152         conf.DEFINE('EXPECTED_SYSTEM_LDB_VERSION_RELEASE', int(v[2]))
153
154     if conf.env.standalone_ldb:
155         conf.CHECK_XSLTPROC_MANPAGES()
156
157         # we need this for the ldap backend
158         if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
159             conf.env.ENABLE_LDAP_BACKEND = True
160
161         # we don't want any libraries or modules to rely on runtime
162         # resolution of symbols
163         if not sys.platform.startswith("openbsd"):
164             conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
165
166     # if lmdb support is enabled then we require lmdb
167     # is present, build the mdb back end and enable lmdb support in
168     # the tools.
169     if conf.env.REQUIRE_LMDB and \
170        not conf.CONFIG_SET('USING_SYSTEM_LDB'):
171         if not conf.CHECK_CFG(package='lmdb',
172                               args='"lmdb >= 0.9.16" --cflags --libs',
173                               msg='Checking for lmdb >= 0.9.16',
174                               mandatory=False):
175             if not conf.CHECK_CODE('''
176                     #if MDB_VERSION_MAJOR == 0 \
177                       && MDB_VERSION_MINOR <= 9 \
178                       && MDB_VERSION_PATCH < 16
179                     #error LMDB too old
180                     #endif
181                     ''',
182                     'HAVE_GOOD_LMDB_VERSION',
183                     headers='lmdb.h',
184                     msg='Checking for lmdb >= 0.9.16 via header check'):
185
186                 if conf.env.standalone_ldb:
187                     raise Utils.WafError('ldb build (unless --without-ldb-lmdb) '
188                                          'requires '
189                                          'lmdb 0.9.16 or later')
190                 elif not Options.options.without_ad_dc:
191                     raise Utils.WafError('Samba AD DC and --enable-selftest '
192                                          'requires '
193                                          'lmdb 0.9.16 or later')
194
195         if conf.CHECK_FUNCS_IN('mdb_env_create', 'lmdb', headers='lmdb.h'):
196             conf.DEFINE('HAVE_LMDB', '1')
197
198
199     conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
200
201     conf.SAMBA_CONFIG_H()
202
203     conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS()
204
205 def build(bld):
206     bld.RECURSE('lib/tevent')
207
208     if bld.CHECK_FOR_THIRD_PARTY():
209         bld.RECURSE('third_party/popt')
210         bld.RECURSE('third_party/cmocka')
211
212     bld.RECURSE('lib/replace')
213     bld.RECURSE('lib/tdb')
214
215     if bld.env.standalone_ldb:
216         if not 'PACKAGE_VERSION' in bld.env:
217             bld.env.PACKAGE_VERSION = VERSION
218         bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
219         private_library = False
220     else:
221         private_library = True
222     # we're not currently linking against the ldap libs, but ldb.pc.in
223     # has @LDAP_LIBS@
224     bld.env.LDAP_LIBS = ''
225
226     LDB_MAP_SRC = bld.SUBDIR('ldb_map',
227                              'ldb_map.c ldb_map_inbound.c ldb_map_outbound.c')
228
229     COMMON_SRC = bld.SUBDIR('common',
230                             '''ldb_modules.c ldb_ldif.c ldb_parse.c ldb_msg.c ldb_utf8.c
231                             ldb_debug.c ldb_dn.c ldb_match.c ldb_options.c ldb_pack.c
232                             ldb_attributes.c attrib_handlers.c ldb_controls.c qsort.c''')
233
234     bld.SAMBA_MODULE('ldb_ldap', 'ldb_ldap/ldb_ldap.c',
235                      init_function='ldb_ldap_init',
236                      module_init_name='ldb_init_module',
237                      deps='talloc lber ldap ldb',
238                      enabled=bld.env.ENABLE_LDAP_BACKEND,
239                      internal_module=False,
240                      subsystem='ldb')
241
242     if bld.PYTHON_BUILD_IS_ENABLED():
243         if not bld.CONFIG_SET('USING_SYSTEM_PYLDB_UTIL'):
244             for env in bld.gen_python_environments(['PKGCONFIGDIR']):
245
246                 name = bld.pyembed_libname('pyldb-util')
247                 bld.SAMBA_LIBRARY(name,
248                                   deps='ldb',
249                                   source='pyldb_util.c',
250                                   public_headers=('' if private_library else 'pyldb.h'),
251                                   public_headers_install=not private_library,
252                                   vnum=VERSION,
253                                   private_library=private_library,
254                                   pc_files='pyldb-util.pc',
255                                   pyembed=True,
256                                   enabled=bld.PYTHON_BUILD_IS_ENABLED(),
257                                   abi_directory='ABI',
258                                   abi_match='pyldb_*')
259
260                 if not bld.CONFIG_SET('USING_SYSTEM_LDB'):
261                     bld.SAMBA_PYTHON('pyldb', 'pyldb.c',
262                                      deps='ldb ' + name,
263                                      realname='ldb.so',
264                                      cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION)
265
266         # Do only install this file as part of the Samba build if we do not
267         # use the system libldb!
268         if not bld.CONFIG_SET('USING_SYSTEM_PYLDB_UTIL'):
269             for env in bld.gen_python_environments(['PKGCONFIGDIR']):
270                     bld.SAMBA_SCRIPT('_ldb_text.py',
271                                      pattern='_ldb_text.py',
272                                      installdir='python')
273
274                     bld.INSTALL_FILES('${PYTHONARCHDIR}', '_ldb_text.py')
275
276     if not bld.CONFIG_SET('USING_SYSTEM_LDB'):
277         if bld.is_install:
278             modules_dir = bld.EXPAND_VARIABLES('${LDB_MODULESDIR}')
279         else:
280             # when we run from the source directory, we want to use
281             # the current modules, not the installed ones
282             modules_dir = os.path.join(os.getcwd(), 'bin/modules/ldb')
283
284         abi_match = '!ldb_*module_ops !ldb_*backend_ops ldb_*'
285
286         ldb_headers = ('include/ldb.h include/ldb_errors.h '
287                        'include/ldb_module.h include/ldb_handlers.h')
288
289         bld.SAMBA_LIBRARY('ldb',
290                           COMMON_SRC + ' ' + LDB_MAP_SRC,
291                           deps='tevent LIBLDB_MAIN replace',
292                           includes='include',
293                           public_headers=('' if private_library else ldb_headers),
294                           public_headers_install=not private_library,
295                           pc_files='ldb.pc',
296                           vnum=VERSION,
297                           private_library=private_library,
298                           manpages='man/ldb.3',
299                           abi_directory='ABI',
300                           abi_match = abi_match)
301
302         # generate a include/ldb_version.h
303         def generate_ldb_version_h(t):
304             '''generate a vscript file for our public libraries'''
305
306             tgt = t.outputs[0].bldpath(t.env)
307
308             v = t.env.LDB_VERSION.split('.')
309
310             f = open(tgt, mode='w')
311             try:
312                 f.write('#define LDB_VERSION "%s"\n' % t.env.LDB_VERSION)
313                 f.write('#define LDB_VERSION_MAJOR %d\n' % int(v[0]))
314                 f.write('#define LDB_VERSION_MINOR %d\n' % int(v[1]))
315                 f.write('#define LDB_VERSION_RELEASE %d\n' % int(v[2]))
316             finally:
317                 f.close()
318             return
319         t = bld.SAMBA_GENERATOR('ldb_version.h',
320                                 rule=generate_ldb_version_h,
321                                 dep_vars=['LDB_VERSION'],
322                                 target='include/ldb_version.h',
323                                 public_headers='include/ldb_version.h',
324                                 public_headers_install=not private_library)
325         t.env.LDB_VERSION = VERSION
326
327
328         bld.SAMBA_MODULE('ldb_paged_results',
329                          'modules/paged_results.c',
330                          init_function='ldb_paged_results_init',
331                          module_init_name='ldb_init_module',
332                          internal_module=False,
333                          deps='ldb',
334                          subsystem='ldb')
335
336         bld.SAMBA_MODULE('ldb_asq',
337                          'modules/asq.c',
338                          init_function='ldb_asq_init',
339                          module_init_name='ldb_init_module',
340                          internal_module=False,
341                          deps='ldb',
342                          subsystem='ldb')
343
344         bld.SAMBA_MODULE('ldb_server_sort',
345                          'modules/sort.c',
346                          init_function='ldb_server_sort_init',
347                          internal_module=False,
348                          module_init_name='ldb_init_module',
349                          deps='ldb',
350                          subsystem='ldb')
351
352         bld.SAMBA_MODULE('ldb_paged_searches',
353                          'modules/paged_searches.c',
354                          init_function='ldb_paged_searches_init',
355                          internal_module=False,
356                          module_init_name='ldb_init_module',
357                          deps='ldb',
358                          subsystem='ldb')
359
360         bld.SAMBA_MODULE('ldb_rdn_name',
361                          'modules/rdn_name.c',
362                          init_function='ldb_rdn_name_init',
363                          internal_module=False,
364                          module_init_name='ldb_init_module',
365                          deps='ldb',
366                          subsystem='ldb')
367
368         bld.SAMBA_MODULE('ldb_sample',
369                          'tests/sample_module.c',
370                          init_function='ldb_sample_init',
371                          internal_module=False,
372                          module_init_name='ldb_init_module',
373                          deps='ldb',
374                          subsystem='ldb')
375
376         bld.SAMBA_MODULE('ldb_skel',
377                          'modules/skel.c',
378                          init_function='ldb_skel_init',
379                          internal_module=False,
380                          module_init_name='ldb_init_module',
381                          deps='ldb',
382                          subsystem='ldb')
383
384         bld.SAMBA_MODULE('ldb_sqlite3',
385                          'sqlite3/ldb_sqlite3.c',
386                          init_function='ldb_sqlite3_init',
387                          internal_module=False,
388                          module_init_name='ldb_init_module',
389                          enabled=False,
390                          deps='ldb',
391                          subsystem='ldb')
392
393         bld.SAMBA_MODULE('ldb_tdb',
394                          bld.SUBDIR('ldb_tdb',
395                                     '''ldb_tdb_init.c'''),
396                          init_function='ldb_tdb_init',
397                          module_init_name='ldb_init_module',
398                          internal_module=False,
399                          deps='tdb ldb ldb_key_value',
400                          subsystem='ldb')
401
402         bld.SAMBA_LIBRARY('ldb_key_value',
403                           bld.SUBDIR('ldb_tdb',
404                                     '''ldb_tdb.c ldb_search.c ldb_index.c
405                                     ldb_cache.c ldb_tdb_wrap.c'''),
406                           private_library=True,
407                           deps='tdb ldb')
408
409         if bld.CONFIG_SET('HAVE_LMDB'):
410             bld.SAMBA_MODULE('ldb_mdb',
411                              bld.SUBDIR('ldb_mdb',
412                                         '''ldb_mdb_init.c'''),
413                              init_function='ldb_mdb_init',
414                              module_init_name='ldb_init_module',
415                              internal_module=False,
416                              deps='ldb ldb_key_value ldb_mdb_int',
417                              subsystem='ldb')
418
419             bld.SAMBA_LIBRARY('ldb_mdb_int',
420                               bld.SUBDIR('ldb_mdb',
421                                          '''ldb_mdb.c '''),
422                               private_library=True,
423                               deps='ldb lmdb ldb_key_value')
424             lmdb_deps = ' ldb_mdb_int'
425         else:
426             lmdb_deps = ''
427
428
429         bld.SAMBA_MODULE('ldb_ldb',
430                          bld.SUBDIR('ldb_ldb',
431                                     '''ldb_ldb.c'''),
432                          init_function='ldb_ldb_init',
433                          module_init_name='ldb_init_module',
434                          internal_module=False,
435                          deps='ldb ldb_key_value' + lmdb_deps,
436                          subsystem='ldb')
437
438         # have a separate subsystem for common/ldb.c, so it can rebuild
439         # for install with a different -DLDB_MODULESDIR=
440         bld.SAMBA_SUBSYSTEM('LIBLDB_MAIN',
441                             'common/ldb.c',
442                             deps='tevent tdb',
443                             includes='include',
444                             cflags=['-DLDB_MODULESDIR=\"%s\"' % modules_dir])
445
446         LDB_TOOLS='ldbadd ldbsearch ldbdel ldbmodify ldbedit ldbrename'
447         for t in LDB_TOOLS.split():
448             bld.SAMBA_BINARY(t, 'tools/%s.c' % t, deps='ldb-cmdline ldb',
449                              manpages='man/%s.1' % t)
450
451         # ldbtest doesn't get installed
452         bld.SAMBA_BINARY('ldbtest', 'tools/ldbtest.c', deps='ldb-cmdline ldb',
453                          install=False)
454
455         if bld.CONFIG_SET('HAVE_LMDB'):
456             lmdb_deps = ' lmdb'
457         else:
458             lmdb_deps = ''
459         # ldbdump doesn't get installed
460         bld.SAMBA_BINARY('ldbdump',
461                          'tools/ldbdump.c',
462                          deps='ldb-cmdline ldb' + lmdb_deps,
463                          install=False)
464
465         bld.SAMBA_LIBRARY('ldb-cmdline',
466                           source='tools/ldbutil.c tools/cmdline.c',
467                           deps='ldb dl popt',
468                           private_library=True)
469
470         bld.SAMBA_BINARY('ldb_tdb_mod_op_test',
471                          source='tests/ldb_mod_op_test.c',
472                          cflags='-DTEST_BE=\"tdb\"',
473                          deps='cmocka ldb',
474                          install=False)
475
476         bld.SAMBA_BINARY('ldb_tdb_guid_mod_op_test',
477                          source='tests/ldb_mod_op_test.c',
478                          cflags='-DTEST_BE=\"tdb\" -DGUID_IDX=1',
479                          deps='cmocka ldb',
480                          install=False)
481
482         bld.SAMBA_BINARY('ldb_tdb_kv_ops_test',
483                          source='tests/ldb_kv_ops_test.c',
484                          cflags='-DTEST_BE=\"tdb\"',
485                          deps='cmocka ldb',
486                          install=False)
487
488         bld.SAMBA_BINARY('ldb_tdb_test',
489                          source='tests/ldb_tdb_test.c',
490                          deps='cmocka ldb',
491                          install=False)
492
493         bld.SAMBA_BINARY('ldb_msg_test',
494                          source='tests/ldb_msg.c',
495                          deps='cmocka ldb',
496                          install=False)
497
498         bld.SAMBA_BINARY('test_ldb_qsort',
499                          source='tests/test_ldb_qsort.c',
500                          deps='cmocka ldb',
501                          install=False)
502
503         if bld.CONFIG_SET('HAVE_LMDB'):
504             bld.SAMBA_BINARY('ldb_mdb_mod_op_test',
505                              source='tests/ldb_mod_op_test.c',
506                              cflags='-DTEST_BE=\"mdb\" -DGUID_IDX=1 '
507                                   + '-DTEST_LMDB=1',
508                              deps='cmocka ldb lmdb',
509                              install=False)
510
511             bld.SAMBA_BINARY('ldb_lmdb_test',
512                              source='tests/ldb_lmdb_test.c',
513                              deps='cmocka ldb',
514                              install=False)
515
516             bld.SAMBA_BINARY('ldb_lmdb_size_test',
517                              source='tests/ldb_lmdb_size_test.c',
518                              deps='cmocka ldb',
519                              install=False)
520
521             bld.SAMBA_BINARY('ldb_mdb_kv_ops_test',
522                              source='tests/ldb_kv_ops_test.c',
523                              cflags='-DTEST_BE=\"mdb\"',
524                              deps='cmocka ldb',
525                              install=False)
526
527 def test(ctx):
528     '''run ldb testsuite'''
529     import Utils, samba_utils, shutil
530     env = samba_utils.LOAD_ENVIRONMENT()
531     ctx.env = env
532
533     if not env.HAVE_LMDB:
534         raise Utils.WafError('make test called, but ldb was built '
535                              '--without-ldb-lmdb')
536
537     test_prefix = "%s/st" % (Utils.g_module.blddir)
538     shutil.rmtree(test_prefix, ignore_errors=True)
539     os.makedirs(test_prefix)
540     os.environ['TEST_DATA_PREFIX'] = test_prefix
541     os.environ['LDB_MODULES_PATH'] = Utils.g_module.blddir + "/modules/ldb"
542     samba_utils.ADD_LD_LIBRARY_PATH('bin/shared')
543     samba_utils.ADD_LD_LIBRARY_PATH('bin/shared/private')
544
545     cmd = 'tests/test-tdb.sh %s' % Utils.g_module.blddir
546     ret = samba_utils.RUN_COMMAND(cmd)
547     print("testsuite returned %d" % ret)
548
549     tmp_dir = os.path.join(test_prefix, 'tmp')
550     if not os.path.exists(tmp_dir):
551         os.mkdir(tmp_dir)
552     pyret = samba_utils.RUN_PYTHON_TESTS(
553         ['tests/python/api.py', 'tests/python/index.py'],
554         extra_env={'SELFTEST_PREFIX': test_prefix})
555     print("Python testsuite returned %d" % pyret)
556
557     cmocka_ret = 0
558     test_exes = ['test_ldb_qsort',
559                  'ldb_msg_test',
560                  'ldb_tdb_mod_op_test',
561                  'ldb_tdb_guid_mod_op_test',
562                  'ldb_msg_test',
563                  'ldb_tdb_kv_ops_test',
564                  'ldb_tdb_test',
565                  'ldb_mdb_mod_op_test',
566                  'ldb_lmdb_test',
567                  # we don't want to run ldb_lmdb_size_test (which proves we can
568                  # fit > 4G of data into the DB), it would fill up the disk on
569                  # many of our test instances
570                  'ldb_mdb_kv_ops_test']
571
572     for test_exe in test_exes:
573             cmd = os.path.join(Utils.g_module.blddir, test_exe)
574             cmocka_ret = cmocka_ret or samba_utils.RUN_COMMAND(cmd)
575
576     sys.exit(ret or pyret or cmocka_ret)
577
578 def dist():
579     '''makes a tarball for distribution'''
580     samba_dist.dist()
581
582 def reconfigure(ctx):
583     '''reconfigure if config scripts have changed'''
584     import samba_utils
585     samba_utils.reconfigure(ctx)