Commit 6321c27f authored by Pekka Pessi's avatar Pekka Pessi

Added --output (and --help) options to coverage script.

darcs-hash:20051007181926-65a35-347bb0bc638932671162ebc8c3b1f416f9775679.gz
parent e74c16c0
......@@ -15,5 +15,5 @@ $(srcdir)/%_tag_ref.c: $(srcdir)/%_tag.c
if ENABLE_COVERAGE
coverage:
@$(srcdir)/../../scripts/coverage $(COVERAGE_INPUT)
@$(srcdir)/../../scripts/coverage $(COVERAGE_FLAGS) $(COVERAGE_INPUT)
endif
......@@ -3,15 +3,38 @@
# Calculate coverage of source files
#
gcovflags=-n
usage ()
{
cat <<EOF
usage: coverage [OPTIONS] [output-files]
where OPTIONS are:
--output generate .gcov files
--help -h -? print this message
EOF
exit $1
}
while true; do
case "$1" in
--output ) gcovflags= ; shift ;;
'-?' | -h | --help ) usage ;;
- ) shift ; break ;;
-* ) usage 1 ;;
* ) break ;;
esac
done
{
for f in *.bb
do
test "$f" = "*.bb" && { echo "run 'make check' first"; exit 1; }
gcov -n "$f" 2>/dev/null
gcov $gcovflags "$f" 2>/dev/null
done
for f in $@
do
gcov -n "$f" 2>/dev/null
gcov $gcovflags "$f" 2>/dev/null
done
} |
awk '
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment