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
|
CPPFLAGS=-std=c++11 -I./include -Wall -Werror -g
|
||||||
CC=g++
|
CC=g++
|
||||||
|
COVERAGE_OUTPUT=out
|
||||||
|
|
||||||
all: unittests sandbox performance sandbox_rtti sandbox_json
|
all: unittests sandbox performance sandbox_rtti sandbox_json
|
||||||
|
|
||||||
@@ -21,10 +22,11 @@ performance: performance.cpp
|
|||||||
|
|
||||||
.PHONY: coverage
|
.PHONY: coverage
|
||||||
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 --capture --directory . --output-file coverage.info --no-external
|
||||||
lcov --remove coverage.info '*/external/*' -o coverage.info
|
lcov --remove coverage.info '*/external/*' 'cereal/details/util.hpp' -o coverage.info
|
||||||
genhtml coverage.info --output-directory out
|
genhtml coverage.info --output-directory ${COVERAGE_OUTPUT}
|
||||||
|
|
||||||
.PHONY: doc
|
.PHONY: doc
|
||||||
doc:
|
doc:
|
||||||
|
|||||||
@@ -2662,3 +2662,10 @@ BOOST_AUTO_TEST_CASE( json_polymorphic )
|
|||||||
{
|
{
|
||||||
test_polymorphic<cereal::JSONInputArchive, cereal::JSONOutputArchive>();
|
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
|
# Updates the doxygen documentation, and copies it into the appropriate place
|
||||||
# in the gh-pages branch.
|
# in the gh-pages branch.
|
||||||
|
|
||||||
make doc
|
set -e
|
||||||
|
|
||||||
tempdir=`mktemp -d`
|
tempdir=`mktemp -d`
|
||||||
|
|
||||||
|
make coverage COVERAGE_OUTPUT=${tempdir}/coverage
|
||||||
|
|
||||||
|
make doc
|
||||||
|
|
||||||
cp -r ./doc/html/ ${tempdir}
|
cp -r ./doc/html/ ${tempdir}
|
||||||
|
|
||||||
git checkout gh-pages
|
git checkout gh-pages
|
||||||
|
|
||||||
|
cp -r ${tempdir}/coverage* assets/coverage/
|
||||||
|
|
||||||
cp -r ${tempdir}/html/* assets/doxygen/
|
cp -r ${tempdir}/html/* assets/doxygen/
|
||||||
|
|
||||||
|
|
||||||
rm -rf ${tempdir}
|
rm -rf ${tempdir}
|
||||||
|
|||||||
Reference in New Issue
Block a user