summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7e415d9)
raw | patch | inline | side by side (parent: 7e415d9)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 26 Dec 2013 12:34:45 +0000 (13:34 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 26 Dec 2013 12:34:45 +0000 (13:34 +0100) |
Makefile.am | patch | blob | history | |
coverage.sh | [deleted file] | patch | blob | history |
t/Makefile.am | patch | blob | history | |
t/coverage.sh | [new file with mode: 0755] | patch | blob |
diff --git a/Makefile.am b/Makefile.am
index 1cf1e536037cbcd994e1e687920631bb915f3eab..10794f018ddcfba68f41c0a060be6318ec392654 100644 (file)
--- a/Makefile.am
+++ b/Makefile.am
SUBDIRS += t
endif
-EXTRA_DIST = autogen.sh coverage.sh version-gen.sh
+EXTRA_DIST = autogen.sh version-gen.sh
version: FORCE
@# As a side-effect, this updates version.
diff --git a/coverage.sh b/coverage.sh
--- a/coverage.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /bin/bash
-#
-# SysDB -- coverage.sh
-#
-# Create a test coverage report for the System DataBase.
-
-set -e
-
-if ! which lcov || ! which genhtml; then
- echo "lcov is required in order to generate a test coverage report" >&2
- exit 1
-fi
-
-cd $( dirname "$0" )
-
-if test -e coverage; then
- echo "coverage exists already; please remove manually" >&2
- exit 1
-fi
-
-V=$( grep '^PACKAGE_VERSION' Makefile | cut -d' ' -f3 )
-if test -z "$V"; then
- echo "Unable to determine package version" >&2
- exit 1
-fi
-
-make dist
-
-tmpdir=$( mktemp -d -t )
-trap "rm -rf $tmpdir" EXIT
-
-srcdir=$( pwd )
-
-cd $tmpdir
-tar --strip-components=1 -zxf "$srcdir"/sysdb-$V.tar.gz
-if test -d "$srcdir"/.git/; then
- # copy Git database for version-gen.sh
- cp -a "$srcdir"/.git .
-fi
-
-./configure --enable-gcov --disable-shared CFLAGS="-O0 -g"
-make
-
-V1=$( grep '^PACKAGE_VERSION' Makefile | cut -d' ' -f3 )
-if test -z "$V1"; then
- # this should not happen
- V1="$V"
-fi
-
-lcov --base-directory src --directory src --zerocount
-make test
-lcov --base-directory src --directory src --no-external \
- --capture -o sysdb_coverage.info
-
-genhtml -o "$srcdir"/coverage \
- -t "SysDB $V1 test coverage" --num-spaces=4 --legend \
- sysdb_coverage.info
-
diff --git a/t/Makefile.am b/t/Makefile.am
index c74da4496d1e0b0f594a1def5de3c9a0dd7e9c68..7aa6d77af1bda155c2fc8a28b9ce3fb5b2cd4bce 100644 (file)
--- a/t/Makefile.am
+++ b/t/Makefile.am
+EXTRA_DIST = coverage.sh
+
# coverage related flags are only set when gcov is enabled
AM_CFLAGS = @STRICT_CFLAGS@ @COVERAGE_CFLAGS@
AM_LDFLAGS = @COVERAGE_LDFLAGS@
diff --git a/t/coverage.sh b/t/coverage.sh
--- /dev/null
+++ b/t/coverage.sh
@@ -0,0 +1,58 @@
+#! /bin/bash
+#
+# SysDB -- t/coverage.sh
+#
+# Create a test coverage report for the System DataBase.
+
+set -e
+
+if ! which lcov || ! which genhtml; then
+ echo "lcov is required in order to generate a test coverage report" >&2
+ exit 1
+fi
+
+cd $( dirname "$0" )/..
+
+if test -e t/coverage; then
+ echo "t/coverage exists already; please remove manually" >&2
+ exit 1
+fi
+
+V=$( grep '^PACKAGE_VERSION' Makefile | cut -d' ' -f3 )
+if test -z "$V"; then
+ echo "Unable to determine package version" >&2
+ exit 1
+fi
+
+make dist
+
+tmpdir=$( mktemp -d -t )
+trap "rm -rf $tmpdir" EXIT
+
+srcdir=$( pwd )
+
+cd $tmpdir
+tar --strip-components=1 -zxf "$srcdir"/sysdb-$V.tar.gz
+if test -d "$srcdir"/.git/; then
+ # copy Git database for version-gen.sh
+ cp -a "$srcdir"/.git .
+fi
+
+./configure --enable-gcov --disable-shared CFLAGS="-O0 -g"
+make
+
+V1=$( grep '^PACKAGE_VERSION' Makefile | cut -d' ' -f3 )
+if test -z "$V1"; then
+ # this should not happen
+ V1="$V"
+fi
+
+lcov --base-directory src --directory src --zerocount
+make test
+lcov --base-directory src --directory src --no-external \
+ --capture -o sysdb_coverage.info
+
+genhtml -o "$srcdir"/t/coverage \
+ -t "SysDB $V1 test coverage" --num-spaces=4 --legend \
+ sysdb_coverage.info
+