Add tests coverage report generation
[command.git] / tests / Makefile.am
index e17e256c212f08c9e279284b4ac9574b4511dbf2..fa1fbc4fca8f0c8f34f2f4f44f3095cbefdaf465 100644 (file)
@@ -48,6 +48,23 @@ AM_CXXFLAGS = -I$(top_srcdir)/include -std=c++11
 check-% :      %.test all
        @srcdir=$(srcdir); export srcdir;
 
+cov-reset:
+       rm -fr coverage
+       find . -name "*.gcda" -exec rm {} \;
+       find . -name "*.gcno" -exec rm {} \;
+       lcov --directory . --zerocounters
+
+cov-report:
+       mkdir -p coverage
+       lcov --compat-libtool --directory . --capture --output-file coverage/app.info
+       genhtml -o coverage/ coverage/app.info
+
+cov:
+       make cov-report
+
+clean-local:
+       make cov-reset
+
 descriptive_holds_data_test_SOURCES  = descriptive/holds_data.cpp
 
 callable_invokes_provided_function_test_SOURCES  = callable/invokes_provided_function.cpp