aceededc9d83fdc6398c5f7b8d78d2a6dd58570a
[samba.git] / source4 / torture / wscript_build
1 #!/usr/bin/env python
2
3
4 bld.SAMBA_SUBSYSTEM('TORTURE_UTIL',
5         source='util_smb.c',
6         public_deps='torture popt POPT_CREDENTIALS',
7         deps='smbclient-raw'
8         )
9
10
11 bld.SAMBA_MODULE('TORTURE_BASIC',
12         source='basic/base.c basic/misc.c basic/scanner.c basic/utable.c basic/charset.c basic/mangle_test.c basic/denytest.c basic/aliases.c basic/locking.c basic/secleak.c basic/rename.c basic/dir.c basic/delete.c basic/unlink.c basic/disconnect.c basic/delaywrite.c basic/attr.c basic/properties.c',
13         subsystem='smbtorture',
14         deps='LIBCLI_SMB popt POPT_CREDENTIALS TORTURE_UTIL smbclient-raw TORTURE_RAW',
15         internal_module=True,
16         autoproto='basic/proto.h',
17         init_function='torture_base_init',
18         enabled=bld.PYTHON_BUILD_IS_ENABLED()
19         )
20
21
22 bld.SAMBA_MODULE('TORTURE_RAW',
23         source='raw/qfsinfo.c raw/qfileinfo.c raw/setfileinfo.c raw/search.c raw/close.c raw/open.c raw/mkdir.c raw/oplock.c raw/notify.c raw/mux.c raw/ioctl.c raw/chkpath.c raw/unlink.c raw/read.c raw/context.c raw/session.c raw/write.c raw/lock.c raw/pingpong.c raw/lockbench.c raw/lookuprate.c raw/tconrate.c raw/openbench.c raw/rename.c raw/eas.c raw/streams.c raw/acls.c raw/seek.c raw/samba3hide.c raw/samba3misc.c raw/composite.c raw/raw.c raw/offline.c',
24         autoproto='raw/proto.h',
25         subsystem='smbtorture',
26         init_function='torture_raw_init',
27         deps='LIBCLI_SMB LIBCLI_LSA LIBCLI_SMB_COMPOSITE popt POPT_CREDENTIALS TORTURE_UTIL',
28         internal_module=True,
29         enabled=bld.PYTHON_BUILD_IS_ENABLED()
30         )
31
32 bld.RECURSE('smb2')
33 bld.RECURSE('winbind')
34 bld.RECURSE('libnetapi')
35 bld.RECURSE('libsmbclient')
36 bld.RECURSE('gpo')
37
38 ntvfs_specific = dict(source='', deps='')
39
40 # Yes, the spoolss_notify test uses the NTVFS file server to run the SMB server expected
41 # to handle the RPC callback!
42 if bld.CONFIG_SET('WITH_NTVFS_FILESERVER'):
43         ntvfs_specific['source'] += ' rpc/spoolss_notify.c'
44         ntvfs_specific['deps'] += ' SMB_SERVER dcerpc_server ntvfs'
45
46 bld.SAMBA_SUBSYSTEM('TORTURE_NDR',
47         source='''ndr/ndr.c
48                   ndr/winreg.c
49                   ndr/atsvc.c
50                   ndr/lsa.c
51                   ndr/epmap.c
52                   ndr/dfs.c
53                   ndr/netlogon.c
54                   ndr/drsuapi.c
55                   ndr/spoolss.c
56                   ndr/ntprinting.c
57                   ndr/samr.c
58                   ndr/dfsblob.c
59                   ndr/drsblobs.c
60                   ndr/nbt.c
61                   ndr/ntlmssp.c
62                   ndr/string.c
63                   ndr/backupkey.c
64                   ndr/witness.c
65                   ndr/clusapi.c
66                   ndr/negoex.c
67                   ndr/krb5pac.c
68                   ndr/winspool.c
69                   ndr/cabinet.c
70                   ndr/charset.c
71                   ''',
72         autoproto='ndr/proto.h',
73         deps='torture krb5samba',
74         enabled=bld.PYTHON_BUILD_IS_ENABLED()
75         )
76
77 torture_rpc_backupkey = ''
78 if bld.AD_DC_BUILD_IS_ENABLED():
79     if bld.CONFIG_SET('HAVE_GNUTLS_3_4_7'):
80         torture_rpc_backupkey = 'rpc/backupkey.c'
81     else:
82         torture_rpc_backupkey = 'rpc/backupkey_heimdal.c'
83
84 bld.SAMBA_MODULE('torture_rpc',
85                  source='''
86                         rpc/join.c
87                         rpc/lsa.c
88                         rpc/forest_trust.c
89                         rpc/lsa_lookup.c
90                         rpc/session_key.c
91                         rpc/echo.c
92                         rpc/dfs.c
93                         rpc/drsuapi.c
94                         rpc/drsuapi_w2k8.c
95                         rpc/drsuapi_cracknames.c
96                         rpc/dsgetinfo.c
97                         rpc/spoolss.c
98                         rpc/spoolss_win.c
99                         rpc/spoolss_access.c
100                         rpc/unixinfo.c
101                         rpc/samr.c
102                         rpc/samr_accessmask.c
103                         rpc/samr_priv.c
104                         rpc/wkssvc.c
105                         rpc/srvsvc.c
106                         rpc/svcctl.c
107                         rpc/atsvc.c
108                         rpc/eventlog.c
109                         rpc/epmapper.c
110                         rpc/winreg.c
111                         rpc/initshutdown.c
112                         rpc/oxidresolve.c
113                         rpc/remact.c
114                         rpc/mgmt.c
115                         rpc/scanner.c
116                         rpc/autoidl.c
117                         rpc/countcalls.c
118                         rpc/testjoin.c
119                         rpc/schannel.c
120                         rpc/netlogon.c
121                         rpc/remote_pac.c
122                         rpc/samlogon.c
123                         rpc/samsync.c
124                         rpc/dssetup.c
125                         rpc/alter_context.c
126                         rpc/bench.c
127                         rpc/samba3rpc.c
128                         rpc/rpc.c
129                         rpc/async_bind.c
130                         rpc/handles.c
131                         rpc/frsapi.c
132                         rpc/object_uuid.c
133                         rpc/ntsvcs.c
134                         rpc/browser.c
135                         rpc/bind.c
136                         rpc/fsrvp.c
137                         rpc/clusapi.c
138                         rpc/witness.c
139                         rpc/iremotewinspool.c
140                         ''' + torture_rpc_backupkey + ntvfs_specific['source'],
141                  autoproto='rpc/proto.h',
142                  subsystem='smbtorture',
143                  init_function='torture_rpc_init',
144                  deps='''
145                       ndr-table
146                       RPC_NDR_UNIXINFO
147                       dcerpc-samr
148                       RPC_NDR_WINREG
149                       RPC_NDR_INITSHUTDOWN
150                       RPC_NDR_OXIDRESOLVER
151                       RPC_NDR_EVENTLOG
152                       RPC_NDR_ECHO
153                       RPC_NDR_SVCCTL
154                       RPC_NDR_NETLOGON
155                       RPC_NDR_ATSVC
156                       RPC_NDR_DRSUAPI
157                       RPC_NDR_LSA
158                       RPC_NDR_EPMAPPER
159                       RPC_NDR_DFS
160                       RPC_NDR_FRSAPI
161                       RPC_NDR_SPOOLSS
162                       RPC_NDR_SRVSVC
163                       RPC_NDR_WKSSVC
164                       RPC_NDR_ROT
165                       RPC_NDR_DSSETUP
166                       RPC_NDR_REMACT
167                       RPC_NDR_OXIDRESOLVER
168                       RPC_NDR_NTSVCS
169                       WB_HELPER
170                       samba-net
171                       LIBCLI_AUTH
172                       popt
173                       POPT_CREDENTIALS
174                       TORTURE_LDAP
175                       TORTURE_UTIL
176                       TORTURE_RAP
177                       service
178                       process_model
179                       RPC_NDR_BROWSER
180                       LIBCLI_DRSUAPI
181                       TORTURE_DFS
182                       RPC_NDR_FSRVP
183                       RPC_NDR_CLUSAPI
184                       RPC_NDR_WITNESS
185                       RPC_NDR_BACKUPKEY
186                       RPC_NDR_WINSPOOL
187                       ''' + ntvfs_specific['deps'],
188                  internal_module=True,
189                  enabled=bld.PYTHON_BUILD_IS_ENABLED())
190
191 bld.RECURSE('drs')
192 bld.RECURSE('dns')
193
194 bld.SAMBA_MODULE('TORTURE_RAP',
195         source='rap/rap.c rap/rpc.c rap/printing.c rap/sam.c',
196         autoproto='rap/proto.h',
197         subsystem='smbtorture',
198         init_function='torture_rap_init',
199         deps='TORTURE_UTIL LIBCLI_SMB NDR_RAP LIBCLI_RAP',
200         internal_module=True,
201         enabled=bld.PYTHON_BUILD_IS_ENABLED()
202         )
203
204 bld.SAMBA_MODULE('TORTURE_DFS',
205         source='dfs/domaindfs.c dfs/common.c',
206         autoproto='dfs/proto.h',
207         subsystem='smbtorture',
208         init_function='torture_dfs_init',
209         deps='TORTURE_UTIL LIBCLI_SMB',
210         internal_module=True
211         )
212
213
214 bld.SAMBA_MODULE('TORTURE_AUTH',
215         source='auth/ntlmssp.c auth/pac.c auth/smbencrypt.c',
216         autoproto='auth/proto.h',
217         subsystem='smbtorture',
218         deps='LIBCLI_SMB gensec auth4 authkrb5 popt POPT_CREDENTIALS smbpasswdparser torture com_err gensec_ntlmssp',
219         internal_module=True
220         )
221
222 bld.RECURSE('local')
223 bld.RECURSE('krb5')
224
225 bld.SAMBA_MODULE('TORTURE_NBENCH',
226         source='nbench/nbio.c nbench/nbench.c',
227         autoproto='nbench/proto.h',
228         subsystem='smbtorture',
229         init_function='torture_nbench_init',
230         deps='TORTURE_UTIL',
231         internal_module=True
232         )
233
234
235 bld.SAMBA_MODULE('TORTURE_UNIX',
236         source='unix/unix.c unix/whoami.c unix/unix_info2.c',
237         autoproto='unix/proto.h',
238         subsystem='smbtorture',
239         init_function='torture_unix_init',
240         deps='TORTURE_UTIL',
241         internal_module=True
242         )
243
244
245 bld.SAMBA_MODULE('TORTURE_LDAP',
246         source='ldap/common.c ldap/basic.c ldap/schema.c ldap/uptodatevector.c ldap/cldap.c ldap/netlogon.c ldap/cldapbench.c ldap/ldap_sort.c ldap/nested_search.c',
247         subsystem='smbtorture',
248         deps='cli-ldap cli_cldap samdb popt POPT_CREDENTIALS torture ldbsamba',
249         internal_module=True,
250         autoproto='ldap/proto.h',
251         init_function='torture_ldap_init'
252         )
253
254
255 bld.SAMBA_MODULE('TORTURE_NBT',
256         source='nbt/query.c nbt/register.c nbt/wins.c nbt/winsbench.c nbt/winsreplication.c nbt/dgram.c nbt/nbt.c',
257         autoproto='nbt/proto.h',
258         subsystem='smbtorture',
259         init_function='torture_nbt_init',
260         deps='LIBCLI_SMB cli-nbt LIBCLI_DGRAM LIBCLI_WREPL torture_rpc',
261         internal_module=True,
262         enabled=bld.PYTHON_BUILD_IS_ENABLED()
263         )
264
265
266 bld.SAMBA_MODULE('TORTURE_NET',
267         source='libnet/libnet.c libnet/utils.c libnet/userinfo.c libnet/userman.c libnet/groupinfo.c libnet/groupman.c libnet/domain.c libnet/libnet_lookup.c libnet/libnet_user.c libnet/libnet_group.c libnet/libnet_share.c libnet/libnet_rpc.c libnet/libnet_domain.c libnet/libnet_BecomeDC.c',
268         autoproto='libnet/proto.h',
269         subsystem='smbtorture',
270         init_function='torture_net_init',
271         deps='samba-net popt POPT_CREDENTIALS torture_rpc PROVISION',
272         internal_module=True,
273         enabled=bld.PYTHON_BUILD_IS_ENABLED()
274         )
275
276
277 bld.SAMBA_MODULE('TORTURE_NTP',
278         source='ntp/ntp_signd.c',
279         autoproto='ntp/proto.h',
280         subsystem='smbtorture',
281         init_function='torture_ntp_init',
282         deps='popt POPT_CREDENTIALS torture_rpc',
283         internal_module=True,
284         enabled=bld.PYTHON_BUILD_IS_ENABLED()
285         )
286
287 bld.SAMBA_MODULE('TORTURE_VFS',
288         source='vfs/vfs.c vfs/fruit.c vfs/acl_xattr.c',
289         subsystem='smbtorture',
290         deps='LIBCLI_SMB POPT_CREDENTIALS TORTURE_UTIL smbclient-raw TORTURE_RAW',
291         internal_module=True,
292         autoproto='vfs/proto.h',
293         init_function='torture_vfs_init'
294         )
295
296 TORTURE_MODULES = 'TORTURE_BASIC TORTURE_RAW torture_rpc TORTURE_RAP TORTURE_AUTH TORTURE_NBENCH TORTURE_UNIX TORTURE_LDAP TORTURE_NBT TORTURE_NET TORTURE_NTP torture_registry TORTURE_VFS'
297
298 bld.SAMBA_SUBSYSTEM('torturemain',
299                     source='smbtorture.c torture.c shell.c',
300                     subsystem_name='smbtorture',
301                     deps='torture popt POPT_SAMBA POPT_CREDENTIALS dcerpc LIBCLI_SMB SMBREADLINE ' + TORTURE_MODULES,
302                     enabled=bld.PYTHON_BUILD_IS_ENABLED()
303                     )
304
305 bld.SAMBA_BINARY('smbtorture',
306                  source=[],
307                  manpages='man/smbtorture.1',
308                  private_headers='smbtorture.h',
309                  deps='torturemain torture popt POPT_SAMBA POPT_CREDENTIALS dcerpc LIBCLI_SMB SMBREADLINE ' + TORTURE_MODULES,
310                  pyembed=True,
311                  enabled=bld.PYTHON_BUILD_IS_ENABLED()
312                  )
313
314 bld.SAMBA_BINARY('gentest',
315         source='gentest.c',
316         manpages='man/gentest.1',
317         deps='samba-hostconfig samba-util popt POPT_SAMBA POPT_CREDENTIALS LIBCLI_SMB smbclient-raw param_options'
318         )
319
320
321 bld.SAMBA_BINARY('masktest',
322         source='masktest.c',
323         manpages='man/masktest.1',
324         deps='samba-hostconfig samba-util popt POPT_SAMBA POPT_CREDENTIALS LIBCLI_SMB param_options'
325         )
326
327
328 bld.SAMBA_BINARY('locktest',
329         source='locktest.c',
330         # COV_TARGET='test',
331         #ldflags='--coverage',
332         #cflags='--coverage',
333         # GCOV='1',
334         manpages='man/locktest.1',
335         deps='popt POPT_SAMBA POPT_CREDENTIALS samba-util LIBCLI_SMB samba-hostconfig param_options',
336         )
337