# HG changeset patch # User Mike Becker # Date 1735482260 -3600 # Node ID f3b04cd607760e51e02122b2c84c5fd75885f588 # Parent e453e717876e9cdf99fc7f16fd80102ed6c422b2 change coverage tool from gcov to gcovr diff -r e453e717876e -r f3b04cd60776 configure --- a/configure Sat Dec 28 17:32:36 2024 +0100 +++ b/configure Sun Dec 29 15:24:20 2024 +0100 @@ -156,7 +156,7 @@ # custom variables if true \ ; then - src_dir=`pwd` + root_dir=`pwd` DOXYGEN=`command -v doxygen` PANDOC=`command -v pandoc` fi @@ -310,6 +310,11 @@ if notistoolchain "gcc"; then break fi + if command -v gcovr > /dev/null ; then + : + else + break + fi TEMP_CFLAGS="$TEMP_CFLAGS \${COVERAGE_CFLAGS}" TEMP_LDFLAGS="$TEMP_LDFLAGS \${COVERAGE_LDFLAGS}" print_check_msg "$dep_checked_coverage" "yes\n" @@ -523,10 +528,10 @@ LIBVERSION_MAJOR=5 # build directory structure !! do not change or override !! -src_dir=${src_dir} -build_dir=${src_dir}/build -docs_dir=${src_dir}/build/docs -dist_dir=${src_dir}/dist +root_dir=${root_dir} +build_dir=${root_dir}/build +docs_dir=${root_dir}/build/docs +dist_dir=${root_dir}/dist __EOF__ break done diff -r e453e717876e -r f3b04cd60776 docs/Makefile --- a/docs/Makefile Sat Dec 28 17:32:36 2024 +0100 +++ b/docs/Makefile Sun Dec 29 15:24:20 2024 +0100 @@ -40,7 +40,7 @@ $(COPYALL) $< "$@/.." $(docs_dir)/web/api: FORCE - cd $(src_dir); $(DOXYGEN) + cd $(root_dir); $(DOXYGEN) $(docs_dir)/web: $(MKDIR) $@ diff -r e453e717876e -r f3b04cd60776 make/project.xml --- a/make/project.xml Sat Dec 28 17:32:36 2024 +0100 +++ b/make/project.xml Sun Dec 29 15:24:20 2024 +0100 @@ -1,7 +1,7 @@ - pwd + pwd command -v doxygen command -v pandoc @@ -14,10 +14,10 @@ LIBVERSION_MAJOR=5 # build directory structure !! do not change or override !! - src_dir=${src_dir} - build_dir=${src_dir}/build - docs_dir=${src_dir}/build/docs - dist_dir=${src_dir}/dist + root_dir=${root_dir} + build_dir=${root_dir}/build + docs_dir=${root_dir}/build/docs + dist_dir=${root_dir}/dist @@ -83,6 +83,7 @@ \${COVERAGE_CFLAGS} \${COVERAGE_LDFLAGS} + command -v gcovr diff -r e453e717876e -r f3b04cd60776 src/Makefile --- a/src/Makefile Sat Dec 28 17:32:36 2024 +0100 +++ b/src/Makefile Sun Dec 29 15:24:20 2024 +0100 @@ -29,23 +29,19 @@ OBJ_EXT=.o OBJ=$(SRC:%.c=$(build_dir)/%$(OBJ_EXT)) -GCOV=$(SRC:%.c=%.c.gcov) static: $(build_dir)/libucx_static$(STLIB_EXT) shared: $(build_dir)/libucx$(SHLIB_EXT) -check-coverage: $(GCOV) - mv *.gcov "$(build_dir)" +check-coverage: $(SRC:%.c=$(build_dir)/%.gcda) + gcovr --html-details $(build_dir)/coverage.html \ + --object-directory $(build_dir) \ + --root $(root_dir)/src \ + --exclude-directories $(build_dir)/tests \ + $(build_dir) -%.c.gcov: %.c $(build_dir)/%.gcno - @tabs 22 - @gcov -Ho "$(build_dir)" $< | grep -A1 'File' | grep -v '\--' \ - | sed 's/File / /' | sed 's/Lines executed:/\t/' | tr -d '\n'"'" \ - | sed -E 's/(of [0-9]+)/\1\n/g' - @tabs -8 - -$(build_dir)/%.gcno: +$(build_dir)/%.gcda: test -f "$@" $(build_dir)/libucx_static$(STLIB_EXT): $(OBJ) @@ -60,7 +56,7 @@ $(RMFILE) $(libdir)/libucx$(SHLIB_EXT) $(COPYFILE) $(build_dir)/libucx_static$(STLIB_EXT) $(libdir)/libucx_static$(STLIB_EXT) $(COPYFILE) $(build_dir)/libucx$(SHLIB_EXT) $(libdir)/libucx$(SHLIB_EXT).$(LIBVERSION) - $(COPYALL) $(src_dir)/src/cx $(includedir) + $(COPYALL) $(root_dir)/src/cx $(includedir) $(SYMLINK) $(libdir)/libucx$(SHLIB_EXT).$(LIBVERSION) $(libdir)/libucx$(SHLIB_EXT).$(LIBVERSION_MAJOR) $(SYMLINK) $(libdir)/libucx$(SHLIB_EXT).$(LIBVERSION_MAJOR) $(libdir)/libucx$(SHLIB_EXT)