1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

tweak lcov configuration/makefiles

This commit is contained in:
Alasdair Kergon 2008-06-27 19:24:17 +00:00
parent c454025a0f
commit 5556819ac8
6 changed files with 2544 additions and 3080 deletions

View File

@ -39,6 +39,7 @@ ifeq ($(MAKECMDGOALS),distclean)
test \
po
DISTCLEAN_TARGETS += lib/misc/configure.h
DISTCLEAN_DIRS += lcov_reports*
endif
include make.tmpl
@ -73,34 +74,34 @@ check: all
$(MAKE) -C test all
ifneq ("@LCOV@", "")
.PHONY: lcov-reset lcov lcov-dated
CLEAN_DIRTARGETS += $(top_srcdir)/covhtml*
CLEAN_TARGETS += $(shell find $(top_srcdir) -name '*.gcda' -o -name '*.gcno')
ifeq ($(MAKECMDGOALS),lcov-dated)
LCOV_REPORTS_DIR=$(top_srcdir)/lcov_reports-$(shell date +%Y%m%d%k%M%S)
else
LCOV_REPORTS_DIR=$(top_srcdir)/lcov_reports
endif
cov-reset:
lcov-reset:
$(LCOV) -d $(top_srcdir)/dmeventd --zerocounters
$(LCOV) -d $(top_srcdir)/lib --zerocounters
$(LCOV) -d $(top_srcdir)/tools --zerocounters
_cov-common:
$(RM) -rf $(_INTERNAL_COVDIR)
$(MKDIR_P) $(_INTERNAL_COVDIR)
$(LCOV) -b $(top_srcdir)/lib -d $(top_srcdir)/lib -c -o $(_INTERNAL_COVDIR)/lib.info
$(LCOV) -b $(top_srcdir)/tools -d $(top_srcdir)/tools -c -o $(_INTERNAL_COVDIR)/tools.info
DMEVENTDINFO="$(_INTERNAL_COVDIR)/dmeventd.info" ;\
ADMEVENTDINFO="-a $$DMEVENTDINFO" ;\
$(LCOV) -b $(top_srcdir)/dmeventd -d $(top_srcdir)/dmeventd -c -o $$DMEVENTDINFO || ADMEVENTDINFO="" ;\
$(LCOV) $$ADMEVENTDINFO -a $(_INTERNAL_COVDIR)/lib.info \
-a $(_INTERNAL_COVDIR)/tools.info \
-o $(_INTERNAL_COVDIR)/lvm.info
lcov: all
$(RM) -rf $(LCOV_REPORTS_DIR)
$(MKDIR_P) $(LCOV_REPORTS_DIR)
$(LCOV) -b $(top_srcdir)/lib -d $(top_srcdir)/lib -c -o $(LCOV_REPORTS_DIR)/lib.info
$(LCOV) -b $(top_srcdir)/tools -d $(top_srcdir)/tools -c -o $(LCOV_REPORTS_DIR)/tools.info
DMEVENTD_INFO="$(LCOV_REPORTS_DIR)/dmeventd.info" ;\
DMEVENTD_INFO_A="-a $$DMEVENTDINFO" ;\
$(LCOV) -b $(top_srcdir)/dmeventd -d $(top_srcdir)/dmeventd -c -o $$DMEVENTD_INFO || DMEVENTD_INFO_A="" ;\
$(LCOV) $$DMEVENTD_INFO_A -a $(LCOV_REPORTS_DIR)/lib.info \
-a $(LCOV_REPORTS_DIR)/tools.info \
-o $(LCOV_REPORTS_DIR)/lvm.info
ifneq ("@GENHTML@", "")
$(GENHTML) -o $(_INTERNAL_COVDIR) -p $(top_srcdir) $(_INTERNAL_COVDIR)/lvm.info
$(GENHTML) -o $(LCOV_REPORTS_DIR) -p $(top_srcdir) $(LCOV_REPORTS_DIR)/lvm.info
endif
cov: _INTERNAL_COVDIR=$(top_srcdir)/covhtml
cov: _cov-common
covd: _INTERNAL_COVDIR=$(top_srcdir)/covhtml-$(shell date +%F-%k-%M-%S)
covd: _cov-common
lcov-dated: lcov
endif

View File

@ -1,6 +1,8 @@
Version 2.02.39 -
================================
Enhance configure.in and Makefiles to support coverage reports (tgts: cov, covd, cov-reset)
Update autoconf to 2008-01-16.
Add $DISTCLEAN_DIRS to make.tmpl.in.
Create coverage reports with --enable-profiling and make lcov or lcov-dated.
Fix up cache for PVs without mdas after consistent VG metadata is processed.
Update validation of safe mirror log type conversions in lvconvert.
Fix lvconvert to disallow snapshot and mirror combinations.

5542
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -70,8 +70,8 @@ AC_PROG_GCC_TRADITIONAL
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PROG_MKDIR_P
AC_PROG_RANLIB
AC_PATH_PROG(CFLOW_CMD, cflow)
AC_PATH_PROG(CSCOPE_CMD, cscope)
@ -325,12 +325,17 @@ AC_MSG_RESULT($COPTIMISE_FLAG)
################################################################################
dnl -- Enable profiling
AC_MSG_CHECKING(whether to gather gcov profiling data)
AC_ARG_ENABLE(profiling,
AC_HELP_STRING(--enable-profiling, [compile with gcov profiling flags]),
[], enable_profiling=no)
test "$enable_profiling" = yes && COPTIMISE_FLAG="$COPTIMISE_FLAG -fprofile-arcs -ftest-coverage"
AC_PATH_PROG(LCOV, lcov)
AC_PATH_PROG(GENHTML, genhtml)
AC_HELP_STRING(--enable-profiling, [Gather gcov profiling data]),
PROFILING=$enableval, PROFILING=no)
AC_MSG_RESULT($PROFILING)
if test "x$PROFILING" = xyes; then
COPTIMISE_FLAG="$COPTIMISE_FLAG -fprofile-arcs -ftest-coverage"
AC_PATH_PROG(LCOV, lcov)
AC_PATH_PROG(GENHTML, genhtml)
fi
################################################################################
dnl -- Disable devmapper

View File

@ -21,7 +21,10 @@ CC = @CC@
RANLIB = @RANLIB@
SHELL = /bin/sh
INSTALL = @INSTALL@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
LCOV = @LCOV@
GENHTML = @GENHTML@
LN_S = @LN_S@
LIBS = @LIBS@
DEFS += @DEFS@
@ -30,9 +33,6 @@ CLDFLAGS += @CLDFLAGS@
LDDEPS += @LDDEPS@
LDFLAGS += @LDFLAGS@
LIB_SUFFIX = @LIB_SUFFIX@
MKDIR_P = @MKDIR_P@
LCOV = @LCOV@
GENHTML = @GENHTML@
# Setup directory variables
prefix = @prefix@
@ -206,12 +206,16 @@ $(LIB_STATIC): $(OBJECTS)
$(MSGFMT) -o $@ $<
clean: $(SUBDIRS.clean)
$(RM) -rf $(CLEAN_DIRTARGETS)
$(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(SOURCES:%.c=%.d) \
$(SOURCES:%.c=%.pot) $(LDDEPS)
$(SOURCES:%.c=%.pot) $(SOURCES:%.c=%.gcno) \
$(SOURCES:%.c=%.gcda) $(LDDEPS)
distclean: clean $(SUBDIRS.distclean)
distclean: $(SUBDIRS.distclean)
$(RM) -rf $(DISTCLEAN_DIRS)
$(RM) $(DISTCLEAN_TARGETS) \
$(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(SOURCES:%.c=%.d) \
$(SOURCES:%.c=%.pot) $(SOURCES:%.c=%.gcno) \
$(SOURCES:%.c=%.gcda) $(LDDEPS) \
config.cache config.log config.status \
Makefile make.tmpl core \
version.h lvm2.po

View File

@ -74,6 +74,8 @@ lvm-wrapper: Makefile
clean:
rm -rf init.sh lvm-wrapper bin .bin-dir-stamp
distclean: clean
all: $(T)
.PHONY: $(T) clean
.PHONY: $(T) clean distclean
.NOTPARALLEL: