#!/usr/bin/env python
APPNAME = 'talloc'
-VERSION = '2.1.2'
+VERSION = '2.1.9'
blddir = 'bin'
conf.env.standalone_talloc = conf.IN_LAUNCH_DIR()
+ conf.define('TALLOC_BUILD_VERSION_MAJOR', int(VERSION.split('.')[0]))
+ conf.define('TALLOC_BUILD_VERSION_MINOR', int(VERSION.split('.')[1]))
+ conf.define('TALLOC_BUILD_VERSION_RELEASE', int(VERSION.split('.')[2]))
+
conf.env.disable_python = getattr(Options.options, 'disable_python', False)
if not conf.env.standalone_talloc:
Logs.warn('Disabling pytalloc-util as python devel libs not found')
conf.env.disable_python = True
+ conf.CHECK_HEADERS('sys/auxv.h')
+ conf.CHECK_FUNCS('getauxval')
+
conf.SAMBA_CONFIG_H()
conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS()
testsuite_deps,
install=False)
+ bld.SAMBA_BINARY('talloc_test_magic_differs_helper',
+ 'test_magic_differs_helper.c',
+ 'talloc', install=False)
+
else:
private_library = True
abi_match='talloc* _talloc*',
hide_symbols=True,
vnum=VERSION,
- public_headers='talloc.h',
+ public_headers=('' if private_library else 'talloc.h'),
pc_files='talloc.pc',
public_headers_install=not private_library,
private_library=private_library,
vnum=VERSION,
hide_symbols=True,
abi_directory='ABI',
- abi_match='pytalloc_*',
+ abi_match='pytalloc_* _pytalloc_*',
private_library=private_library,
- public_headers='pytalloc.h',
+ public_headers=('' if private_library else 'pytalloc.h'),
pc_files='pytalloc-util.pc'
)
bld.SAMBA_PYTHON('pytalloc',
'pytalloc.c',
deps='talloc ' + name,
- enabled=True,
realname='talloc.so')
bld.SAMBA_PYTHON('test_pytalloc',
'test_pytalloc.c',
deps='pytalloc',
- enabled=True,
realname='_test_pytalloc.so',
install=False)
def test(ctx):
'''run talloc testsuite'''
import Utils, samba_utils
- env = samba_utils.LOAD_ENVIRONMENT()
cmd = os.path.join(Utils.g_module.blddir, 'talloc_testsuite')
ret = samba_utils.RUN_COMMAND(cmd)
print("testsuite returned %d" % ret)
- if 'USING_SYSTEM_PYTALLOC_UTIL' not in env.defines and not env.disable_python:
- cmd = "PYTHONPATH=%s %s test_pytalloc.py" % (
- os.path.join(Utils.g_module.blddir, 'python'),
- env['PYTHON'],
- )
- pyret = samba_utils.RUN_COMMAND(cmd)
- else:
- pyret = 0
+ magic_helper_cmd = os.path.join(Utils.g_module.blddir, 'talloc_test_magic_differs_helper')
+ magic_cmd = os.path.join(srcdir, 'lib', 'talloc',
+ 'test_magic_differs.sh')
+
+ magic_ret = samba_utils.RUN_COMMAND(magic_cmd + " " + magic_helper_cmd)
+ print("magic differs test returned %d" % magic_ret)
+ pyret = samba_utils.RUN_PYTHON_TESTS(['test_pytalloc.py'])
print("python testsuite returned %d" % pyret)
- sys.exit(ret or pyret)
+ sys.exit(ret or magic_ret or pyret)
def dist():
'''makes a tarball for distribution'''