Move subunit infrastructure code into lib/torture.
[kai/samba-autobuild/.git] / source4 / torture / config.mk
index dc2b1c5c5e2bef49edec08c5007a6cecb5915ae4..40f6bbf1ed5f6577afcbe3e3883196e3e604453b 100644 (file)
@@ -1,25 +1,8 @@
-# TORTURE subsystem
-[LIBRARY::torture]
-SO_VERSION = 0
-VERSION = 0.0.1
-PC_FILE = torture.pc
-PRIVATE_PROTO_HEADER = proto.h
-PUBLIC_DEPENDENCIES = \
-               LIBSAMBA-HOSTCONFIG \
-               LIBSAMBA-UTIL \
-               LIBTALLOC \
-               LIBPOPT
-
-
-torture_OBJ_FILES = $(addprefix torture/, torture.o ui.o)
-
-PUBLIC_HEADERS += torture/torture.h torture/ui.h
-
 [SUBSYSTEM::TORTURE_UTIL]
 PRIVATE_DEPENDENCIES = LIBCLI_RAW LIBPYTHON smbcalls PROVISION
 PUBLIC_DEPENDENCIES = POPT_CREDENTIALS
 
-TORTURE_UTIL_OBJ_FILES = torture/util_smb.o
+TORTURE_UTIL_OBJ_FILES = $(addprefix torture/, util_smb.o)
 
 #################################
 # Start SUBSYSTEM TORTURE_BASIC
@@ -89,6 +72,7 @@ TORTURE_RAW_OBJ_FILES = $(addprefix torture/raw/, \
                lock.o \
                pingpong.o \
                lockbench.o \
+               lookuprate.o \
                openbench.o \
                rename.o \
                eas.o \
@@ -257,8 +241,9 @@ PRIVATE_DEPENDENCIES = \
 # End BINARY smbtorture
 #################################
 
-smbtorture_OBJ_FILES = torture/smbtorture.o
+smbtorture_OBJ_FILES = torture/smbtorture.o torture/torture.o 
 
+PUBLIC_HEADERS += torture/smbtorture.h
 MANPAGES += torture/man/smbtorture.1
 
 #################################
@@ -316,31 +301,34 @@ locktest_OBJ_FILES = torture/locktest.o
 
 MANPAGES += torture/man/locktest.1
 
-COV_TARGET = test
+GCOV=0
 
-COV_VARS = \
-       CFLAGS="$(CFLAGS) --coverage" \
-       LDFLAGS="$(LDFLAGS) --coverage"
+ifeq ($(MAKECMDGOALS),gcov)
+GCOV=1
+endif
 
-test_cov:
-       -$(MAKE) $(COV_TARGET) $(COV_VARS)
+ifeq ($(MAKECMDGOALS),lcov)
+GCOV=1
+endif
 
-gcov: test_cov
+ifeq ($(MAKECMDGOALS),testcov-html)
+GCOV=1
+endif
+
+ifeq ($(GCOV),1)
+CFLAGS += --coverage
+LDFLAGS += --coverage
+endif
+
+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
+lcov: 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