Author: stepan Date: 2006-10-30 23:09:59 +0100 (Mon, 30 Oct 2006) New Revision: 112
Added: fcode-utils/testsuite/GenCoverage Modified: fcode-utils/Makefile Log: fix automated coverage
Modified: fcode-utils/Makefile =================================================================== --- fcode-utils/Makefile 2006-10-30 17:55:20 UTC (rev 111) +++ fcode-utils/Makefile 2006-10-30 22:09:59 UTC (rev 112) @@ -21,6 +21,8 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA #
+VERSION:=$(shell grep ^#.*TOKE_VERSION < toke/toke.c |cut -f2 -d" ) + all: make -C toke make -C detok @@ -51,6 +53,10 @@ cp romheaders/romheaders testsuite make -C testsuite all CygTestLogs=`pwd`/testlogs
+# lcov required for html reports +coverage: + @testsuite/GenCoverage . fcode-suite-$(VERSION) "FCode suite $(VERSION)" + @testsuite/GenCoverage toke toke-$(VERSION) "Toke $(VERSION)"
.PHONY: all clean distclean toke detok romheaders tests
Added: fcode-utils/testsuite/GenCoverage =================================================================== --- fcode-utils/testsuite/GenCoverage (rev 0) +++ fcode-utils/testsuite/GenCoverage 2006-10-30 22:09:59 UTC (rev 112) @@ -0,0 +1,24 @@ +#!/bin/bash + +SRCDIR=$1 +DSTDIR=$2 +BASENAME=$DSTDIR +TITLE="$3" + +printf "Generating info file..." +geninfo -t $BASENAME -o $BASENAME.info $SRCDIR 2>/dev/null +printf "ok\n" + +printf "Filtering info file..." +sed -i "/stat.h/ { +N +N +N +N +d +}" $BASENAME.info +printf "ok\n" + +genhtml --output-directory $DSTDIR --show-details --highlight --legend --frames --title "$TITLE" $BASENAME.info + +
Property changes on: fcode-utils/testsuite/GenCoverage ___________________________________________________________________ Name: svn:executable + *