diff options
Diffstat (limited to 'tests/Makefile')
-rw-r--r-- | tests/Makefile | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/Makefile b/tests/Makefile index e36198b..94789f9 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,16 +1,16 @@ CXXFLAGS=-g -O0 +include ../common.mk + ifeq ($(CXX),clang++-14) CXXFLAGS+=-fprofile-instr-generate -fcoverage-mapping +LDFLAGS+=-fprofile-instr-generate -fcoverage-mapping else # GCC CXXFLAGS+=--coverage +LDFLAGS+=--coverage endif -include ../common.mk - -LDFLAGS+=-fprofile-instr-generate -fcoverage-mapping - UNITS=storage.cpp config.cpp file.cpp compiledsql.cpp qrcode.cpp whiteboard.cpp UNITTESTS=test-config.cpp \ @@ -29,6 +29,10 @@ ifeq ($(CXX),clang++-14) 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 +else + ./unittests + #gcov-12 storage.o + gcovr -r .. endif coverage: @@ -65,4 +69,4 @@ libgmock.a: ar -rv libgmock.a gmock-all.o gtest-all.o gmock_main.o clean: - -rm -f *.o *.a unittests *.gcno *.profraw *.profdata + -rm -f *.o *.a unittests *.gcda *.gcno *.profraw *.profdata *.gcov |