mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
8cdb3995ca
This is implemented using cmocka and the __wrap override for pthread_create. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13170 Signed-off-by: Christof Schmitt <cs@samba.org Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Fri Dec 8 13:54:20 CET 2017 on sn-devel-144
31 lines
1.1 KiB
Python
31 lines
1.1 KiB
Python
#!/usr/bin/env python
|
|
|
|
if bld.env.WITH_PTHREADPOOL:
|
|
bld.SAMBA_SUBSYSTEM('PTHREADPOOL',
|
|
source='''pthreadpool.c
|
|
pthreadpool_pipe.c
|
|
pthreadpool_tevent.c
|
|
''',
|
|
deps='pthread rt replace tevent-util')
|
|
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,
|
|
install=False)
|
|
|
|
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'],
|
|
install=False)
|