diff options
Diffstat (limited to 'source4/torture/config.mk')
-rw-r--r-- | source4/torture/config.mk | 402 |
1 files changed, 175 insertions, 227 deletions
diff --git a/source4/torture/config.mk b/source4/torture/config.mk index 1d09d74f99..2857b99582 100644 --- a/source4/torture/config.mk +++ b/source4/torture/config.mk @@ -1,51 +1,14 @@ -# TORTURE subsystem -[LIBRARY::torture] -SO_VERSION = 0 -VERSION = 0.0.1 -PC_FILE = torture.pc -PRIVATE_PROTO_HEADER = proto.h -OBJ_FILES = \ - torture.o \ - ui.o -PUBLIC_DEPENDENCIES = \ - LIBSAMBA-HOSTCONFIG \ - LIBSAMBA-UTIL \ - LIBTALLOC \ - LIBPOPT - -PUBLIC_HEADERS += torture/torture.h torture/ui.h - [SUBSYSTEM::TORTURE_UTIL] -OBJ_FILES = util_smb.o util_provision.o -PRIVATE_DEPENDENCIES = LIBCLI_RAW LIBPYTHON smbcalls +PRIVATE_DEPENDENCIES = LIBCLI_RAW LIBPYTHON smbcalls PROVISION PUBLIC_DEPENDENCIES = POPT_CREDENTIALS +TORTURE_UTIL_OBJ_FILES = $(addprefix $(torturesrcdir)/, util_smb.o) + ################################# # Start SUBSYSTEM TORTURE_BASIC [MODULE::TORTURE_BASIC] -SUBSYSTEM = torture +SUBSYSTEM = smbtorture INIT_FUNCTION = torture_base_init -PRIVATE_PROTO_HEADER = \ - basic/proto.h -OBJ_FILES = \ - basic/base.o \ - basic/misc.o \ - basic/scanner.o \ - basic/utable.o \ - basic/charset.o \ - basic/mangle_test.o \ - basic/denytest.o \ - basic/aliases.o \ - basic/locking.o \ - basic/secleak.o \ - basic/rename.o \ - basic/dir.o \ - basic/delete.o \ - basic/unlink.o \ - basic/disconnect.o \ - basic/delaywrite.o \ - basic/attr.o \ - basic/properties.o PRIVATE_DEPENDENCIES = \ LIBCLI_SMB POPT_CREDENTIALS \ TORTURE_UTIL LIBCLI_RAW \ @@ -53,117 +16,89 @@ PRIVATE_DEPENDENCIES = \ # End SUBSYSTEM TORTURE_BASIC ################################# +TORTURE_BASIC_OBJ_FILES = $(addprefix $(torturesrcdir)/basic/, \ + base.o \ + misc.o \ + scanner.o \ + utable.o \ + charset.o \ + mangle_test.o \ + denytest.o \ + aliases.o \ + locking.o \ + secleak.o \ + rename.o \ + dir.o \ + delete.o \ + unlink.o \ + disconnect.o \ + delaywrite.o \ + attr.o \ + properties.o) + +$(eval $(call proto_header_template,$(torturesrcdir)/basic/proto.h,$(TORTURE_BASIC_OBJ_FILES:.o=.c))) + ################################# # Start SUBSYSTEM TORTURE_RAW [MODULE::TORTURE_RAW] -SUBSYSTEM = torture +SUBSYSTEM = smbtorture INIT_FUNCTION = torture_raw_init -PRIVATE_PROTO_HEADER = \ - raw/proto.h -OBJ_FILES = \ - raw/qfsinfo.o \ - raw/qfileinfo.o \ - raw/setfileinfo.o \ - raw/search.o \ - raw/close.o \ - raw/open.o \ - raw/mkdir.o \ - raw/oplock.o \ - raw/notify.o \ - raw/mux.o \ - raw/ioctl.o \ - raw/chkpath.o \ - raw/unlink.o \ - raw/read.o \ - raw/context.o \ - raw/write.o \ - raw/lock.o \ - raw/pingpong.o \ - raw/lockbench.o \ - raw/openbench.o \ - raw/rename.o \ - raw/eas.o \ - raw/streams.o \ - raw/acls.o \ - raw/seek.o \ - raw/samba3hide.o \ - raw/samba3misc.o \ - raw/composite.o \ - raw/raw.o \ - raw/offline.o PRIVATE_DEPENDENCIES = \ LIBCLI_SMB LIBCLI_LSA LIBCLI_SMB_COMPOSITE \ POPT_CREDENTIALS TORTURE_UTIL # End SUBSYSTEM TORTURE_RAW ################################# +TORTURE_RAW_OBJ_FILES = $(addprefix $(torturesrcdir)/raw/, \ + qfsinfo.o \ + qfileinfo.o \ + setfileinfo.o \ + search.o \ + close.o \ + open.o \ + mkdir.o \ + oplock.o \ + notify.o \ + mux.o \ + ioctl.o \ + chkpath.o \ + unlink.o \ + read.o \ + context.o \ + write.o \ + lock.o \ + pingpong.o \ + lockbench.o \ + lookuprate.o \ + tconrate.o \ + openbench.o \ + rename.o \ + eas.o \ + streams.o \ + acls.o \ + seek.o \ + samba3hide.o \ + samba3misc.o \ + composite.o \ + raw.o \ + offline.o) + +$(eval $(call proto_header_template,$(torturesrcdir)/raw/proto.h,$(TORTURE_RAW_OBJ_FILES:.o=.c))) + mkinclude smb2/config.mk mkinclude winbind/config.mk [SUBSYSTEM::TORTURE_NDR] -PRIVATE_PROTO_HEADER = ndr/proto.h -OBJ_FILES = ndr/ndr.o \ - ndr/winreg.o \ - ndr/atsvc.o \ - ndr/lsa.o \ - ndr/epmap.o \ - ndr/dfs.o \ - ndr/netlogon.o \ - ndr/drsuapi.o \ - ndr/spoolss.o \ - ndr/samr.o + +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) + +$(eval $(call proto_header_template,$(torturesrcdir)/ndr/proto.h,$(TORTURE_NDR_OBJ_FILES:.o=.c))) [MODULE::torture_rpc] # TORTURE_NET and TORTURE_NBT use functions from torture_rpc... #OUTPUT_TYPE = MERGED_OBJ -SUBSYSTEM = torture +SUBSYSTEM = smbtorture INIT_FUNCTION = torture_rpc_init -PRIVATE_PROTO_HEADER = \ - rpc/proto.h -OBJ_FILES = \ - rpc/join.o \ - rpc/lsa.o \ - rpc/lsa_lookup.o \ - rpc/session_key.o \ - rpc/echo.o \ - rpc/dfs.o \ - rpc/drsuapi.o \ - rpc/drsuapi_cracknames.o \ - rpc/dssync.o \ - rpc/spoolss.o \ - rpc/spoolss_notify.o \ - rpc/spoolss_win.o \ - rpc/unixinfo.o \ - rpc/samr.o \ - rpc/samr_accessmask.o \ - rpc/wkssvc.o \ - rpc/srvsvc.o \ - rpc/svcctl.o \ - rpc/atsvc.o \ - rpc/eventlog.o \ - rpc/epmapper.o \ - rpc/winreg.o \ - rpc/initshutdown.o \ - rpc/oxidresolve.o \ - rpc/remact.o \ - rpc/mgmt.o \ - rpc/scanner.o \ - rpc/autoidl.o \ - rpc/countcalls.o \ - rpc/testjoin.o \ - rpc/schannel.o \ - rpc/netlogon.o \ - rpc/samlogon.o \ - rpc/samsync.o \ - rpc/bind.o \ - rpc/dssetup.o \ - rpc/alter_context.o \ - rpc/bench.o \ - rpc/samba3rpc.o \ - rpc/rpc.o \ - rpc/async_bind.o \ - rpc/handles.o \ - rpc/frsapi.o PRIVATE_DEPENDENCIES = \ 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 \ @@ -172,128 +107,108 @@ PRIVATE_DEPENDENCIES = \ RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_ROT RPC_NDR_DSSETUP \ RPC_NDR_REMACT RPC_NDR_OXIDRESOLVER WB_HELPER LIBSAMBA-NET \ LIBCLI_AUTH POPT_CREDENTIALS TORTURE_LDAP TORTURE_UTIL TORTURE_RAP \ - dcerpc_server service process_model + dcerpc_server service process_model ntvfs SERVICE_SMB + +torture_rpc_OBJ_FILES = $(addprefix $(torturesrcdir)/rpc/, \ + join.o lsa.o lsa_lookup.o session_key.o echo.o dfs.o drsuapi.o \ + drsuapi_cracknames.o dssync.o spoolss.o spoolss_notify.o spoolss_win.o \ + unixinfo.o samr.o samr_accessmask.o wkssvc.o srvsvc.o svcctl.o atsvc.o \ + eventlog.o epmapper.o winreg.o initshutdown.o oxidresolve.o remact.o mgmt.o \ + scanner.o autoidl.o countcalls.o testjoin.o schannel.o netlogon.o samlogon.o \ + samsync.o bind.o dssetup.o alter_context.o bench.o samba3rpc.o rpc.o async_bind.o \ + handles.o frsapi.o) + +$(eval $(call proto_header_template,$(torturesrcdir)/rpc/proto.h,$(torture_rpc_OBJ_FILES:.o=.c))) ################################# # Start SUBSYSTEM TORTURE_RAP [MODULE::TORTURE_RAP] -SUBSYSTEM = torture +SUBSYSTEM = smbtorture INIT_FUNCTION = torture_rap_init -PRIVATE_PROTO_HEADER = \ - rap/proto.h -OBJ_FILES = \ - rap/rap.o PRIVATE_DEPENDENCIES = TORTURE_UTIL LIBCLI_SMB # End SUBSYSTEM TORTURE_RAP ################################# +TORTURE_RAP_OBJ_FILES = $(torturesrcdir)/rap/rap.o + +$(eval $(call proto_header_template,$(torturesrcdir)/rap/proto.h,$(TORTURE_RAP_OBJ_FILES:.o=.c))) + ################################# # Start SUBSYSTEM TORTURE_AUTH [MODULE::TORTURE_AUTH] -SUBSYSTEM = torture -PRIVATE_PROTO_HEADER = \ - auth/proto.h -OBJ_FILES = \ - auth/ntlmssp.o \ - auth/pac.o +SUBSYSTEM = smbtorture PRIVATE_DEPENDENCIES = \ LIBCLI_SMB gensec auth KERBEROS \ POPT_CREDENTIALS SMBPASSWD # End SUBSYSTEM TORTURE_AUTH ################################# +TORTURE_AUTH_OBJ_FILES = $(addprefix $(torturesrcdir)/auth/, ntlmssp.o pac.o) + +$(eval $(call proto_header_template,$(torturesrcdir)/auth/proto.h,$(TORTURE_AUTH_OBJ_FILES:.o=.c))) + mkinclude local/config.mk ################################# # Start MODULE TORTURE_NBENCH [MODULE::TORTURE_NBENCH] -SUBSYSTEM = torture +SUBSYSTEM = smbtorture INIT_FUNCTION = torture_nbench_init PRIVATE_DEPENDENCIES = TORTURE_UTIL -PRIVATE_PROTO_HEADER = \ - nbench/proto.h -OBJ_FILES = \ - nbench/nbio.o \ - nbench/nbench.o # End MODULE TORTURE_NBENCH ################################# +TORTURE_NBENCH_OBJ_FILES = $(addprefix $(torturesrcdir)/nbench/, nbio.o nbench.o) + +$(eval $(call proto_header_template,$(torturesrcdir)/nbench/proto.h,$(TORTURE_NBENCH_OBJ_FILES:.o=.c))) + ################################# # Start MODULE TORTURE_UNIX [MODULE::TORTURE_UNIX] -SUBSYSTEM = torture +SUBSYSTEM = smbtorture INIT_FUNCTION = torture_unix_init PRIVATE_DEPENDENCIES = TORTURE_UTIL -PRIVATE_PROTO_HEADER = \ - unix/proto.h -OBJ_FILES = \ - unix/unix.o \ - unix/whoami.o \ - unix/unix_info2.o # End MODULE TORTURE_UNIX ################################# +TORTURE_UNIX_OBJ_FILES = $(addprefix $(torturesrcdir)/unix/, unix.o whoami.o unix_info2.o) + +$(eval $(call proto_header_template,$(torturesrcdir)/unix/proto.h,$(TORTURE_UNIX_OBJ_FILES:.o=.c))) + ################################# # Start SUBSYSTEM TORTURE_LDAP [MODULE::TORTURE_LDAP] -SUBSYSTEM = torture +SUBSYSTEM = smbtorture INIT_FUNCTION = torture_ldap_init -PRIVATE_PROTO_HEADER = \ - ldap/proto.h -OBJ_FILES = \ - ldap/common.o \ - ldap/basic.o \ - ldap/schema.o \ - ldap/uptodatevector.o \ - ldap/cldap.o \ - ldap/cldapbench.o PRIVATE_DEPENDENCIES = \ LIBCLI_LDAP LIBCLI_CLDAP SAMDB POPT_CREDENTIALS # End SUBSYSTEM TORTURE_LDAP ################################# +TORTURE_LDAP_OBJ_FILES = $(addprefix $(torturesrcdir)/ldap/, common.o basic.o schema.o uptodatevector.o cldap.o cldapbench.o) + +$(eval $(call proto_header_template,$(torturesrcdir)/ldap/proto.h,$(TORTURE_LDAP_OBJ_FILES:.o=.c))) + ################################# # Start SUBSYSTEM TORTURE_NBT [MODULE::TORTURE_NBT] -SUBSYSTEM = torture +SUBSYSTEM = smbtorture INIT_FUNCTION = torture_nbt_init -PRIVATE_PROTO_HEADER = \ - nbt/proto.h -OBJ_FILES = \ - nbt/query.o \ - nbt/register.o \ - nbt/wins.o \ - nbt/winsbench.o \ - nbt/winsreplication.o \ - nbt/dgram.o \ - nbt/nbt.o PRIVATE_DEPENDENCIES = \ LIBCLI_SMB LIBCLI_NBT LIBCLI_DGRAM LIBCLI_WREPL torture_rpc # End SUBSYSTEM TORTURE_NBT ################################# +TORTURE_NBT_OBJ_FILES = $(addprefix $(torturesrcdir)/nbt/, query.o register.o \ + wins.o winsbench.o winsreplication.o dgram.o nbt.o) + +$(eval $(call proto_header_template,$(torturesrcdir)/nbt/proto.h,$(TORTURE_NBT_OBJ_FILES:.o=.c))) + ################################# # Start SUBSYSTEM TORTURE_NET [MODULE::TORTURE_NET] -SUBSYSTEM = torture +SUBSYSTEM = smbtorture INIT_FUNCTION = torture_net_init -PRIVATE_PROTO_HEADER = \ - libnet/proto.h -OBJ_FILES = \ - libnet/libnet.o \ - libnet/utils.o \ - libnet/userinfo.o \ - libnet/userman.o \ - libnet/groupinfo.o \ - libnet/groupman.o \ - libnet/domain.o \ - libnet/libnet_lookup.o \ - libnet/libnet_user.o \ - libnet/libnet_group.o \ - libnet/libnet_share.o \ - libnet/libnet_rpc.o \ - libnet/libnet_domain.o \ - libnet/libnet_BecomeDC.o PRIVATE_DEPENDENCIES = \ LIBSAMBA-NET \ POPT_CREDENTIALS \ @@ -301,12 +216,17 @@ PRIVATE_DEPENDENCIES = \ # End SUBSYSTEM TORTURE_NET ################################# +TORTURE_NET_OBJ_FILES = $(addprefix $(torturesrcdir)/libnet/, libnet.o \ + utils.o userinfo.o userman.o groupinfo.o groupman.o \ + domain.o libnet_lookup.o libnet_user.o libnet_group.o \ + libnet_share.o libnet_rpc.o libnet_domain.o libnet_BecomeDC.o) + +$(eval $(call proto_header_template,$(torturesrcdir)/libnet/proto.h,$(TORTURE_NET_OBJ_FILES:.o=.c))) + ################################# # Start BINARY smbtorture [BINARY::smbtorture] INSTALLDIR = BINDIR -OBJ_FILES = \ - smbtorture.o PRIVATE_DEPENDENCIES = \ torture \ LIBPOPT \ @@ -318,14 +238,15 @@ PRIVATE_DEPENDENCIES = \ # End BINARY smbtorture ################################# -MANPAGES += torture/man/smbtorture.1 +smbtorture_OBJ_FILES = $(torturesrcdir)/smbtorture.o $(torturesrcdir)/torture.o + +PUBLIC_HEADERS += $(torturesrcdir)/smbtorture.h +MANPAGES += $(torturesrcdir)/man/smbtorture.1 ################################# # Start BINARY gentest [BINARY::gentest] INSTALLDIR = BINDIR -OBJ_FILES = \ - gentest.o PRIVATE_DEPENDENCIES = \ LIBSAMBA-HOSTCONFIG \ LIBSAMBA-UTIL \ @@ -337,14 +258,31 @@ PRIVATE_DEPENDENCIES = \ # End BINARY gentest ################################# -MANPAGES += torture/man/gentest.1 +gentest_OBJ_FILES = $(torturesrcdir)/gentest.o + +MANPAGES += $(torturesrcdir)/man/gentest.1 + +################################# +# Start BINARY gentest_smb2 +[BINARY::gentest_smb2] +INSTALLDIR = BINDIR +PRIVATE_DEPENDENCIES = \ + LIBSAMBA-HOSTCONFIG \ + LIBSAMBA-UTIL \ + LIBPOPT \ + POPT_SAMBA \ + POPT_CREDENTIALS \ + LIBCLI_SMB \ + LIBCLI_RAW +# End BINARY gentest_smb2 +################################# + +gentest_smb2_OBJ_FILES = $(torturesrcdir)/gentest_smb2.o ################################# # Start BINARY masktest [BINARY::masktest] INSTALLDIR = BINDIR -OBJ_FILES = \ - masktest.o PRIVATE_DEPENDENCIES = \ LIBSAMBA-HOSTCONFIG \ LIBSAMBA-UTIL \ @@ -355,14 +293,14 @@ PRIVATE_DEPENDENCIES = \ # End BINARY masktest ################################# -MANPAGES += torture/man/masktest.1 +masktest_OBJ_FILES = $(torturesrcdir)/masktest.o + +MANPAGES += $(torturesrcdir)/man/masktest.1 ################################# # Start BINARY locktest [BINARY::locktest] INSTALLDIR = BINDIR -OBJ_FILES = \ - locktest.o PRIVATE_DEPENDENCIES = \ LIBPOPT \ POPT_SAMBA \ @@ -373,34 +311,44 @@ PRIVATE_DEPENDENCIES = \ # End BINARY locktest ################################# -MANPAGES += torture/man/locktest.1 +locktest_OBJ_FILES = $(torturesrcdir)/locktest.o -COV_TARGET = test +MANPAGES += $(torturesrcdir)/man/locktest.1 + +GCOV=0 + +ifeq ($(MAKECMDGOALS),gcov) +GCOV=1 +endif + +ifeq ($(MAKECMDGOALS),lcov) +GCOV=1 +endif -COV_VARS = \ - CFLAGS="$(CFLAGS) --coverage" \ - LDFLAGS="$(LDFLAGS) --coverage" +ifeq ($(MAKECMDGOALS),testcov-html) +GCOV=1 +endif -test_cov: - -$(MAKE) $(COV_TARGET) $(COV_VARS) +ifeq ($(GCOV),1) +CFLAGS += --coverage +LDFLAGS += --coverage +endif -gcov: test_cov +COV_TARGET = test + +gcov: test for I in $(sort $(dir $(ALL_OBJS))); \ do $(GCOV) -p -o $$I $$I/*.c; \ done -lcov-split: - rm -f samba.info - @$(MAKE) $(COV_TARGET) $(COV_VARS) \ - TEST_OPTIONS="--analyse-cmd=\"lcov --base-directory `pwd` --directory . --capture --output-file samba.info -t\"" - -rm heimdal/lib/*/{lex,parse}.{gcda,gcno} - -rm lib/policy/*/{lex,parse}.{gcda,gcno} - genhtml -o coverage samba.info - -lcov: test_cov +samba.info: test -rm heimdal/lib/*/{lex,parse}.{gcda,gcno} - -rm lib/policy/*/{lex,parse}.{gcda,gcno} lcov --base-directory `pwd` --directory . --capture --output-file samba.info - genhtml -o coverage samba.info + +lcov: samba.info + genhtml -o coverage $< testcov-html:: lcov + +clean:: + @rm -f samba.info |