mirror of
https://github.com/USCiLab/cereal.git
synced 2025-10-18 01:45:52 +02:00
Working on coverage
This commit is contained in:
8
Makefile
8
Makefile
@@ -1,5 +1,6 @@
|
||||
CPPFLAGS=-std=c++11 -I./include -Wall -Werror -g
|
||||
CC=g++
|
||||
COVERAGE_OUTPUT=out
|
||||
|
||||
all: unittests sandbox performance sandbox_rtti sandbox_json
|
||||
|
||||
@@ -21,10 +22,11 @@ performance: performance.cpp
|
||||
|
||||
.PHONY: coverage
|
||||
coverage:
|
||||
g++ -std=c++11 -I./include -Wall -Werror -g -O0 -coverage unittests.cpp -o unittests -lboost_unit_test_framework
|
||||
g++ -std=c++11 -I./include -Wall -Werror -g -O0 -coverage unittests.cpp -o unittests_coverage -lboost_unit_test_framework
|
||||
./unittests_coverage --show_progress
|
||||
lcov --capture --directory . --output-file coverage.info --no-external
|
||||
lcov --remove coverage.info '*/external/*' -o coverage.info
|
||||
genhtml coverage.info --output-directory out
|
||||
lcov --remove coverage.info '*/external/*' 'cereal/details/util.hpp' -o coverage.info
|
||||
genhtml coverage.info --output-directory ${COVERAGE_OUTPUT}
|
||||
|
||||
.PHONY: doc
|
||||
doc:
|
||||
|
||||
@@ -2662,3 +2662,10 @@ BOOST_AUTO_TEST_CASE( json_polymorphic )
|
||||
{
|
||||
test_polymorphic<cereal::JSONInputArchive, cereal::JSONOutputArchive>();
|
||||
}
|
||||
|
||||
namespace mynamespace { struct MyCustomClass {}; }
|
||||
|
||||
BOOST_AUTO_TEST_CASE( util )
|
||||
{
|
||||
BOOST_CHECK_EQUAL( cereal::util::demangledName<mynamespace::MyCustomClass>(), "mynamespace::MyCustomClass" );
|
||||
}
|
||||
|
||||
@@ -3,14 +3,21 @@
|
||||
# Updates the doxygen documentation, and copies it into the appropriate place
|
||||
# in the gh-pages branch.
|
||||
|
||||
make doc
|
||||
set -e
|
||||
|
||||
tempdir=`mktemp -d`
|
||||
|
||||
make coverage COVERAGE_OUTPUT=${tempdir}/coverage
|
||||
|
||||
make doc
|
||||
|
||||
cp -r ./doc/html/ ${tempdir}
|
||||
|
||||
git checkout gh-pages
|
||||
|
||||
cp -r ${tempdir}/coverage* assets/coverage/
|
||||
|
||||
cp -r ${tempdir}/html/* assets/doxygen/
|
||||
|
||||
|
||||
rm -rf ${tempdir}
|
||||
|
||||
Reference in New Issue
Block a user