mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-19 14:04:17 +03:00
tweak lcov configuration/makefiles
This commit is contained in:
parent
c454025a0f
commit
5556819ac8
41
Makefile.in
41
Makefile.in
@ -39,6 +39,7 @@ ifeq ($(MAKECMDGOALS),distclean)
|
|||||||
test \
|
test \
|
||||||
po
|
po
|
||||||
DISTCLEAN_TARGETS += lib/misc/configure.h
|
DISTCLEAN_TARGETS += lib/misc/configure.h
|
||||||
|
DISTCLEAN_DIRS += lcov_reports*
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include make.tmpl
|
include make.tmpl
|
||||||
@ -73,34 +74,34 @@ check: all
|
|||||||
$(MAKE) -C test all
|
$(MAKE) -C test all
|
||||||
|
|
||||||
ifneq ("@LCOV@", "")
|
ifneq ("@LCOV@", "")
|
||||||
|
.PHONY: lcov-reset lcov lcov-dated
|
||||||
|
|
||||||
CLEAN_DIRTARGETS += $(top_srcdir)/covhtml*
|
ifeq ($(MAKECMDGOALS),lcov-dated)
|
||||||
CLEAN_TARGETS += $(shell find $(top_srcdir) -name '*.gcda' -o -name '*.gcno')
|
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)/dmeventd --zerocounters
|
||||||
$(LCOV) -d $(top_srcdir)/lib --zerocounters
|
$(LCOV) -d $(top_srcdir)/lib --zerocounters
|
||||||
$(LCOV) -d $(top_srcdir)/tools --zerocounters
|
$(LCOV) -d $(top_srcdir)/tools --zerocounters
|
||||||
|
|
||||||
_cov-common:
|
lcov: all
|
||||||
$(RM) -rf $(_INTERNAL_COVDIR)
|
$(RM) -rf $(LCOV_REPORTS_DIR)
|
||||||
$(MKDIR_P) $(_INTERNAL_COVDIR)
|
$(MKDIR_P) $(LCOV_REPORTS_DIR)
|
||||||
$(LCOV) -b $(top_srcdir)/lib -d $(top_srcdir)/lib -c -o $(_INTERNAL_COVDIR)/lib.info
|
$(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 $(_INTERNAL_COVDIR)/tools.info
|
$(LCOV) -b $(top_srcdir)/tools -d $(top_srcdir)/tools -c -o $(LCOV_REPORTS_DIR)/tools.info
|
||||||
DMEVENTDINFO="$(_INTERNAL_COVDIR)/dmeventd.info" ;\
|
DMEVENTD_INFO="$(LCOV_REPORTS_DIR)/dmeventd.info" ;\
|
||||||
ADMEVENTDINFO="-a $$DMEVENTDINFO" ;\
|
DMEVENTD_INFO_A="-a $$DMEVENTDINFO" ;\
|
||||||
$(LCOV) -b $(top_srcdir)/dmeventd -d $(top_srcdir)/dmeventd -c -o $$DMEVENTDINFO || ADMEVENTDINFO="" ;\
|
$(LCOV) -b $(top_srcdir)/dmeventd -d $(top_srcdir)/dmeventd -c -o $$DMEVENTD_INFO || DMEVENTD_INFO_A="" ;\
|
||||||
$(LCOV) $$ADMEVENTDINFO -a $(_INTERNAL_COVDIR)/lib.info \
|
$(LCOV) $$DMEVENTD_INFO_A -a $(LCOV_REPORTS_DIR)/lib.info \
|
||||||
-a $(_INTERNAL_COVDIR)/tools.info \
|
-a $(LCOV_REPORTS_DIR)/tools.info \
|
||||||
-o $(_INTERNAL_COVDIR)/lvm.info
|
-o $(LCOV_REPORTS_DIR)/lvm.info
|
||||||
ifneq ("@GENHTML@", "")
|
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
|
endif
|
||||||
|
|
||||||
cov: _INTERNAL_COVDIR=$(top_srcdir)/covhtml
|
lcov-dated: lcov
|
||||||
cov: _cov-common
|
|
||||||
|
|
||||||
covd: _INTERNAL_COVDIR=$(top_srcdir)/covhtml-$(shell date +%F-%k-%M-%S)
|
|
||||||
covd: _cov-common
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
Version 2.02.39 -
|
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.
|
Fix up cache for PVs without mdas after consistent VG metadata is processed.
|
||||||
Update validation of safe mirror log type conversions in lvconvert.
|
Update validation of safe mirror log type conversions in lvconvert.
|
||||||
Fix lvconvert to disallow snapshot and mirror combinations.
|
Fix lvconvert to disallow snapshot and mirror combinations.
|
||||||
|
13
configure.in
13
configure.in
@ -70,8 +70,8 @@ AC_PROG_GCC_TRADITIONAL
|
|||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
AC_PROG_LN_S
|
AC_PROG_LN_S
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
AC_PROG_RANLIB
|
|
||||||
AC_PROG_MKDIR_P
|
AC_PROG_MKDIR_P
|
||||||
|
AC_PROG_RANLIB
|
||||||
AC_PATH_PROG(CFLOW_CMD, cflow)
|
AC_PATH_PROG(CFLOW_CMD, cflow)
|
||||||
AC_PATH_PROG(CSCOPE_CMD, cscope)
|
AC_PATH_PROG(CSCOPE_CMD, cscope)
|
||||||
|
|
||||||
@ -325,12 +325,17 @@ AC_MSG_RESULT($COPTIMISE_FLAG)
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
dnl -- Enable profiling
|
dnl -- Enable profiling
|
||||||
|
AC_MSG_CHECKING(whether to gather gcov profiling data)
|
||||||
AC_ARG_ENABLE(profiling,
|
AC_ARG_ENABLE(profiling,
|
||||||
AC_HELP_STRING(--enable-profiling, [compile with gcov profiling flags]),
|
AC_HELP_STRING(--enable-profiling, [Gather gcov profiling data]),
|
||||||
[], enable_profiling=no)
|
PROFILING=$enableval, PROFILING=no)
|
||||||
test "$enable_profiling" = yes && COPTIMISE_FLAG="$COPTIMISE_FLAG -fprofile-arcs -ftest-coverage"
|
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(LCOV, lcov)
|
||||||
AC_PATH_PROG(GENHTML, genhtml)
|
AC_PATH_PROG(GENHTML, genhtml)
|
||||||
|
fi
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
dnl -- Disable devmapper
|
dnl -- Disable devmapper
|
||||||
|
16
make.tmpl.in
16
make.tmpl.in
@ -21,7 +21,10 @@ CC = @CC@
|
|||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
MSGFMT = @MSGFMT@
|
MSGFMT = @MSGFMT@
|
||||||
|
LCOV = @LCOV@
|
||||||
|
GENHTML = @GENHTML@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
DEFS += @DEFS@
|
DEFS += @DEFS@
|
||||||
@ -30,9 +33,6 @@ CLDFLAGS += @CLDFLAGS@
|
|||||||
LDDEPS += @LDDEPS@
|
LDDEPS += @LDDEPS@
|
||||||
LDFLAGS += @LDFLAGS@
|
LDFLAGS += @LDFLAGS@
|
||||||
LIB_SUFFIX = @LIB_SUFFIX@
|
LIB_SUFFIX = @LIB_SUFFIX@
|
||||||
MKDIR_P = @MKDIR_P@
|
|
||||||
LCOV = @LCOV@
|
|
||||||
GENHTML = @GENHTML@
|
|
||||||
|
|
||||||
# Setup directory variables
|
# Setup directory variables
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
@ -206,12 +206,16 @@ $(LIB_STATIC): $(OBJECTS)
|
|||||||
$(MSGFMT) -o $@ $<
|
$(MSGFMT) -o $@ $<
|
||||||
|
|
||||||
clean: $(SUBDIRS.clean)
|
clean: $(SUBDIRS.clean)
|
||||||
$(RM) -rf $(CLEAN_DIRTARGETS)
|
|
||||||
$(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(SOURCES:%.c=%.d) \
|
$(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) \
|
$(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 \
|
config.cache config.log config.status \
|
||||||
Makefile make.tmpl core \
|
Makefile make.tmpl core \
|
||||||
version.h lvm2.po
|
version.h lvm2.po
|
||||||
|
@ -74,6 +74,8 @@ lvm-wrapper: Makefile
|
|||||||
clean:
|
clean:
|
||||||
rm -rf init.sh lvm-wrapper bin .bin-dir-stamp
|
rm -rf init.sh lvm-wrapper bin .bin-dir-stamp
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
|
||||||
all: $(T)
|
all: $(T)
|
||||||
.PHONY: $(T) clean
|
.PHONY: $(T) clean distclean
|
||||||
.NOTPARALLEL:
|
.NOTPARALLEL:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user