+
+############################
+# do the coverage report
+############################
+
+action_lcovreport() {
+ if [ "$LCOV_REPORT" = "yes" ]; then
+ case "$tree" in
+ lorikeet-heimdal*)
+ lcov --directory $builddir --capture --output-file $builddir/$tree.lcov.info
+ ;;
+ samba_3_master*)
+ lcov --base-directory $builddir --directory $builddir/.. --capture --output-file $builddir/$tree.lcov.info
+ ;;
+ samba_4*|tdb|talloc|ldb|libreplace)
+ lcov --base-directory $builddir/bin --directory $builddir/bin --capture --output-file $builddir/$tree.lcov.info
+ ;;
+ waf)
+ lcov --base-directory $builddir/demos --directory $builddir/demos --capture --output-file $builddir/$tree.lcov.info
+ ;;
+ *)
+ lcov --base-directory $builddir --directory $builddir --capture --output-file $builddir/$tree.lcov.info
+ ;;
+ esac
+ genhtml -o $builddir/coverage $builddir/$tree.lcov.info
+ rc=$?
+ echo "return code: $rc"
+ else
+ echo "LCOV_REPORT not set and lcovreport asked"
+ echo "Most probably an error please fix !"
+ return 1
+ fi
+}
+
+action_callcatcherreport() {
+ if [ "$CALLCATCHER_REPORT" = "yes" ]; then
+ case "$tree" in
+ tdb|talloc|ldb)
+ callanalyse `find $builddir/bin -name \*.so*` $builddir/bin/* > $builddir/coverage/unused-fns.txt
+ ;;
+ samba_3_master|samba_4*)
+ callanalyse `find $builddir/bin -name \*.so*` $builddir/bin/* > $builddir/coverage/all-unused-fns.txt
+ grep -v -f $srcdir/callcatcher-exceptions.grep $builddir/coverage/all-unused-fns.txt > $builddir/coverage/unused-fns.txt
+ ;;
+ esac
+ rc=$?
+ echo "return code: $rc"
+ else
+ echo "CALLCATCHER_REPORT not set and callcatcher asked"
+ echo "Most probably an error please fix !"
+ return 1
+ fi
+}
+
+