Commit 325bfcd1 authored by Andrei Pavel's avatar Andrei Pavel

Various changes to Makefile.am

report-cpp-coverage wasn't working because of a syntax error
Added coverage target to .NOTPARALLEL to run unit tests and only then build reports.
Fixed cppcheck.
parent 039622a4
...@@ -57,6 +57,16 @@ clean-cpp-coverage: ...@@ -57,6 +57,16 @@ clean-cpp-coverage:
perform-coverage: check perform-coverage: check
report-cpp-coverage: report-cpp-coverage:
if HAVE_BOTAN
BOTAN_PATH=botan/\*
else
BOTAN_PATH=
endif
if HAVE_OPENSSL
OPENSSL_PATH=openssl/\*
else
OPENSSL_PATH=
endif
@if [ $(USE_LCOV) = yes ] ; then \ @if [ $(USE_LCOV) = yes ] ; then \
$(LCOV) --capture --directory . --output-file all.info ; \ $(LCOV) --capture --directory . --output-file all.info ; \
$(LCOV) --remove all.info \ $(LCOV) --remove all.info \
...@@ -66,20 +76,16 @@ report-cpp-coverage: ...@@ -66,20 +76,16 @@ report-cpp-coverage:
c++/4.4\*/ext/\* \ c++/4.4\*/ext/\* \
c++/4.4\*/\*-\*/bits/\* \ c++/4.4\*/\*-\*/bits/\* \
boost/\* \ boost/\* \
if HAVE_BOTAN
botan/\* \
endif
ext/coroutine/\* \ ext/coroutine/\* \
gtest/\* \ gtest/\* \
include/\* \ include/\* \
log4cplus/\* \ log4cplus/\* \
if HAVE_OPENSSL
openssl/\* \
endif
unittests/\* \ unittests/\* \
\*_unittests.cc \ \*_unittests.cc \
\*_unittest.cc \ \*_unittest.cc \
\*_unittests.h \ \*_unittests.h \
$(BOTAN_PATH) \
$(OPENSSL_PATH) \
--output report.info ; \ --output report.info ; \
sed -e "s|$(abs_top_srcdir)|$(abs_top_builddir)|g" < report.info > report.info.2 ; \ sed -e "s|$(abs_top_srcdir)|$(abs_top_builddir)|g" < report.info > report.info.2 ; \
$(GENHTML) --legend -o $(abs_top_builddir)/coverage-cpp-html report.info.2 ; \ $(GENHTML) --legend -o $(abs_top_builddir)/coverage-cpp-html report.info.2 ; \
...@@ -90,6 +96,8 @@ endif ...@@ -90,6 +96,8 @@ endif
fi fi
# for c++ test coverage # for c++ test coverage
.NOTPARALLEL: coverage
coverage: clean-coverage perform-coverage report-coverage coverage: clean-coverage perform-coverage report-coverage
clean-coverage: clean-cpp-coverage clean-coverage: clean-cpp-coverage
...@@ -98,8 +106,8 @@ report-coverage: report-cpp-coverage ...@@ -98,8 +106,8 @@ report-coverage: report-cpp-coverage
# for static C++ check using cppcheck (when available) # for static C++ check using cppcheck (when available)
cppcheck: cppcheck:
cppcheck -I./src/lib -I./src/bin --enable=all --suppressions \ cppcheck -I./src/lib -I./src/bin --enable=all \
src/cppcheck-suppress.lst --inline-suppr \ --suppressions-list=src/cppcheck-suppress.lst --inline-suppr \
--quiet --error-exitcode=1 \ --quiet --error-exitcode=1 \
--template '{file}:{line}: check_fail: {message} ({severity},{id})' \ --template '{file}:{line}: check_fail: {message} ({severity},{id})' \
src src
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment