mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
6107c79c90
Add new for_selftest option to SAMBA_BINARY() and SAMBA3_BINARY() This allows us to be much more consistent (at least in the core Samba) and documents clearly why the binary should not be installed. Not modified are - test_lp_load - notifyd-tests - gendrandperf - test* from examples/libsmbclient - dbwrap_torture - split_tokens - locktest2 - msgtest - msg_sink - msg_source - versiontest - rpc_open_tcp - test_headers As these are not tested in selftest so any change would also be untested. Of course they probably should be added in a different MR. Also not modified (because they are not tests, nor part of the build system) are: - smb2mount - notifydd - log2pacp - debug2html - smbfilter - destroy_netlogon_creds_cli - spotlight2* - tevent_glib_tracker These do however appear to be untested. For now, the source4 forked client tools are left unchanged: - smbclient4 - nmblookup4 Finally, the heimdal binaries are left as install=False as they are either part of the build system or end-user tools that we just don't want to install. These are however tested. The motivation is commit likec34ec003b7
andda87fa998a
, which are both totally correct but are not needed if the selftest is not run on MacOS. There are likely other platforms or build environments where building our test binaries is more pain than valuable, see for example also https://lists.samba.org/archive/samba/2019-November/227137.html Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Isaac Boukris <iboukris@samba.org> Autobuild-User(master): Isaac Boukris <iboukris@samba.org> Autobuild-Date(master): Fri Nov 22 11:48:59 UTC 2019 on sn-devel-184
36 lines
1.3 KiB
Python
36 lines
1.3 KiB
Python
#!/usr/bin/env python
|
|
|
|
if bld.env.WITH_PTHREADPOOL:
|
|
extra_libs=''
|
|
|
|
# Link to librt if needed for clock_gettime()
|
|
if bld.CONFIG_SET('HAVE_LIBRT'): extra_libs += ' rt'
|
|
|
|
bld.SAMBA_SUBSYSTEM('PTHREADPOOL',
|
|
source='''pthreadpool.c
|
|
pthreadpool_pipe.c
|
|
pthreadpool_tevent.c
|
|
''',
|
|
deps='pthread replace tevent-util' + extra_libs)
|
|
else:
|
|
bld.SAMBA_SUBSYSTEM('PTHREADPOOL',
|
|
source='''pthreadpool_sync.c
|
|
pthreadpool_pipe.c
|
|
pthreadpool_tevent.c
|
|
''',
|
|
deps='replace tevent-util')
|
|
|
|
|
|
bld.SAMBA_BINARY('pthreadpooltest',
|
|
source='tests.c',
|
|
deps='PTHREADPOOL',
|
|
enabled=bld.env.WITH_PTHREADPOOL,
|
|
for_selftest=True)
|
|
|
|
bld.SAMBA_BINARY('pthreadpooltest_cmocka',
|
|
source='tests_cmocka.c',
|
|
deps='PTHREADPOOL cmocka',
|
|
ldflags='-Wl,--wrap=pthread_create',
|
|
enabled=bld.env.WITH_PTHREADPOOL and bld.env['HAVE_LDWRAP'],
|
|
for_selftest=True)
|