summaryrefslogtreecommitdiffstats
path: root/source4/torture/wscript_build
blob: 1ddce713dfb90ca97455c35b07d000886da8697e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
#!/usr/bin/env python

provision = bld.pyembed_libname('PROVISION')
samba_net = bld.pyembed_libname('samba-net')

bld.SAMBA_SUBSYSTEM('TORTURE_UTIL',
	source='util_smb.c',
	public_deps='torture',
	deps='smbclient-raw CMDLINE_S4 CREDENTIALS_KRB5'
	)


bld.SAMBA_MODULE('TORTURE_BASIC',
	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',
	subsystem='smbtorture',
	deps='LIBCLI_SMB TORTURE_UTIL smbclient-raw TORTURE_RAW',
	internal_module=True,
	autoproto='basic/proto.h',
	init_function='torture_base_init',
	enabled=bld.PYTHON_BUILD_IS_ENABLED()
	)


bld.SAMBA_MODULE('TORTURE_RAW',
	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',
	autoproto='raw/proto.h',
	subsystem='smbtorture',
	init_function='torture_raw_init',
	deps='LIBCLI_SMB LIBCLI_LSA LIBCLI_SMB_COMPOSITE TORTURE_UTIL',
	internal_module=True,
	enabled=bld.PYTHON_BUILD_IS_ENABLED()
	)

bld.RECURSE('smb2')
bld.RECURSE('winbind')
bld.RECURSE('libnetapi')
bld.RECURSE('libsmbclient')
bld.RECURSE('gpo')

ntvfs_specific = dict(source='', deps='')

# Yes, the spoolss_notify test uses the NTVFS file server to run the SMB server expected
# to handle the RPC callback!
if bld.CONFIG_SET('WITH_NTVFS_FILESERVER'):
	ntvfs_specific['source'] += ' rpc/spoolss_notify.c'
	ntvfs_specific['deps'] += ' SMB_SERVER dcerpc_server ntvfs'

bld.SAMBA_SUBSYSTEM('TORTURE_NDR',
        source='''ndr/ndr.c
                  ndr/dcerpc.c
                  ndr/winreg.c
                  ndr/atsvc.c
                  ndr/lsa.c
                  ndr/epmap.c
                  ndr/dfs.c
                  ndr/netlogon.c
                  ndr/drsuapi.c
                  ndr/spoolss.c
                  ndr/ntprinting.c
                  ndr/samr.c
                  ndr/dfsblob.c
                  ndr/drsblobs.c
                  ndr/dnsp.c
                  ndr/nbt.c
                  ndr/ntlmssp.c
                  ndr/string.c
                  ndr/backupkey.c
                  ndr/witness.c
                  ndr/clusapi.c
                  ndr/negoex.c
                  ndr/krb5pac.c
                  ndr/winspool.c
                  ndr/cabinet.c
                  ndr/charset.c
                  ndr/svcctl.c
                  ndr/odj.c
		  ''',
	autoproto='ndr/proto.h',
	deps='torture krb5samba',
	enabled=bld.PYTHON_BUILD_IS_ENABLED()
	)

bld.SAMBA_SUBSYSTEM('IREMOTEWINSPOOL_COMMON',
                    source='rpc/iremotewinspool_common.c',
                    deps='talloc',
                    enabled=bld.PYTHON_BUILD_IS_ENABLED())

bld.SAMBA_MODULE('torture_rpc',
                 source='''
                        rpc/join.c
                        rpc/lsa.c
                        rpc/forest_trust.c
                        rpc/lsa_lookup.c
                        rpc/session_key.c
                        rpc/echo.c
                        rpc/dfs.c
                        rpc/drsuapi.c
                        rpc/drsuapi_w2k8.c
                        rpc/drsuapi_cracknames.c
                        rpc/dsgetinfo.c
                        rpc/spoolss.c
                        rpc/spoolss_win.c
                        rpc/spoolss_access.c
                        rpc/unixinfo.c
                        rpc/samr.c
                        rpc/samr_accessmask.c
                        rpc/samr_handletype.c
                        rpc/samr_priv.c
                        rpc/wkssvc.c
                        rpc/srvsvc.c
                        rpc/svcctl.c
                        rpc/atsvc.c
                        rpc/eventlog.c
                        rpc/epmapper.c
                        rpc/winreg.c
                        rpc/initshutdown.c
                        rpc/mgmt.c
                        rpc/scanner.c
                        rpc/countcalls.c
                        rpc/testjoin.c
                        rpc/schannel.c
                        rpc/netlogon.c
                        rpc/netlogon_crypto.c
                        rpc/remote_pac.c
                        rpc/samlogon.c
                        rpc/samsync.c
                        rpc/dssetup.c
                        rpc/alter_context.c
                        rpc/bench.c
                        rpc/samba3rpc.c
                        rpc/rpc.c
                        rpc/async_bind.c
                        rpc/handles.c
                        rpc/frsapi.c
                        rpc/object_uuid.c
                        rpc/ntsvcs.c
                        rpc/browser.c
                        rpc/bind.c
                        rpc/fsrvp.c
                        rpc/clusapi.c
                        rpc/witness.c
                        rpc/iremotewinspool.c
                        rpc/iremotewinspool_driver.c
                        rpc/mdssvc.c
                        rpc/backupkey.c''' + ntvfs_specific['source'],
                 autoproto='rpc/proto.h',
                 subsystem='smbtorture',
                 init_function='torture_rpc_init',
                 deps='''
                      ndr-table
                      RPC_NDR_UNIXINFO
                      dcerpc-samr
                      RPC_NDR_WINREG
                      RPC_NDR_INITSHUTDOWN
                      RPC_NDR_EVENTLOG
                      RPC_NDR_ECHO
                      RPC_NDR_SVCCTL
                      RPC_NDR_NETLOGON
                      RPC_NDR_ATSVC
                      RPC_NDR_DRSUAPI
                      RPC_NDR_LSA
                      RPC_NDR_EPMAPPER
                      RPC_NDR_DFS
                      RPC_NDR_FRSAPI
                      RPC_NDR_SPOOLSS
                      RPC_NDR_SRVSVC
                      RPC_NDR_WKSSVC
                      RPC_NDR_DSSETUP
                      RPC_NDR_NTSVCS
                      %s
                      LIBCLI_AUTH
                      popt
                      CMDLINE_S4
                      TORTURE_LDAP
                      TORTURE_UTIL
                      TORTURE_RAP
                      service
                      process_model
                      RPC_NDR_BROWSER
                      LIBCLI_DRSUAPI
                      TORTURE_DFS
                      RPC_NDR_FSRVP
                      RPC_NDR_CLUSAPI
                      RPC_NDR_WITNESS
                      RPC_NDR_BACKUPKEY
                      RPC_NDR_WINSPOOL
                      IREMOTEWINSPOOL_COMMON
                      printer_driver
                      RPC_NDR_MDSSVC
                      mdssvc
                      ''' % samba_net + ntvfs_specific['deps'],
                 internal_module=True,
                 enabled=bld.PYTHON_BUILD_IS_ENABLED())

bld.RECURSE('drs')
bld.RECURSE('dns')

bld.SAMBA_MODULE('TORTURE_RAP',
	source='rap/rap.c rap/rpc.c rap/printing.c rap/sam.c',
	autoproto='rap/proto.h',
	subsystem='smbtorture',
	init_function='torture_rap_init',
	deps='TORTURE_UTIL LIBCLI_SMB NDR_RAP LIBCLI_RAP',
	internal_module=True,
	enabled=bld.PYTHON_BUILD_IS_ENABLED()
	)

bld.SAMBA_MODULE('TORTURE_DFS',
	source='dfs/domaindfs.c dfs/common.c',
	autoproto='dfs/proto.h',
	subsystem='smbtorture',
	init_function='torture_dfs_init',
	deps='TORTURE_UTIL LIBCLI_SMB',
	internal_module=True
	)


bld.SAMBA_MODULE('TORTURE_AUTH',
	source='auth/ntlmssp.c auth/pac.c auth/smbencrypt.c',
	autoproto='auth/proto.h',
	subsystem='smbtorture',
	deps='LIBCLI_SMB gensec auth4 authkrb5 smbpasswdparser torture com_err gensec_ntlmssp CMDLINE_S4',
	internal_module=True
	)

bld.RECURSE('local')
bld.RECURSE('krb5')

bld.SAMBA_MODULE('TORTURE_NBENCH',
	source='nbench/nbio.c nbench/nbench.c',
	autoproto='nbench/proto.h',
	subsystem='smbtorture',
	init_function='torture_nbench_init',
	deps='TORTURE_UTIL',
	internal_module=True
	)


bld.SAMBA_MODULE('TORTURE_UNIX',
	source='unix/unix.c unix/whoami.c unix/unix_info2.c',
	autoproto='unix/proto.h',
	subsystem='smbtorture',
	init_function='torture_unix_init',
	deps='TORTURE_UTIL',
	internal_module=True
	)


bld.SAMBA_MODULE('TORTURE_LDAP',
	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
            ldap/session_expiry.c
            ''',
	subsystem='smbtorture',
	deps='cli-ldap cli_cldap samdb torture ldbsamba CMDLINE_S4',
	internal_module=True,
	autoproto='ldap/proto.h',
	init_function='torture_ldap_init'
	)


bld.SAMBA_MODULE('TORTURE_NBT',
	source='nbt/query.c nbt/register.c nbt/wins.c nbt/winsbench.c nbt/winsreplication.c nbt/dgram.c nbt/nbt.c',
	autoproto='nbt/proto.h',
	subsystem='smbtorture',
	init_function='torture_nbt_init',
	deps='LIBCLI_SMB cli-nbt LIBCLI_DGRAM LIBCLI_WREPL torture_rpc',
	internal_module=True,
	enabled=bld.PYTHON_BUILD_IS_ENABLED()
	)


bld.SAMBA_MODULE('TORTURE_NET',
	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',
	autoproto='libnet/proto.h',
	subsystem='smbtorture',
	init_function='torture_net_init',
	deps='%s torture_rpc %s' % (provision, samba_net),
	internal_module=True,
	enabled=bld.PYTHON_BUILD_IS_ENABLED()
	)


bld.SAMBA_MODULE('TORTURE_NTP',
	source='ntp/ntp_signd.c',
	autoproto='ntp/proto.h',
	subsystem='smbtorture',
	init_function='torture_ntp_init',
	deps='torture_rpc',
	internal_module=True,
	enabled=bld.PYTHON_BUILD_IS_ENABLED()
	)

bld.SAMBA_MODULE('TORTURE_VFS',
	source='vfs/vfs.c vfs/fruit.c vfs/acl_xattr.c',
	subsystem='smbtorture',
	deps='LIBCLI_SMB TORTURE_UTIL smbclient-raw TORTURE_RAW',
	internal_module=True,
	autoproto='vfs/proto.h',
	init_function='torture_vfs_init'
	)

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'

bld.SAMBA_SUBSYSTEM('torturemain',
                    source='smbtorture.c torture.c shell.c',
                    subsystem_name='smbtorture',
                    deps='torture dcerpc LIBCLI_SMB SMBREADLINE ' + TORTURE_MODULES,
                    enabled=bld.PYTHON_BUILD_IS_ENABLED()
                    )

bld.SAMBA_BINARY('smbtorture',
                 source=[],
                 manpages='man/smbtorture.1',
                 private_headers='smbtorture.h',
                 deps='torturemain torture popt CMDLINE_S4 dcerpc LIBCLI_SMB SMBREADLINE ' + TORTURE_MODULES,
                 pyembed=True,
                 enabled=bld.PYTHON_BUILD_IS_ENABLED()
                 )

bld.SAMBA_BINARY('gentest',
	source='gentest.c',
	manpages='man/gentest.1',
	deps='samba-hostconfig samba-util popt CMDLINE_S4 LIBCLI_SMB smbclient-raw param_options'
	)


bld.SAMBA_BINARY('masktest',
	source='masktest.c',
	manpages='man/masktest.1',
	deps='samba-hostconfig samba-util popt CMDLINE_S4 LIBCLI_SMB param_options'
	)


bld.SAMBA_BINARY('locktest',
	source='locktest.c',
	# COV_TARGET='test',
	#ldflags='--coverage',
	#cflags='--coverage',
	# GCOV='1',
	manpages='man/locktest.1',
	deps='popt CMDLINE_S4 samba-util LIBCLI_SMB samba-hostconfig param_options',
	)

bld.SAMBA_MODULE('TORTURE_DSDB',
	source="../../source4/dsdb/common/tests/dsdb.c",
	autoproto='dsdb_proto.h',
	subsystem='smbtorture',
	init_function='torture_dsdb_init',
	deps="TORTURE_UTIL samba-util",
	internal_module=True,
	enabled=bld.PYTHON_BUILD_IS_ENABLED()
	)