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