summaryrefslogtreecommitdiffhomepage
path: root/tests/Makefile
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-01-01 21:16:19 +0100
committerRoland Reichwein <mail@reichwein.it>2023-01-01 21:16:19 +0100
commita72cd70af957a06ae870d93314b4ed0f3625f6ee (patch)
tree9da93fc597d26ac3cec93a4518649871453a7f94 /tests/Makefile
parent6c339d8aab380a191fe3fce7ca7dc7c09e252ebd (diff)
Adjust to Debian 11 build
Diffstat (limited to 'tests/Makefile')
-rw-r--r--tests/Makefile10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 94789f9..4ade005 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -2,7 +2,7 @@ CXXFLAGS=-g -O0
include ../common.mk
-ifeq ($(CXX),clang++-14)
+ifeq ($(CXXTYPE),clang++)
CXXFLAGS+=-fprofile-instr-generate -fcoverage-mapping
LDFLAGS+=-fprofile-instr-generate -fcoverage-mapping
else
@@ -25,10 +25,10 @@ CXXFLAGS+=\
test: unittests
# https://clang.llvm.org/docs/SourceBasedCodeCoverage.html
-ifeq ($(CXX),clang++-14)
+ifeq ($(CXXTYPE),clang++)
LLVM_PROFILE_FILE="unittests.profraw" ./unittests
- llvm-profdata-14 merge -sparse unittests.profraw -o unittests.profdata
- llvm-cov-14 report --ignore-filename-regex='google' --ignore-filename-regex='test-' --show-region-summary=0 -instr-profile unittests.profdata unittests
+ $(LLVMPROFDATA) merge -sparse unittests.profraw -o unittests.profdata
+ $(LLVMCOV) report --ignore-filename-regex='google' --ignore-filename-regex='test-' --show-region-summary=0 -instr-profile unittests.profdata unittests
else
./unittests
#gcov-12 storage.o
@@ -36,7 +36,7 @@ else
endif
coverage:
- llvm-cov-14 show -instr-profile unittests.profdata $(UNITS:.cpp=.o)
+ $(LLVMCOV) show -instr-profile unittests.profdata $(UNITS:.cpp=.o)
unittests: libgmock.a $(UNITTESTS:.cpp=.o) $(UNITS:.cpp=.o)
$(CXX) $(LDFLAGS) $^ $(LDLIBS) $(LIBS) -o $@