Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-defs
[kai/samba-autobuild/.git] / source4 / torture / config.mk
1 [SUBSYSTEM::TORTURE_UTIL]
2 PRIVATE_DEPENDENCIES = LIBCLI_RAW LIBPYTHON smbcalls PROVISION
3 PUBLIC_DEPENDENCIES = POPT_CREDENTIALS
4
5 TORTURE_UTIL_OBJ_FILES = $(addprefix $(torturesrcdir)/, util_smb.o)
6
7 #################################
8 # Start SUBSYSTEM TORTURE_BASIC
9 [MODULE::TORTURE_BASIC]
10 SUBSYSTEM = smbtorture
11 INIT_FUNCTION = torture_base_init
12 PRIVATE_DEPENDENCIES = \
13                 LIBCLI_SMB POPT_CREDENTIALS \
14                 TORTURE_UTIL LIBCLI_RAW \
15                 TORTURE_RAW
16 # End SUBSYSTEM TORTURE_BASIC
17 #################################
18
19 TORTURE_BASIC_OBJ_FILES = $(addprefix $(torturesrcdir)/basic/,  \
20                 base.o \
21                 misc.o \
22                 scanner.o \
23                 utable.o \
24                 charset.o \
25                 mangle_test.o \
26                 denytest.o \
27                 aliases.o \
28                 locking.o \
29                 secleak.o \
30                 rename.o \
31                 dir.o \
32                 delete.o \
33                 unlink.o \
34                 disconnect.o \
35                 delaywrite.o \
36                 attr.o \
37                 properties.o)
38
39 $(eval $(call proto_header_template,$(torturesrcdir)/basic/proto.h,$(TORTURE_BASIC_OBJ_FILES:.o=.c)))
40
41 #################################
42 # Start SUBSYSTEM TORTURE_RAW
43 [MODULE::TORTURE_RAW]
44 SUBSYSTEM = smbtorture
45 INIT_FUNCTION = torture_raw_init
46 PRIVATE_DEPENDENCIES = \
47                 LIBCLI_SMB LIBCLI_LSA LIBCLI_SMB_COMPOSITE \
48                 POPT_CREDENTIALS TORTURE_UTIL
49 # End SUBSYSTEM TORTURE_RAW
50 #################################
51
52 TORTURE_RAW_OBJ_FILES = $(addprefix $(torturesrcdir)/raw/, \
53                 qfsinfo.o \
54                 qfileinfo.o \
55                 setfileinfo.o \
56                 search.o \
57                 close.o \
58                 open.o \
59                 mkdir.o \
60                 oplock.o \
61                 notify.o \
62                 mux.o \
63                 ioctl.o \
64                 chkpath.o \
65                 unlink.o \
66                 read.o \
67                 context.o \
68                 write.o \
69                 lock.o \
70                 pingpong.o \
71                 lockbench.o \
72                 lookuprate.o \
73                 tconrate.o \
74                 openbench.o \
75                 rename.o \
76                 eas.o \
77                 streams.o \
78                 acls.o \
79                 seek.o \
80                 samba3hide.o \
81                 samba3misc.o \
82                 composite.o \
83                 raw.o \
84                 offline.o)
85
86 $(eval $(call proto_header_template,$(torturesrcdir)/raw/proto.h,$(TORTURE_RAW_OBJ_FILES:.o=.c)))
87
88 mkinclude smb2/config.mk
89 mkinclude winbind/config.mk
90
91 [SUBSYSTEM::TORTURE_NDR]
92
93 TORTURE_NDR_OBJ_FILES = $(addprefix $(torturesrcdir)/ndr/, ndr.o winreg.o atsvc.o lsa.o epmap.o dfs.o netlogon.o drsuapi.o spoolss.o samr.o)
94
95 $(eval $(call proto_header_template,$(torturesrcdir)/ndr/proto.h,$(TORTURE_NDR_OBJ_FILES:.o=.c)))
96
97 [MODULE::torture_rpc]
98 # TORTURE_NET and TORTURE_NBT use functions from torture_rpc...
99 #OUTPUT_TYPE = MERGED_OBJ
100 SUBSYSTEM = smbtorture
101 INIT_FUNCTION = torture_rpc_init
102 PRIVATE_DEPENDENCIES = \
103                 NDR_TABLE RPC_NDR_UNIXINFO dcerpc_samr RPC_NDR_WINREG RPC_NDR_INITSHUTDOWN \
104                 RPC_NDR_OXIDRESOLVER RPC_NDR_EVENTLOG RPC_NDR_ECHO RPC_NDR_SVCCTL \
105                 RPC_NDR_NETLOGON dcerpc_atsvc dcerpc_mgmt RPC_NDR_DRSUAPI \
106                 RPC_NDR_LSA RPC_NDR_EPMAPPER RPC_NDR_DFS RPC_NDR_FRSAPI RPC_NDR_SPOOLSS \
107                 RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_ROT RPC_NDR_DSSETUP \
108                 RPC_NDR_REMACT RPC_NDR_OXIDRESOLVER WB_HELPER LIBSAMBA-NET \
109                 LIBCLI_AUTH POPT_CREDENTIALS TORTURE_LDAP TORTURE_UTIL TORTURE_RAP \
110                 dcerpc_server service process_model ntvfs SERVICE_SMB
111
112 torture_rpc_OBJ_FILES = $(addprefix $(torturesrcdir)/rpc/, \
113                 join.o lsa.o lsa_lookup.o session_key.o echo.o dfs.o drsuapi.o \
114                 drsuapi_cracknames.o dssync.o spoolss.o spoolss_notify.o spoolss_win.o \
115                 unixinfo.o samr.o samr_accessmask.o wkssvc.o srvsvc.o svcctl.o atsvc.o \
116                 eventlog.o epmapper.o winreg.o initshutdown.o oxidresolve.o remact.o mgmt.o \
117                 scanner.o autoidl.o countcalls.o testjoin.o schannel.o netlogon.o samlogon.o \
118                 samsync.o bind.o dssetup.o alter_context.o bench.o samba3rpc.o rpc.o async_bind.o \
119                 handles.o frsapi.o)
120
121 $(eval $(call proto_header_template,$(torturesrcdir)/rpc/proto.h,$(torture_rpc_OBJ_FILES:.o=.c)))
122
123 #################################
124 # Start SUBSYSTEM TORTURE_RAP
125 [MODULE::TORTURE_RAP]
126 SUBSYSTEM = smbtorture
127 INIT_FUNCTION = torture_rap_init
128 PRIVATE_DEPENDENCIES = TORTURE_UTIL LIBCLI_SMB
129 # End SUBSYSTEM TORTURE_RAP
130 #################################
131
132 TORTURE_RAP_OBJ_FILES = $(torturesrcdir)/rap/rap.o
133
134 $(eval $(call proto_header_template,$(torturesrcdir)/rap/proto.h,$(TORTURE_RAP_OBJ_FILES:.o=.c)))
135
136 #################################
137 # Start SUBSYSTEM TORTURE_AUTH
138 [MODULE::TORTURE_AUTH]
139 SUBSYSTEM = smbtorture
140 PRIVATE_DEPENDENCIES = \
141                 LIBCLI_SMB gensec auth KERBEROS \
142                 POPT_CREDENTIALS SMBPASSWD
143 # End SUBSYSTEM TORTURE_AUTH
144 #################################
145
146 TORTURE_AUTH_OBJ_FILES = $(addprefix $(torturesrcdir)/auth/, ntlmssp.o pac.o)
147
148 $(TORTURE_AUTH_OBJ_FILES): CFLAGS+=$(KRB5_CFLAGS)
149
150 $(eval $(call proto_header_template,$(torturesrcdir)/auth/proto.h,$(TORTURE_AUTH_OBJ_FILES:.o=.c)))
151
152 mkinclude local/config.mk
153
154 #################################
155 # Start MODULE TORTURE_NBENCH
156 [MODULE::TORTURE_NBENCH]
157 SUBSYSTEM = smbtorture
158 INIT_FUNCTION = torture_nbench_init
159 PRIVATE_DEPENDENCIES = TORTURE_UTIL 
160 # End MODULE TORTURE_NBENCH
161 #################################
162
163 TORTURE_NBENCH_OBJ_FILES = $(addprefix $(torturesrcdir)/nbench/, nbio.o nbench.o)
164
165 $(eval $(call proto_header_template,$(torturesrcdir)/nbench/proto.h,$(TORTURE_NBENCH_OBJ_FILES:.o=.c)))
166
167 #################################
168 # Start MODULE TORTURE_UNIX
169 [MODULE::TORTURE_UNIX]
170 SUBSYSTEM = smbtorture
171 INIT_FUNCTION = torture_unix_init
172 PRIVATE_DEPENDENCIES = TORTURE_UTIL 
173 # End MODULE TORTURE_UNIX
174 #################################
175
176 TORTURE_UNIX_OBJ_FILES = $(addprefix $(torturesrcdir)/unix/, unix.o whoami.o unix_info2.o)
177
178 $(eval $(call proto_header_template,$(torturesrcdir)/unix/proto.h,$(TORTURE_UNIX_OBJ_FILES:.o=.c)))
179
180 #################################
181 # Start SUBSYSTEM TORTURE_LDAP
182 [MODULE::TORTURE_LDAP]
183 SUBSYSTEM = smbtorture
184 INIT_FUNCTION = torture_ldap_init
185 PRIVATE_DEPENDENCIES = \
186                 LIBCLI_LDAP LIBCLI_CLDAP SAMDB POPT_CREDENTIALS
187 # End SUBSYSTEM TORTURE_LDAP
188 #################################
189
190 TORTURE_LDAP_OBJ_FILES = $(addprefix $(torturesrcdir)/ldap/, common.o basic.o schema.o uptodatevector.o cldap.o cldapbench.o)
191
192 $(eval $(call proto_header_template,$(torturesrcdir)/ldap/proto.h,$(TORTURE_LDAP_OBJ_FILES:.o=.c)))
193
194 #################################
195 # Start SUBSYSTEM TORTURE_NBT
196 [MODULE::TORTURE_NBT]
197 SUBSYSTEM = smbtorture
198 INIT_FUNCTION = torture_nbt_init
199 PRIVATE_DEPENDENCIES = \
200                 LIBCLI_SMB LIBCLI_NBT LIBCLI_DGRAM LIBCLI_WREPL torture_rpc
201 # End SUBSYSTEM TORTURE_NBT
202 #################################
203
204 TORTURE_NBT_OBJ_FILES = $(addprefix $(torturesrcdir)/nbt/, query.o register.o \
205         wins.o winsbench.o winsreplication.o dgram.o nbt.o)
206
207 $(eval $(call proto_header_template,$(torturesrcdir)/nbt/proto.h,$(TORTURE_NBT_OBJ_FILES:.o=.c)))
208
209 #################################
210 # Start SUBSYSTEM TORTURE_NET
211 [MODULE::TORTURE_NET]
212 SUBSYSTEM = smbtorture
213 INIT_FUNCTION = torture_net_init
214 PRIVATE_DEPENDENCIES = \
215                 LIBSAMBA-NET \
216                 POPT_CREDENTIALS \
217                 torture_rpc
218 # End SUBSYSTEM TORTURE_NET
219 #################################
220
221 TORTURE_NET_OBJ_FILES = $(addprefix $(torturesrcdir)/libnet/, libnet.o \
222                                            utils.o userinfo.o userman.o groupinfo.o groupman.o \
223                                            domain.o libnet_lookup.o libnet_user.o libnet_group.o \
224                                            libnet_share.o libnet_rpc.o libnet_domain.o libnet_BecomeDC.o)
225
226 $(eval $(call proto_header_template,$(torturesrcdir)/libnet/proto.h,$(TORTURE_NET_OBJ_FILES:.o=.c)))
227
228 #################################
229 # Start BINARY smbtorture
230 [BINARY::smbtorture]
231 INSTALLDIR = BINDIR
232 PRIVATE_DEPENDENCIES = \
233                 torture \
234                 LIBPOPT \
235                 POPT_SAMBA \
236                 POPT_CREDENTIALS \
237                 dcerpc \
238                 LIBCLI_SMB \
239                 SMBREADLINE
240 # End BINARY smbtorture
241 #################################
242
243 smbtorture_OBJ_FILES = $(torturesrcdir)/smbtorture.o $(torturesrcdir)/torture.o 
244
245 PUBLIC_HEADERS += $(torturesrcdir)/smbtorture.h
246 MANPAGES += $(torturesrcdir)/man/smbtorture.1
247
248 #################################
249 # Start BINARY gentest
250 [BINARY::gentest]
251 INSTALLDIR = BINDIR
252 PRIVATE_DEPENDENCIES = \
253                 LIBSAMBA-HOSTCONFIG \
254                 LIBSAMBA-UTIL \
255                 LIBPOPT \
256                 POPT_SAMBA \
257                 POPT_CREDENTIALS \
258                 LIBCLI_SMB \
259                 LIBCLI_RAW
260 # End BINARY gentest
261 #################################
262
263 gentest_OBJ_FILES = $(torturesrcdir)/gentest.o
264
265 MANPAGES += $(torturesrcdir)/man/gentest.1
266
267 #################################
268 # Start BINARY masktest
269 [BINARY::masktest]
270 INSTALLDIR = BINDIR
271 PRIVATE_DEPENDENCIES = \
272                 LIBSAMBA-HOSTCONFIG \
273                 LIBSAMBA-UTIL \
274                 LIBPOPT \
275                 POPT_SAMBA \
276                 POPT_CREDENTIALS \
277                 LIBCLI_SMB
278 # End BINARY masktest
279 #################################
280
281 masktest_OBJ_FILES = $(torturesrcdir)/masktest.o
282
283 MANPAGES += $(torturesrcdir)/man/masktest.1
284
285 #################################
286 # Start BINARY locktest
287 [BINARY::locktest]
288 INSTALLDIR = BINDIR
289 PRIVATE_DEPENDENCIES = \
290                 LIBPOPT \
291                 POPT_SAMBA \
292                 POPT_CREDENTIALS \
293                 LIBSAMBA-UTIL \
294                 LIBCLI_SMB \
295                 LIBSAMBA-HOSTCONFIG
296 # End BINARY locktest
297 #################################
298
299 locktest_OBJ_FILES = $(torturesrcdir)/locktest.o
300
301 MANPAGES += $(torturesrcdir)/man/locktest.1
302
303 GCOV=0
304
305 ifeq ($(MAKECMDGOALS),gcov)
306 GCOV=1
307 endif
308
309 ifeq ($(MAKECMDGOALS),lcov)
310 GCOV=1
311 endif
312
313 ifeq ($(MAKECMDGOALS),testcov-html)
314 GCOV=1
315 endif
316
317 ifeq ($(GCOV),1)
318 CFLAGS += --coverage
319 LDFLAGS += --coverage
320 endif
321
322 COV_TARGET = test
323
324 gcov: test
325         for I in $(sort $(dir $(ALL_OBJS))); \
326                 do $(GCOV) -p -o $$I $$I/*.c; \
327         done
328
329 samba.info: test
330         -rm heimdal/lib/*/{lex,parse}.{gcda,gcno}
331         lcov --base-directory `pwd` --directory . --capture --output-file samba.info
332
333 lcov: samba.info
334         genhtml -o coverage $<
335
336 testcov-html:: lcov
337
338 clean::
339         @rm -f samba.info