aa5784a4da2d46eed991bb510fc40275316a8e4b
[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         allow_warnings=True,
24         autoproto='raw/proto.h',
25         subsystem='smbtorture',
26         init_function='torture_raw_init',
27         deps='LIBCLI_SMB LIBCLI_LSA LIBCLI_SMB_COMPOSITE popt POPT_CREDENTIALS TORTURE_UTIL',
28         internal_module=True
29         )
30
31 bld.RECURSE('smb2')
32 bld.RECURSE('winbind')
33 bld.RECURSE('libnetapi')
34 bld.RECURSE('libsmbclient')
35
36 heimdal_specific = dict()
37 heimdal_specific['ndr'] = ('','')
38 heimdal_specific['rpc'] = ('','')
39 if bld.CONFIG_SET('AD_DC_BUILD_IS_ENABLED'):
40         heimdal_specific['rpc'] = (' rpc/backupkey.c rpc/spoolss_notify.c',
41                                     ' RPC_NDR_BACKUPKEY SMB_SERVER dcerpc_server ntvfs')
42
43 bld.SAMBA_SUBSYSTEM('TORTURE_NDR',
44         source='ndr/ndr.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/nbt.c ndr/ntlmssp.c ndr/string.c ndr/backupkey.c',
45         allow_warnings=True,
46         autoproto='ndr/proto.h',
47         deps='torture'
48         )
49
50
51 bld.SAMBA_MODULE('torture_rpc',
52         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_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_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/oxidresolve.c rpc/remact.c rpc/mgmt.c rpc/scanner.c rpc/autoidl.c rpc/countcalls.c rpc/testjoin.c rpc/schannel.c rpc/netlogon.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 '+heimdal_specific['rpc'][0],
53         allow_warnings=True,
54         autoproto='rpc/proto.h',
55         subsystem='smbtorture',
56         init_function='torture_rpc_init',
57         deps='ndr-table RPC_NDR_UNIXINFO dcerpc-samr RPC_NDR_WINREG RPC_NDR_INITSHUTDOWN RPC_NDR_OXIDRESOLVER RPC_NDR_EVENTLOG RPC_NDR_ECHO RPC_NDR_SVCCTL RPC_NDR_NETLOGON dcerpc-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_ROT RPC_NDR_DSSETUP RPC_NDR_REMACT RPC_NDR_OXIDRESOLVER RPC_NDR_NTSVCS WB_HELPER samba-net LIBCLI_AUTH popt POPT_CREDENTIALS TORTURE_LDAP TORTURE_UTIL TORTURE_RAP service process_model RPC_NDR_BROWSER LIBCLI_DRSUAPI TORTURE_DFS RPC_NDR_FSRVP '+heimdal_specific['rpc'][1],
58         internal_module=True
59         )
60
61 bld.RECURSE('drs')
62 bld.RECURSE('dns')
63
64 bld.SAMBA_MODULE('TORTURE_RAP',
65         source='rap/rap.c rap/rpc.c rap/printing.c rap/sam.c',
66         autoproto='rap/proto.h',
67         subsystem='smbtorture',
68         init_function='torture_rap_init',
69         deps='TORTURE_UTIL LIBCLI_SMB NDR_RAP LIBCLI_RAP',
70         internal_module=True
71         )
72
73 bld.SAMBA_MODULE('TORTURE_DFS',
74         source='dfs/domaindfs.c dfs/common.c',
75         autoproto='dfs/proto.h',
76         subsystem='smbtorture',
77         init_function='torture_dfs_init',
78         deps='TORTURE_UTIL LIBCLI_SMB',
79         internal_module=True
80         )
81
82
83 bld.SAMBA_MODULE('TORTURE_AUTH',
84         source='auth/ntlmssp.c auth/pac.c auth/smbencrypt.c',
85         autoproto='auth/proto.h',
86         subsystem='smbtorture',
87         deps='LIBCLI_SMB gensec auth4 authkrb5 popt POPT_CREDENTIALS smbpasswdparser torture com_err gensec_ntlmssp',
88         internal_module=True
89         )
90
91 bld.RECURSE('local')
92
93 bld.SAMBA_MODULE('TORTURE_NBENCH',
94         source='nbench/nbio.c nbench/nbench.c',
95         autoproto='nbench/proto.h',
96         subsystem='smbtorture',
97         init_function='torture_nbench_init',
98         deps='TORTURE_UTIL',
99         internal_module=True
100         )
101
102
103 bld.SAMBA_MODULE('TORTURE_UNIX',
104         source='unix/unix.c unix/whoami.c unix/unix_info2.c',
105         autoproto='unix/proto.h',
106         subsystem='smbtorture',
107         init_function='torture_unix_init',
108         deps='TORTURE_UTIL',
109         internal_module=True
110         )
111
112
113 bld.SAMBA_MODULE('TORTURE_LDAP',
114         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',
115         subsystem='smbtorture',
116         deps='cli-ldap cli_cldap samdb popt POPT_CREDENTIALS torture ldbsamba',
117         internal_module=True,
118         autoproto='ldap/proto.h',
119         init_function='torture_ldap_init'
120         )
121
122
123 bld.SAMBA_MODULE('TORTURE_NBT',
124         source='nbt/query.c nbt/register.c nbt/wins.c nbt/winsbench.c nbt/winsreplication.c nbt/dgram.c nbt/nbt.c',
125         autoproto='nbt/proto.h',
126         subsystem='smbtorture',
127         init_function='torture_nbt_init',
128         deps='LIBCLI_SMB cli-nbt LIBCLI_DGRAM LIBCLI_WREPL torture_rpc',
129         internal_module=True
130         )
131
132
133 bld.SAMBA_MODULE('TORTURE_NET',
134         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',
135         autoproto='libnet/proto.h',
136         subsystem='smbtorture',
137         init_function='torture_net_init',
138         deps='samba-net popt POPT_CREDENTIALS torture_rpc PROVISION',
139         internal_module=True
140         )
141
142
143 bld.SAMBA_MODULE('TORTURE_NTP',
144         source='ntp/ntp_signd.c',
145         autoproto='ntp/proto.h',
146         subsystem='smbtorture',
147         init_function='torture_ntp_init',
148         deps='popt POPT_CREDENTIALS torture_rpc',
149         internal_module=True
150         )
151
152 bld.SAMBA_MODULE('TORTURE_VFS',
153         source='vfs/vfs.c vfs/fruit.c',
154         subsystem='smbtorture',
155         deps='LIBCLI_SMB POPT_CREDENTIALS TORTURE_UTIL smbclient-raw TORTURE_RAW',
156         internal_module=True,
157         autoproto='vfs/proto.h',
158         init_function='torture_vfs_init'
159         )
160
161 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'
162
163 bld.SAMBA_SUBSYSTEM('torturemain',
164                     source='smbtorture.c torture.c shell.c',
165                     subsystem_name='smbtorture',
166                     deps='torture popt POPT_SAMBA POPT_CREDENTIALS dcerpc LIBCLI_SMB SMBREADLINE ' + TORTURE_MODULES,
167                     )
168
169 bld.SAMBA_BINARY('smbtorture',
170                  source=[],
171                  manpages='man/smbtorture.1',
172                  public_headers='smbtorture.h',
173                  deps='torturemain torture popt POPT_SAMBA POPT_CREDENTIALS dcerpc LIBCLI_SMB SMBREADLINE ' + TORTURE_MODULES,
174                  pyembed=True
175                  )
176
177 bld.SAMBA_BINARY('gentest',
178         source='gentest.c',
179         manpages='man/gentest.1',
180         deps='samba-hostconfig samba-util popt POPT_SAMBA POPT_CREDENTIALS LIBCLI_SMB smbclient-raw param_options'
181         )
182
183
184 bld.SAMBA_BINARY('masktest',
185         source='masktest.c',
186         manpages='man/masktest.1',
187         deps='samba-hostconfig samba-util popt POPT_SAMBA POPT_CREDENTIALS LIBCLI_SMB param_options'
188         )
189
190
191 bld.SAMBA_BINARY('locktest',
192         source='locktest.c',
193         # COV_TARGET='test',
194         #ldflags='--coverage',
195         #cflags='--coverage',
196         # GCOV='1',
197         manpages='man/locktest.1',
198         deps='popt POPT_SAMBA POPT_CREDENTIALS samba-util LIBCLI_SMB samba-hostconfig param_options',
199         )
200