Skip to content

Commit

Permalink
Improve coverage make system
Browse files Browse the repository at this point in the history
  • Loading branch information
ckormanyos committed May 29, 2022
1 parent 1e75a55 commit a4f087c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
27 changes: 24 additions & 3 deletions .gcov/make/make_gcov_03_flags.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
# ------------------------------------------------------------------------------

BOOST_ROOT_FOR_GCOV = /mnt/c/boost/boost_1_78_0
CC = g++-10
CC = g++
STD = c++11
ALL_COV = 0

ifneq ($(MY_BOOST_ROOT),)
BOOST_ROOT_FOR_GCOV := $(MY_BOOST_ROOT)
Expand All @@ -21,6 +22,14 @@ ifneq ($(MY_STD),)
STD := $(MY_STD)
endif

ifneq ($(MY_STD),)
STD := $(MY_STD)
endif

ifneq ($(MY_ALL_COV),)
ALL_COV := $(MY_ALL_COV)
endif

CXXFLAGS = -march=native \
-mtune=native \
-O2 \
Expand All @@ -43,10 +52,22 @@ C_INCLUDES = $(PATH_SRC) \
C_DEFINES :=$(addprefix -D,$(C_DEFINES))
C_INCLUDES :=$(addprefix -I,$(C_INCLUDES))

GCOV_FLAGS = -abcfu --object-directory obj
GCOV_FLAGS = --object-directory obj \
--all-blocks \
--function-summaries \
--demangled-names

ifneq ($(ALL_COV),0)
GCOV_FLAGS := $(GCOV_FLAGS) \
--branch-counts \
--branch-probabilities
endif

#LCOV_BRANCH = --rc lcov_branch_coverage=1
LCOV_BRANCH =

ifneq ($(ALL_COV),0)
LCOV_BRANCH := --rc lcov_branch_coverage=1
endif

LCOV_REMOVES = '/usr/*' \
'*boost/*'
8 changes: 4 additions & 4 deletions .github/workflows/wide_decimal_codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ jobs:
grep BOOST_VERSION ../boost-root/boost/version.hpp
cd .gcov/make
echo "build and run gcov/lcov/genhtml"
echo "make prepare -f make_gcov_01_generic.gmk MY_BOOST_ROOT=../../../boost-root MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }}"
echo "make prepare -f make_gcov_01_generic.gmk MY_ALL_COV=0 MY_BOOST_ROOT=../../../boost-root MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }}"
echo
make prepare -f make_gcov_01_generic.gmk MY_BOOST_ROOT=../../../boost-root MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }}
make prepare -f make_gcov_01_generic.gmk MY_ALL_COV=0 MY_BOOST_ROOT=../../../boost-root MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }}
echo
echo "make gcov -f make_gcov_01_generic.gmk --jobs=8 MY_BOOST_ROOT=../../../boost-root MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }}"
echo "make gcov -f make_gcov_01_generic.gmk --jobs=8 MY_ALL_COV=0 MY_BOOST_ROOT=../../../boost-root MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }}"
echo
make gcov -f make_gcov_01_generic.gmk --jobs=8 MY_BOOST_ROOT=../../../boost-root MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }}
make gcov -f make_gcov_01_generic.gmk --jobs=8 MY_ALL_COV=0 MY_BOOST_ROOT=../../../boost-root MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }}
echo
echo "return to wide-decimal root directory"
cd ../..
Expand Down
5 changes: 3 additions & 2 deletions test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
// make tidy -f make_tidy_01_generic.gmk --jobs=8 MY_BOOST_ROOT=/mnt/c/boost/boost_1_79_0

// cd .gcov/make
// make prepare -f make_gcov_01_generic.gmk MY_BOOST_ROOT=/mnt/c/boost/boost_1_79_0
// make gcov -f make_gcov_01_generic.gmk --jobs=8 MY_BOOST_ROOT=/mnt/c/boost/boost_1_79_0
// make clean -f make_gcov_01_generic.gmk MY_CC=g++ MY_ALL_COV=0 MY_BOOST_ROOT=/mnt/c/boost/boost_1_79_0
// make prepare -f make_gcov_01_generic.gmk MY_CC=g++ MY_ALL_COV=0 MY_BOOST_ROOT=/mnt/c/boost/boost_1_79_0
// make gcov -f make_gcov_01_generic.gmk --jobs=8 MY_CC=g++ MY_ALL_COV=0 MY_BOOST_ROOT=/mnt/c/boost/boost_1_79_0

// cd /mnt/c/Users/User/Documents/Ks/PC_Software/NumericalPrograms/ExtendedNumberTypes/wide_decimal
// PATH=/home/chris/local/coverity/cov-analysis-linux64-2021.12.1/bin:$PATH
Expand Down

0 comments on commit a4f087c

Please sign in to comment.