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