c511d069932a980d856988cef4fb062637fcc3e4
[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         )
19
20
21 bld.SAMBA_MODULE('TORTURE_RAW',
22         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',
23         autoproto='raw/proto.h',
24         subsystem='smbtorture',
25         init_function='torture_raw_init',
26         deps='LIBCLI_SMB LIBCLI_LSA LIBCLI_SMB_COMPOSITE popt POPT_CREDENTIALS TORTURE_UTIL',
27         internal_module=True
28         )
29
30 bld.RECURSE('smb2')
31 bld.RECURSE('winbind')
32 bld.RECURSE('libnetapi')
33 bld.RECURSE('libsmbclient')
34
35 ntvfs_specific = dict(source='', deps='')
36
37 # Yes, the spoolss_notify test uses the NTVFS file server to run the SMB server expected
38 # to handle the RPC callback!
39 if bld.CONFIG_SET('WITH_NTVFS_FILESERVER'):
40         ntvfs_specific['source'] += ' rpc/spoolss_notify.c'
41         ntvfs_specific['deps'] += ' SMB_SERVER dcerpc_server ntvfs'
42
43 bld.SAMBA_SUBSYSTEM('TORTURE_NDR',
44         source='''ndr/ndr.c
45                   ndr/winreg.c
46                   ndr/atsvc.c
47                   ndr/lsa.c
48                   ndr/epmap.c
49                   ndr/dfs.c
50                   ndr/netlogon.c
51                   ndr/drsuapi.c
52                   ndr/spoolss.c
53                   ndr/ntprinting.c
54                   ndr/samr.c
55                   ndr/dfsblob.c
56                   ndr/drsblobs.c
57                   ndr/nbt.c
58                   ndr/ntlmssp.c
59                   ndr/string.c
60                   ndr/backupkey.c
61                   ndr/witness.c
62                   ndr/clusapi.c
63                   ''',
64         autoproto='ndr/proto.h',
65         deps='torture'
66         )
67
68 if bld.CONFIG_SET('HAVE_GNUTLS_3_4_7'):
69     torture_rpc_backupkey = 'rpc/backupkey.c'
70 else:
71     torture_rpc_backupkey = 'rpc/backupkey_heimdal.c'
72
73 bld.SAMBA_MODULE('torture_rpc',
74                  source='''
75                         rpc/join.c
76                         rpc/lsa.c
77                         rpc/forest_trust.c
78                         rpc/lsa_lookup.c
79                         rpc/session_key.c
80                         rpc/echo.c
81                         rpc/dfs.c
82                         rpc/drsuapi.c
83                         rpc/drsuapi_cracknames.c
84                         rpc/dsgetinfo.c
85                         rpc/spoolss.c
86                         rpc/spoolss_win.c
87                         rpc/spoolss_access.c
88                         rpc/unixinfo.c
89                         rpc/samr.c
90                         rpc/samr_accessmask.c
91                         rpc/samr_priv.c
92                         rpc/wkssvc.c
93                         rpc/srvsvc.c
94                         rpc/svcctl.c
95                         rpc/atsvc.c
96                         rpc/eventlog.c
97                         rpc/epmapper.c
98                         rpc/winreg.c
99                         rpc/initshutdown.c
100                         rpc/oxidresolve.c
101                         rpc/remact.c
102                         rpc/mgmt.c
103                         rpc/scanner.c
104                         rpc/autoidl.c
105                         rpc/countcalls.c
106                         rpc/testjoin.c
107                         rpc/schannel.c
108                         rpc/netlogon.c
109                         rpc/remote_pac.c
110                         rpc/samlogon.c
111                         rpc/samsync.c
112                         rpc/dssetup.c
113                         rpc/alter_context.c
114                         rpc/bench.c
115                         rpc/samba3rpc.c
116                         rpc/rpc.c
117                         rpc/async_bind.c
118                         rpc/handles.c
119                         rpc/frsapi.c
120                         rpc/object_uuid.c
121                         rpc/ntsvcs.c
122                         rpc/browser.c
123                         rpc/bind.c
124                         rpc/fsrvp.c
125                         rpc/clusapi.c
126                         rpc/witness.c
127                         ''' + torture_rpc_backupkey + ntvfs_specific['source'],
128                  autoproto='rpc/proto.h',
129                  subsystem='smbtorture',
130                  init_function='torture_rpc_init',
131                  deps='''
132                       ndr-table
133                       RPC_NDR_UNIXINFO
134                       dcerpc-samr
135                       RPC_NDR_WINREG
136                       RPC_NDR_INITSHUTDOWN
137                       RPC_NDR_OXIDRESOLVER
138                       RPC_NDR_EVENTLOG
139                       RPC_NDR_ECHO
140                       RPC_NDR_SVCCTL
141                       RPC_NDR_NETLOGON
142                       dcerpc-atsvc
143                       RPC_NDR_DRSUAPI
144                       RPC_NDR_LSA
145                       RPC_NDR_EPMAPPER
146                       RPC_NDR_DFS
147                       RPC_NDR_FRSAPI
148                       RPC_NDR_SPOOLSS
149                       RPC_NDR_SRVSVC
150                       RPC_NDR_WKSSVC
151                       RPC_NDR_ROT
152                       RPC_NDR_DSSETUP
153                       RPC_NDR_REMACT
154                       RPC_NDR_OXIDRESOLVER
155                       RPC_NDR_NTSVCS
156                       WB_HELPER
157                       samba-net
158                       LIBCLI_AUTH
159                       popt
160                       POPT_CREDENTIALS
161                       TORTURE_LDAP
162                       TORTURE_UTIL
163                       TORTURE_RAP
164                       service
165                       process_model
166                       RPC_NDR_BROWSER
167                       LIBCLI_DRSUAPI
168                       TORTURE_DFS
169                       RPC_NDR_FSRVP
170                       RPC_NDR_CLUSAPI
171                       RPC_NDR_WITNESS
172                       RPC_NDR_BACKUPKEY
173                       ''' + ntvfs_specific['deps'],
174                  internal_module=True)
175
176 bld.RECURSE('drs')
177 bld.RECURSE('dns')
178
179 bld.SAMBA_MODULE('TORTURE_RAP',
180         source='rap/rap.c rap/rpc.c rap/printing.c rap/sam.c',
181         autoproto='rap/proto.h',
182         subsystem='smbtorture',
183         init_function='torture_rap_init',
184         deps='TORTURE_UTIL LIBCLI_SMB NDR_RAP LIBCLI_RAP',
185         internal_module=True
186         )
187
188 bld.SAMBA_MODULE('TORTURE_DFS',
189         source='dfs/domaindfs.c dfs/common.c',
190         autoproto='dfs/proto.h',
191         subsystem='smbtorture',
192         init_function='torture_dfs_init',
193         deps='TORTURE_UTIL LIBCLI_SMB',
194         internal_module=True
195         )
196
197
198 bld.SAMBA_MODULE('TORTURE_AUTH',
199         source='auth/ntlmssp.c auth/pac.c auth/smbencrypt.c',
200         autoproto='auth/proto.h',
201         subsystem='smbtorture',
202         deps='LIBCLI_SMB gensec auth4 authkrb5 popt POPT_CREDENTIALS smbpasswdparser torture com_err gensec_ntlmssp',
203         internal_module=True
204         )
205
206 bld.RECURSE('local')
207 bld.RECURSE('krb5')
208
209 bld.SAMBA_MODULE('TORTURE_NBENCH',
210         source='nbench/nbio.c nbench/nbench.c',
211         autoproto='nbench/proto.h',
212         subsystem='smbtorture',
213         init_function='torture_nbench_init',
214         deps='TORTURE_UTIL',
215         internal_module=True
216         )
217
218
219 bld.SAMBA_MODULE('TORTURE_UNIX',
220         source='unix/unix.c unix/whoami.c unix/unix_info2.c',
221         autoproto='unix/proto.h',
222         subsystem='smbtorture',
223         init_function='torture_unix_init',
224         deps='TORTURE_UTIL',
225         internal_module=True
226         )
227
228
229 bld.SAMBA_MODULE('TORTURE_LDAP',
230         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',
231         subsystem='smbtorture',
232         deps='cli-ldap cli_cldap samdb popt POPT_CREDENTIALS torture ldbsamba',
233         internal_module=True,
234         autoproto='ldap/proto.h',
235         init_function='torture_ldap_init'
236         )
237
238
239 bld.SAMBA_MODULE('TORTURE_NBT',
240         source='nbt/query.c nbt/register.c nbt/wins.c nbt/winsbench.c nbt/winsreplication.c nbt/dgram.c nbt/nbt.c',
241         autoproto='nbt/proto.h',
242         subsystem='smbtorture',
243         init_function='torture_nbt_init',
244         deps='LIBCLI_SMB cli-nbt LIBCLI_DGRAM LIBCLI_WREPL torture_rpc',
245         internal_module=True
246         )
247
248
249 bld.SAMBA_MODULE('TORTURE_NET',
250         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',
251         autoproto='libnet/proto.h',
252         subsystem='smbtorture',
253         init_function='torture_net_init',
254         deps='samba-net popt POPT_CREDENTIALS torture_rpc PROVISION',
255         internal_module=True
256         )
257
258
259 bld.SAMBA_MODULE('TORTURE_NTP',
260         source='ntp/ntp_signd.c',
261         autoproto='ntp/proto.h',
262         subsystem='smbtorture',
263         init_function='torture_ntp_init',
264         deps='popt POPT_CREDENTIALS torture_rpc',
265         internal_module=True
266         )
267
268 bld.SAMBA_MODULE('TORTURE_VFS',
269         source='vfs/vfs.c vfs/fruit.c',
270         subsystem='smbtorture',
271         deps='LIBCLI_SMB POPT_CREDENTIALS TORTURE_UTIL smbclient-raw TORTURE_RAW',
272         internal_module=True,
273         autoproto='vfs/proto.h',
274         init_function='torture_vfs_init'
275         )
276
277 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'
278
279 bld.SAMBA_SUBSYSTEM('torturemain',
280                     source='smbtorture.c torture.c shell.c',
281                     subsystem_name='smbtorture',
282                     deps='torture popt POPT_SAMBA POPT_CREDENTIALS dcerpc LIBCLI_SMB SMBREADLINE ' + TORTURE_MODULES,
283                     )
284
285 bld.SAMBA_BINARY('smbtorture',
286                  source=[],
287                  manpages='man/smbtorture.1',
288                  public_headers='smbtorture.h',
289                  deps='torturemain torture popt POPT_SAMBA POPT_CREDENTIALS dcerpc LIBCLI_SMB SMBREADLINE ' + TORTURE_MODULES,
290                  pyembed=True
291                  )
292
293 bld.SAMBA_BINARY('gentest',
294         source='gentest.c',
295         manpages='man/gentest.1',
296         deps='samba-hostconfig samba-util popt POPT_SAMBA POPT_CREDENTIALS LIBCLI_SMB smbclient-raw param_options'
297         )
298
299
300 bld.SAMBA_BINARY('masktest',
301         source='masktest.c',
302         manpages='man/masktest.1',
303         deps='samba-hostconfig samba-util popt POPT_SAMBA POPT_CREDENTIALS LIBCLI_SMB param_options'
304         )
305
306
307 bld.SAMBA_BINARY('locktest',
308         source='locktest.c',
309         # COV_TARGET='test',
310         #ldflags='--coverage',
311         #cflags='--coverage',
312         # GCOV='1',
313         manpages='man/locktest.1',
314         deps='popt POPT_SAMBA POPT_CREDENTIALS samba-util LIBCLI_SMB samba-hostconfig param_options',
315         )
316