1# TORTURE subsystem
2[LIBRARY::torture]
3DESCRIPTION = Samba torture (test) suite
4SO_VERSION = 0
5VERSION = 0.0.1
6PUBLIC_HEADERS = torture.h ui.h
7PUBLIC_PROTO_HEADER = proto.h
8OBJ_FILES = \
9		torture.o \
10		subunit.o \
11		ui.o
12PUBLIC_DEPENDENCIES = \
13		LIBSAMBA-CONFIG \
14		LIBSAMBA-UTIL \
15		LIBTALLOC
16
17[SUBSYSTEM::TORTURE_UTIL]
18OBJ_FILES = util.o util_smb.o
19PRIVATE_DEPENDENCIES = LIBCLI_RAW
20PUBLIC_PROTO_HEADER = util.h
21PUBLIC_DEPENDENCIES = POPT_CREDENTIALS
22
23#################################
24# Start SUBSYSTEM TORTURE_BASIC
25[MODULE::TORTURE_BASIC]
26SUBSYSTEM = torture
27INIT_FUNCTION = torture_base_init
28PRIVATE_PROTO_HEADER = \
29		basic/proto.h
30OBJ_FILES = \
31		basic/base.o \
32		basic/misc.o \
33		basic/scanner.o \
34		basic/utable.o \
35		basic/charset.o \
36		basic/mangle_test.o \
37		basic/denytest.o \
38		basic/aliases.o \
39		basic/locking.o \
40		basic/secleak.o \
41		basic/rename.o \
42		basic/dir.o \
43		basic/delete.o \
44		basic/unlink.o \
45		basic/disconnect.o \
46		basic/delaywrite.o \
47		basic/attr.o \
48		basic/properties.o
49PUBLIC_DEPENDENCIES = \
50		LIBCLI_SMB POPT_CREDENTIALS \
51		TORTURE_UTIL LIBCLI_RAW
52PRIVATE_DEPENDENCIES = TORTURE_RAW
53# End SUBSYSTEM TORTURE_BASIC
54#################################
55
56#################################
57# Start SUBSYSTEM TORTURE_RAW
58[MODULE::TORTURE_RAW]
59SUBSYSTEM = torture
60INIT_FUNCTION = torture_raw_init
61PRIVATE_PROTO_HEADER = \
62		raw/proto.h
63OBJ_FILES = \
64		raw/qfsinfo.o \
65		raw/qfileinfo.o \
66		raw/setfileinfo.o \
67		raw/search.o \
68		raw/close.o \
69		raw/open.o \
70		raw/mkdir.o \
71		raw/oplock.o \
72		raw/notify.o \
73		raw/mux.o \
74		raw/ioctl.o \
75		raw/chkpath.o \
76		raw/unlink.o \
77		raw/read.o \
78		raw/context.o \
79		raw/write.o \
80		raw/lock.o \
81		raw/lockbench.o \
82		raw/rename.o \
83		raw/eas.o \
84		raw/streams.o \
85		raw/acls.o \
86		raw/seek.o \
87		raw/samba3hide.o \
88		raw/samba3misc.o \
89		raw/composite.o \
90		raw/raw.o
91PUBLIC_DEPENDENCIES = \
92		LIBCLI_SMB LIBCLI_LSA LIBCLI_SMB_COMPOSITE \
93		POPT_CREDENTIALS
94PRIVATE_DEPENDENCIES = TORTURE_UTIL
95# End SUBSYSTEM TORTURE_RAW
96#################################
97include smb2/config.mk
98
99[MODULE::torture_rpc]
100# TORTURE_NET and TORTURE_NBT use functions from torture_rpc...
101#OUTPUT_TYPE = INTEGRATED
102SUBSYSTEM = torture
103INIT_FUNCTION = torture_rpc_init
104PRIVATE_PROTO_HEADER = \
105		rpc/proto.h
106OBJ_FILES = \
107		rpc/join.o \
108		rpc/lsa.o \
109		rpc/lsa_lookup.o \
110		rpc/session_key.o \
111		rpc/echo.o \
112		rpc/dcom.o \
113		rpc/dfs.o \
114		rpc/drsuapi.o \
115		rpc/drsuapi_cracknames.o \
116		rpc/dssync.o \
117		rpc/spoolss.o \
118		rpc/unixinfo.o \
119		rpc/samr.o \
120		rpc/wkssvc.o \
121		rpc/srvsvc.o \
122		rpc/svcctl.o \
123		rpc/atsvc.o \
124		rpc/eventlog.o \
125		rpc/epmapper.o \
126		rpc/winreg.o \
127		rpc/initshutdown.o \
128		rpc/oxidresolve.o \
129		rpc/remact.o \
130		rpc/mgmt.o \
131		rpc/scanner.o \
132		rpc/autoidl.o \
133		rpc/countcalls.o \
134		rpc/testjoin.o \
135		rpc/schannel.o \
136		rpc/netlogon.o \
137		rpc/samlogon.o \
138		rpc/samsync.o \
139		rpc/rot.o \
140		rpc/bind.o \
141		rpc/dssetup.o \
142		rpc/alter_context.o \
143		rpc/bench.o \
144		rpc/samba3rpc.o \
145		rpc/rpc.o \
146		rpc/async_bind.o
147PUBLIC_DEPENDENCIES = \
148		NDR_TABLE RPC_NDR_UNIXINFO RPC_NDR_SAMR RPC_NDR_WINREG RPC_NDR_INITSHUTDOWN \
149		RPC_NDR_OXIDRESOLVER RPC_NDR_EVENTLOG RPC_NDR_ECHO RPC_NDR_SVCCTL \
150		RPC_NDR_MGMT RPC_NDR_NETLOGON RPC_NDR_ATSVC RPC_NDR_DRSUAPI \
151		RPC_NDR_LSA RPC_NDR_EPMAPPER RPC_NDR_DFS RPC_NDR_SPOOLSS \
152		RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_ROT RPC_NDR_DSSETUP \
153		RPC_NDR_REMACT RPC_NDR_OXIDRESOLVER WB_HELPER LIBSAMBA-NET \
154		LIBCLI_AUTH POPT_CREDENTIALS
155PRIVATE_DEPENDENCIES = TORTURE_LDAP TORTURE_UTIL TORTURE_RAP
156
157#################################
158# Start SUBSYSTEM TORTURE_DCOM
159[MODULE::TORTURE_DCOM]
160SUBSYSTEM = torture
161INIT_FUNCTION = torture_dcom_init
162PRIVATE_PROTO_HEADER = \
163		dcom/proto.h
164OBJ_FILES = \
165		dcom/dcom.o
166PUBLIC_DEPENDENCIES = \
167		LIBCLI_SMB NDR_MISC LIBSAMBA-UTIL LIBSAMBA-CONFIG RPC_NDR_SAMR RPC_NDR_LSA DYNCONFIG \
168		RPC_NDR_OXIDRESOLVER \
169		NDR_DCOM \
170		RPC_NDR_REMACT \
171		NDR_TABLE \
172		RPC_NDR_WINREG \
173		POPT_SAMBA \
174		POPT_CREDENTIALS \
175		LIBPOPT \
176		dcom \
177		wmi
178
179PRIVATE_DEPENDENCIES = TORTURE_LDAP TORTURE_UTIL TORTURE_RAP
180# End SUBSYSTEM TORTURE_DCOM
181#################################
182
183#################################
184# Start SUBSYSTEM TORTURE_RAP
185[MODULE::TORTURE_RAP]
186SUBSYSTEM = torture
187INIT_FUNCTION = torture_rap_init
188PRIVATE_PROTO_HEADER = \
189		rap/proto.h
190OBJ_FILES = \
191		rap/rap.o
192PRIVATE_DEPENDENCIES = TORTURE_UTIL
193PUBLIC_DEPENDENCIES = \
194		LIBCLI_SMB
195# End SUBSYSTEM TORTURE_RAP
196#################################
197
198#################################
199# Start SUBSYSTEM TORTURE_AUTH
200[MODULE::TORTURE_AUTH]
201SUBSYSTEM = torture
202PRIVATE_PROTO_HEADER = \
203		auth/proto.h
204OBJ_FILES = \
205		auth/ntlmssp.o \
206		auth/pac.o
207PUBLIC_DEPENDENCIES = \
208		LIBCLI_SMB gensec auth LIBSAMBA3 KERBEROS \
209		POPT_CREDENTIALS
210# End SUBSYSTEM TORTURE_AUTH
211#################################
212
213include local/config.mk
214
215#################################
216# Start MODULE TORTURE_NBENCH
217[MODULE::TORTURE_NBENCH]
218SUBSYSTEM = torture
219INIT_FUNCTION = torture_nbench_init
220PRIVATE_DEPENDENCIES = TORTURE_UTIL
221PRIVATE_PROTO_HEADER = \
222		nbench/proto.h
223OBJ_FILES = \
224		nbench/nbio.o \
225		nbench/nbench.o
226# End MODULE TORTURE_NBENCH
227#################################
228
229#################################
230# Start SUBSYSTEM TORTURE_LDAP
231[MODULE::TORTURE_LDAP]
232SUBSYSTEM = torture
233INIT_FUNCTION = torture_ldap_init
234PRIVATE_PROTO_HEADER = \
235		ldap/proto.h
236OBJ_FILES = \
237		ldap/common.o \
238		ldap/basic.o \
239		ldap/schema.o \
240		ldap/cldap.o \
241		ldap/cldapbench.o
242PUBLIC_DEPENDENCIES = \
243		LIBCLI_LDAP LIBCLI_CLDAP SAMDB POPT_CREDENTIALS
244# End SUBSYSTEM TORTURE_LDAP
245#################################
246
247#################################
248# Start SUBSYSTEM TORTURE_NBT
249[MODULE::TORTURE_NBT]
250SUBSYSTEM = torture
251INIT_FUNCTION = torture_nbt_init
252PRIVATE_PROTO_HEADER = \
253		nbt/proto.h
254OBJ_FILES = \
255		nbt/query.o \
256		nbt/register.o \
257		nbt/wins.o \
258		nbt/winsbench.o \
259		nbt/winsreplication.o \
260		nbt/dgram.o \
261		nbt/nbt.o
262PUBLIC_DEPENDENCIES = \
263		LIBCLI_SMB LIBCLI_NBT LIBCLI_DGRAM LIBCLI_WREPL
264PRIVATE_DEPENDENCIES = torture_rpc
265# End SUBSYSTEM TORTURE_NBT
266#################################
267
268#################################
269# Start SUBSYSTEM TORTURE_NET
270[MODULE::TORTURE_NET]
271SUBSYSTEM = torture
272INIT_FUNCTION = torture_net_init
273PRIVATE_PROTO_HEADER = \
274		libnet/proto.h
275OBJ_FILES = \
276		libnet/libnet.o \
277		libnet/userinfo.o \
278		libnet/userman.o \
279		libnet/domain.o \
280		libnet/libnet_lookup.o \
281		libnet/libnet_user.o \
282		libnet/libnet_share.o \
283		libnet/libnet_rpc.o \
284		libnet/libnet_domain.o
285PUBLIC_DEPENDENCIES = \
286		LIBSAMBA-NET \
287		POPT_CREDENTIALS
288PRIVATE_DEPENDENCIES = torture_rpc
289# End SUBSYSTEM TORTURE_NET
290#################################
291
292#################################
293# Start BINARY smbtorture
294[BINARY::smbtorture]
295INSTALLDIR = BINDIR
296OBJ_FILES = \
297		smbtorture.o
298PRIVATE_DEPENDENCIES = \
299		torture \
300		LIBPOPT \
301		POPT_SAMBA \
302		POPT_CREDENTIALS \
303		dcerpc \
304		LIBCLI_SMB \
305		SMBREADLINE
306MANPAGE = man/smbtorture.1
307# End BINARY smbtorture
308#################################
309
310#################################
311# Start BINARY gentest
312[BINARY::gentest]
313INSTALLDIR = BINDIR
314OBJ_FILES = \
315		gentest.o
316PRIVATE_DEPENDENCIES = \
317		LIBSAMBA-CONFIG \
318		LIBSAMBA-UTIL \
319		LIBPOPT \
320		POPT_SAMBA \
321		POPT_CREDENTIALS \
322		LIBCLI_SMB \
323		LIBCLI_RAW
324MANPAGE = man/gentest.1
325# End BINARY gentest
326#################################
327
328#################################
329# Start BINARY masktest
330[BINARY::masktest]
331INSTALLDIR = BINDIR
332OBJ_FILES = \
333		masktest.o
334PRIVATE_DEPENDENCIES = \
335		LIBSAMBA-CONFIG \
336		LIBSAMBA-UTIL \
337		LIBPOPT \
338		POPT_SAMBA \
339		POPT_CREDENTIALS \
340		LIBCLI_SMB
341MANPAGE = man/masktest.1
342# End BINARY masktest
343#################################
344
345#################################
346# Start BINARY locktest
347[BINARY::locktest]
348INSTALLDIR = BINDIR
349OBJ_FILES = \
350		locktest.o
351PRIVATE_DEPENDENCIES = \
352		LIBSAMBA-UTIL \
353		LIBCLI_SMB \
354		LIBSAMBA-CONFIG
355MANPAGE = man/locktest.1
356# End BINARY locktest
357#################################
358
359GCOV_FLAGS = -ftest-coverage -fprofile-arcs
360GCOV_LIBS = -lgcov
361
362gcov:
363	@$(MAKE) test \
364		CFLAGS="$(CFLAGS) $(GCOV_FLAGS)" \
365		LD_FLAGS="$(LD_FLAGS) $(GCOV_FLAGS)" \
366		LIBS="$(LIBS) $(GCOV_LIBS)"
367	for I in $(sort $(dir $(ALL_OBJS))); \
368		do $(GCOV) -p -o $$I $$I/*.c; \
369	done
370