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