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