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