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