lib/torture: Add function to clean up the output directory
[Samba/vl.git] / source4 / torture / wscript_build
blob8c09c49fd77acdea58a3842814fdc138bdc7ea27
1 #!/usr/bin/env python
4 bld.SAMBA_SUBSYSTEM('TORTURE_UTIL',
5 source='util_smb.c',
6 public_deps='torture POPT_CREDENTIALS',
7 deps='LIBCLI_RAW'
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_CREDENTIALS TORTURE_UTIL LIBCLI_RAW TORTURE_RAW',
15 internal_module=True,
16 autoproto='basic/proto.h',
17 init_function='torture_base_init'
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/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_CREDENTIALS TORTURE_UTIL',
27 internal_module=True
30 bld.RECURSE('smb2')
31 bld.RECURSE('winbind')
32 bld.RECURSE('libnetapi')
33 bld.RECURSE('libsmbclient')
35 bld.SAMBA_SUBSYSTEM('TORTURE_NDR',
36 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/samr.c ndr/dfsblob.c ndr/drsblobs.c ndr/nbt.c ndr/ntlmssp.c',
37 autoproto='ndr/proto.h',
38 deps='torture'
42 bld.SAMBA_MODULE('torture_rpc',
43 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_notify.c rpc/spoolss_win.c rpc/spoolss_access.c rpc/unixinfo.c rpc/samr.c rpc/samr_accessmask.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/multi_bind.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',
44 autoproto='rpc/proto.h',
45 subsystem='smbtorture',
46 init_function='torture_rpc_init',
47 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 LIBSAMBA-NET LIBCLI_AUTH POPT_CREDENTIALS TORTURE_LDAP TORTURE_UTIL TORTURE_RAP dcerpc_server service process_model ntvfs RPC_NDR_BROWSER LIBCLI_DRSUAPI TORTURE_LDB_MODULE TORTURE_DFS',
48 internal_module=True
51 bld.RECURSE('drs')
53 bld.SAMBA_MODULE('TORTURE_RAP',
54 source='rap/rap.c rap/rpc.c rap/printing.c rap/sam.c',
55 autoproto='rap/proto.h',
56 subsystem='smbtorture',
57 init_function='torture_rap_init',
58 deps='TORTURE_UTIL LIBCLI_SMB NDR_RAP',
59 internal_module=True
62 bld.SAMBA_MODULE('TORTURE_DFS',
63 source='dfs/domaindfs.c dfs/common.c',
64 autoproto='dfs/proto.h',
65 subsystem='smbtorture',
66 init_function='torture_dfs_init',
67 deps='TORTURE_UTIL LIBCLI_SMB',
68 internal_module=True
72 bld.SAMBA_MODULE('TORTURE_AUTH',
73 source='auth/ntlmssp.c auth/pac.c',
74 autoproto='auth/proto.h',
75 subsystem='smbtorture',
76 deps='LIBCLI_SMB gensec auth KERBEROS POPT_CREDENTIALS SMBPASSWD torture com_err gensec_ntlmssp',
77 internal_module=True
80 bld.RECURSE('local')
82 bld.SAMBA_MODULE('TORTURE_NBENCH',
83 source='nbench/nbio.c nbench/nbench.c',
84 autoproto='nbench/proto.h',
85 subsystem='smbtorture',
86 init_function='torture_nbench_init',
87 deps='TORTURE_UTIL',
88 internal_module=True
92 bld.SAMBA_MODULE('TORTURE_UNIX',
93 source='unix/unix.c unix/whoami.c unix/unix_info2.c',
94 autoproto='unix/proto.h',
95 subsystem='smbtorture',
96 init_function='torture_unix_init',
97 deps='TORTURE_UTIL',
98 internal_module=True
102 bld.SAMBA_MODULE('TORTURE_LDAP',
103 source='ldap/common.c ldap/basic.c ldap/schema.c ldap/uptodatevector.c ldap/cldap.c ldap/cldapbench.c ldap/ldap_sort.c ldap/nested_search.c',
104 subsystem='smbtorture',
105 deps='LIBCLI_LDAP LIBCLI_CLDAP SAMDB POPT_CREDENTIALS torture LDBSAMBA',
106 internal_module=True,
107 autoproto='ldap/proto.h',
108 init_function='torture_ldap_init'
112 bld.SAMBA_MODULE('TORTURE_NBT',
113 source='nbt/query.c nbt/register.c nbt/wins.c nbt/winsbench.c nbt/winsreplication.c nbt/dgram.c nbt/nbt.c',
114 autoproto='nbt/proto.h',
115 subsystem='smbtorture',
116 init_function='torture_nbt_init',
117 deps='LIBCLI_SMB LIBCLI_NBT LIBCLI_DGRAM LIBCLI_WREPL torture_rpc',
118 internal_module=True
122 bld.SAMBA_MODULE('TORTURE_NET',
123 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',
124 autoproto='libnet/proto.h',
125 subsystem='smbtorture',
126 init_function='torture_net_init',
127 deps='LIBSAMBA-NET POPT_CREDENTIALS torture_rpc PROVISION',
128 internal_module=True
132 bld.SAMBA_MODULE('TORTURE_NTP',
133 source='ntp/ntp_signd.c',
134 autoproto='ntp/proto.h',
135 subsystem='smbtorture',
136 init_function='torture_ntp_init',
137 deps='POPT_CREDENTIALS torture_rpc',
138 internal_module=True
141 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'
143 bld.SAMBA_SUBSYSTEM('torturemain',
144 source='smbtorture.c torture.c shell.c',
145 subsystem_name='smbtorture',
146 deps='torture popt POPT_SAMBA POPT_CREDENTIALS dcerpc LIBCLI_SMB SMBREADLINE ' + TORTURE_MODULES,
149 bld.SAMBA_BINARY('smbtorture',
150 source=[],
151 manpages='man/smbtorture.1',
152 public_headers='smbtorture.h',
153 deps='torturemain torture popt POPT_SAMBA POPT_CREDENTIALS dcerpc LIBCLI_SMB SMBREADLINE ' + TORTURE_MODULES,
154 pyembed=True
157 # this is used in the build farm to build a smbtorture.static binary for s3
158 bld.SAMBA_BINARY('smbtorture.static',
159 source=[],
160 deps='torturemain torture popt POPT_SAMBA POPT_CREDENTIALS dcerpc LIBCLI_SMB SMBREADLINE ' + TORTURE_MODULES,
161 enabled = bld.env.BUILD_FARM,
162 pyembed=True
164 bld.env.NONSHARED_BINARIES.append('smbtorture.static')
168 bld.SAMBA_BINARY('gentest',
169 source='gentest.c',
170 manpages='man/gentest.1',
171 deps='LIBSAMBA-HOSTCONFIG LIBSAMBA-UTIL popt POPT_SAMBA POPT_CREDENTIALS LIBCLI_SMB LIBCLI_RAW'
175 bld.SAMBA_BINARY('masktest',
176 source='masktest.c',
177 manpages='man/masktest.1',
178 deps='LIBSAMBA-HOSTCONFIG LIBSAMBA-UTIL popt POPT_SAMBA POPT_CREDENTIALS LIBCLI_SMB'
182 bld.SAMBA_BINARY('locktest',
183 source='locktest.c',
184 # COV_TARGET='test',
185 #ldflags='--coverage',
186 #cflags='--coverage',
187 # GCOV='1',
188 manpages='man/locktest.1',
189 deps='popt POPT_SAMBA POPT_CREDENTIALS LIBSAMBA-UTIL LIBCLI_SMB LIBSAMBA-HOSTCONFIG',