42c40681784e339207056a6c9c70c5bd6a6d2d8f
[ira/wip.git] / source / 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 include winbind/config.mk
100
101 [SUBSYSTEM::TORTURE_NDR]
102 PRIVATE_PROTO_HEADER = ndr/proto.h
103 OBJ_FILES = ndr/ndr.o \
104                         ndr/winreg.o \
105                         ndr/atsvc.o \
106                         ndr/lsa.o \
107                         ndr/epmap.o \
108                         ndr/dfs.o \
109                         ndr/netlogon.o \
110                         ndr/drsuapi.o \
111                         ndr/spoolss.o \
112                         ndr/samr.o
113
114 [MODULE::torture_rpc]
115 # TORTURE_NET and TORTURE_NBT use functions from torture_rpc...
116 #OUTPUT_TYPE = INTEGRATED
117 SUBSYSTEM = torture
118 INIT_FUNCTION = torture_rpc_init
119 PRIVATE_PROTO_HEADER = \
120                 rpc/proto.h
121 OBJ_FILES = \
122                 rpc/join.o \
123                 rpc/lsa.o \
124                 rpc/lsa_lookup.o \
125                 rpc/session_key.o \
126                 rpc/echo.o \
127                 rpc/dfs.o \
128                 rpc/drsuapi.o \
129                 rpc/drsuapi_cracknames.o \
130                 rpc/dssync.o \
131                 rpc/spoolss.o \
132                 rpc/spoolss_notify.o \
133                 rpc/spoolss_win.o \
134                 rpc/unixinfo.o \
135                 rpc/samr.o \
136                 rpc/samr_accessmask.o \
137                 rpc/wkssvc.o \
138                 rpc/srvsvc.o \
139                 rpc/svcctl.o \
140                 rpc/atsvc.o \
141                 rpc/eventlog.o \
142                 rpc/epmapper.o \
143                 rpc/winreg.o \
144                 rpc/initshutdown.o \
145                 rpc/oxidresolve.o \
146                 rpc/remact.o \
147                 rpc/mgmt.o \
148                 rpc/scanner.o \
149                 rpc/autoidl.o \
150                 rpc/countcalls.o \
151                 rpc/testjoin.o \
152                 rpc/schannel.o \
153                 rpc/netlogon.o \
154                 rpc/samlogon.o \
155                 rpc/samsync.o \
156                 rpc/bind.o \
157                 rpc/dssetup.o \
158                 rpc/alter_context.o \
159                 rpc/bench.o \
160                 rpc/samba3rpc.o \
161                 rpc/rpc.o \
162                 rpc/async_bind.o \
163                 rpc/handles.o \
164                 rpc/frsapi.o
165 PRIVATE_DEPENDENCIES = \
166                 NDR_TABLE RPC_NDR_UNIXINFO dcerpc_samr RPC_NDR_WINREG RPC_NDR_INITSHUTDOWN \
167                 RPC_NDR_OXIDRESOLVER RPC_NDR_EVENTLOG RPC_NDR_ECHO RPC_NDR_SVCCTL \
168                 RPC_NDR_NETLOGON dcerpc_atsvc dcerpc_mgmt RPC_NDR_DRSUAPI \
169                 RPC_NDR_LSA RPC_NDR_EPMAPPER RPC_NDR_DFS RPC_NDR_FRSAPI RPC_NDR_SPOOLSS \
170                 RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_ROT RPC_NDR_DSSETUP \
171                 RPC_NDR_REMACT RPC_NDR_OXIDRESOLVER WB_HELPER LIBSAMBA-NET \
172                 LIBCLI_AUTH POPT_CREDENTIALS TORTURE_LDAP TORTURE_UTIL TORTURE_RAP \
173                 dcerpc_server service process_model
174
175 #################################
176 # Start SUBSYSTEM TORTURE_RAP
177 [MODULE::TORTURE_RAP]
178 SUBSYSTEM = torture
179 INIT_FUNCTION = torture_rap_init
180 PRIVATE_PROTO_HEADER = \
181                 rap/proto.h
182 OBJ_FILES = \
183                 rap/rap.o
184 PRIVATE_DEPENDENCIES = TORTURE_UTIL LIBCLI_SMB
185 # End SUBSYSTEM TORTURE_RAP
186 #################################
187
188 #################################
189 # Start SUBSYSTEM TORTURE_AUTH
190 [MODULE::TORTURE_AUTH]
191 SUBSYSTEM = torture
192 PRIVATE_PROTO_HEADER = \
193                 auth/proto.h
194 OBJ_FILES = \
195                 auth/ntlmssp.o \
196                 auth/pac.o
197 PRIVATE_DEPENDENCIES = \
198                 LIBCLI_SMB gensec auth LIBSAMBA3 KERBEROS \
199                 POPT_CREDENTIALS
200 # End SUBSYSTEM TORTURE_AUTH
201 #################################
202
203 include local/config.mk
204
205 #################################
206 # Start MODULE TORTURE_NBENCH
207 [MODULE::TORTURE_NBENCH]
208 SUBSYSTEM = torture
209 INIT_FUNCTION = torture_nbench_init
210 PRIVATE_DEPENDENCIES = TORTURE_UTIL 
211 PRIVATE_PROTO_HEADER = \
212                 nbench/proto.h
213 OBJ_FILES = \
214                 nbench/nbio.o \
215                 nbench/nbench.o
216 # End MODULE TORTURE_NBENCH
217 #################################
218
219 #################################
220 # Start MODULE TORTURE_UNIX
221 [MODULE::TORTURE_UNIX]
222 SUBSYSTEM = torture
223 INIT_FUNCTION = torture_unix_init
224 PRIVATE_DEPENDENCIES = TORTURE_UTIL 
225 PRIVATE_PROTO_HEADER = \
226                 unix/proto.h
227 OBJ_FILES = \
228                 unix/unix.o \
229                 unix/whoami.o \
230                 unix/unix_info2.o
231 # End MODULE TORTURE_UNIX
232 #################################
233
234 #################################
235 # Start SUBSYSTEM TORTURE_LDAP
236 [MODULE::TORTURE_LDAP]
237 SUBSYSTEM = torture
238 INIT_FUNCTION = torture_ldap_init
239 PRIVATE_PROTO_HEADER = \
240                 ldap/proto.h
241 OBJ_FILES = \
242                 ldap/common.o \
243                 ldap/basic.o \
244                 ldap/schema.o \
245                 ldap/uptodatevector.o \
246                 ldap/cldap.o \
247                 ldap/cldapbench.o
248 PRIVATE_DEPENDENCIES = \
249                 LIBCLI_LDAP LIBCLI_CLDAP SAMDB POPT_CREDENTIALS
250 # End SUBSYSTEM TORTURE_LDAP
251 #################################
252
253 #################################
254 # Start SUBSYSTEM TORTURE_NBT
255 [MODULE::TORTURE_NBT]
256 SUBSYSTEM = torture
257 INIT_FUNCTION = torture_nbt_init
258 PRIVATE_PROTO_HEADER = \
259                 nbt/proto.h
260 OBJ_FILES = \
261                 nbt/query.o \
262                 nbt/register.o \
263                 nbt/wins.o \
264                 nbt/winsbench.o \
265                 nbt/winsreplication.o \
266                 nbt/dgram.o \
267                 nbt/nbt.o
268 PRIVATE_DEPENDENCIES = \
269                 LIBCLI_SMB LIBCLI_NBT LIBCLI_DGRAM LIBCLI_WREPL torture_rpc
270 # End SUBSYSTEM TORTURE_NBT
271 #################################
272
273 #################################
274 # Start SUBSYSTEM TORTURE_NET
275 [MODULE::TORTURE_NET]
276 SUBSYSTEM = torture
277 INIT_FUNCTION = torture_net_init
278 PRIVATE_PROTO_HEADER = \
279                 libnet/proto.h
280 OBJ_FILES = \
281                 libnet/libnet.o \
282                 libnet/utils.o \
283                 libnet/userinfo.o \
284                 libnet/userman.o \
285                 libnet/groupinfo.o \
286                 libnet/groupman.o \
287                 libnet/domain.o \
288                 libnet/libnet_lookup.o \
289                 libnet/libnet_user.o \
290                 libnet/libnet_group.o \
291                 libnet/libnet_share.o \
292                 libnet/libnet_rpc.o \
293                 libnet/libnet_domain.o \
294                 libnet/libnet_BecomeDC.o
295 PRIVATE_DEPENDENCIES = \
296                 LIBSAMBA-NET \
297                 smbcalls \
298                 POPT_CREDENTIALS \
299                 torture_rpc \
300                 LIBPYTHON
301 # End SUBSYSTEM TORTURE_NET
302 #################################
303
304 #################################
305 # Start BINARY smbtorture
306 [BINARY::smbtorture]
307 INSTALLDIR = BINDIR
308 OBJ_FILES = \
309                 smbtorture.o
310 PRIVATE_DEPENDENCIES = \
311                 torture \
312                 LIBPOPT \
313                 POPT_SAMBA \
314                 POPT_CREDENTIALS \
315                 dcerpc \
316                 LIBCLI_SMB \
317                 SMBREADLINE
318 MANPAGE = man/smbtorture.1
319 # End BINARY smbtorture
320 #################################
321
322 #################################
323 # Start BINARY gentest
324 [BINARY::gentest]
325 INSTALLDIR = BINDIR
326 OBJ_FILES = \
327                 gentest.o
328 PRIVATE_DEPENDENCIES = \
329                 LIBSAMBA-CONFIG \
330                 LIBSAMBA-UTIL \
331                 LIBPOPT \
332                 POPT_SAMBA \
333                 POPT_CREDENTIALS \
334                 LIBCLI_SMB \
335                 LIBCLI_RAW
336 MANPAGE = man/gentest.1
337 # End BINARY gentest
338 #################################
339
340 #################################
341 # Start BINARY masktest
342 [BINARY::masktest]
343 INSTALLDIR = BINDIR
344 OBJ_FILES = \
345                 masktest.o
346 PRIVATE_DEPENDENCIES = \
347                 LIBSAMBA-CONFIG \
348                 LIBSAMBA-UTIL \
349                 LIBPOPT \
350                 POPT_SAMBA \
351                 POPT_CREDENTIALS \
352                 LIBCLI_SMB
353 MANPAGE = man/masktest.1
354 # End BINARY masktest
355 #################################
356
357 #################################
358 # Start BINARY locktest
359 [BINARY::locktest]
360 INSTALLDIR = BINDIR
361 OBJ_FILES = \
362                 locktest.o
363 PRIVATE_DEPENDENCIES = \
364                 LIBSAMBA-UTIL \
365                 LIBCLI_SMB \
366                 LIBSAMBA-CONFIG
367 MANPAGE = man/locktest.1
368 # End BINARY locktest
369 #################################
370
371 GCOV_CFLAGS = -ftest-coverage -fprofile-arcs
372 GCOV_LDFLAGS = $(GCOV_CFLAGS) -lgcov
373
374 COV_TARGET = test
375
376 COV_VARS = \
377         CFLAGS="$(CFLAGS) $(GCOV_CFLAGS)" \
378         BNLD_FLAGS="$(BNLD_FLAGS) $(GCOV_LDFLAGS)" \
379         SHLD_FLAGS="$(SHLD_FLAGS) $(GCOV_LDFLAGS)" \
380         MDLD_FLAGS="$(MDLD_FLAGS) $(GCOV_LDFLAGS)" \
381         HOSTCC_FLAGS="$(HOSTCC_FLAGS) $(GCOV_CFLAGS)" \
382         HOSTLD_FLAGS="$(HOSTLD_FLAGS) $(GCOV_LDFLAGS)"
383
384 test_cov:
385         @$(MAKE) $(COV_TARGET) $(COV_VARS)
386
387 gcov: test_cov
388         for I in $(sort $(dir $(ALL_OBJS))); \
389                 do $(GCOV) -p -o $$I $$I/*.c; \
390         done
391
392 lcov-split: 
393         rm -f samba.info
394         @$(MAKE) $(COV_TARGET) $(COV_VARS) \
395                 TEST_OPTIONS="--analyse-cmd=\"lcov --base-directory `pwd` --directory . --capture --output-file samba.info -t\""
396         -rm heimdal/lib/*/{lex,parse}.{gcda,gcno}
397         genhtml -o coverage samba.info
398
399 lcov: test_cov
400         -rm heimdal/lib/*/{lex,parse}.{gcda,gcno}
401         lcov --base-directory `pwd` --directory . --capture --output-file samba.info
402         genhtml -o coverage samba.info
403
404 testcov-html:: lcov