Code

Moved coverage.sh to the t/ subdirectory.
authorSebastian Harl <sh@tokkee.org>
Thu, 26 Dec 2013 12:34:45 +0000 (13:34 +0100)
committerSebastian Harl <sh@tokkee.org>
Thu, 26 Dec 2013 12:34:45 +0000 (13:34 +0100)
Makefile.am
coverage.sh [deleted file]
t/Makefile.am
t/coverage.sh [new file with mode: 0755]

index 1cf1e536037cbcd994e1e687920631bb915f3eab..10794f018ddcfba68f41c0a060be6318ec392654 100644 (file)
@@ -8,7 +8,7 @@ if BUILD_TESTING
 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
deleted file mode 100755 (executable)
index a62f883..0000000
+++ /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
-
index c74da4496d1e0b0f594a1def5de3c9a0dd7e9c68..7aa6d77af1bda155c2fc8a28b9ce3fb5b2cd4bce 100644 (file)
@@ -1,3 +1,5 @@
+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
new file mode 100755 (executable)
index 0000000..5bb1de0
--- /dev/null
@@ -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
+