add an inspect target that inspects every element feature, so we can have that added...
authorThomas Vander Stichele <thomas@apestaart.org>
Sun, 2 Jul 2006 21:45:26 +0000 (21:45 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Sun, 2 Jul 2006 21:45:26 +0000 (21:45 +0000)
Original commit message from CVS:
* Makefile.am:
* check.mak:
add an inspect target that inspects every element feature,
so we can have that added for coverage
* coverage/lcov.mak:
add support for lcov

ChangeLog
Makefile.am
check.mak
coverage/lcov.mak [new file with mode: 0644]

index fb23361..ee70f13 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2006-07-02  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+       * Makefile.am:
+       * check.mak:
+         add an inspect target that inspects every element feature,
+         so we can have that added for coverage
+       * coverage/lcov.mak:
+         add support for lcov
+
+2006-07-02  Thomas Vander Stichele  <thomas at apestaart dot org>
+
        * m4/gst-args.m4:
          when building with gcov, reset CFLAGS and friends to O0
 
index fd25770..ca8c029 100644 (file)
@@ -9,6 +9,7 @@ EXTRA_DIST = \
        gtk-doc-plugins.mak \
        plugins.xsl gstdoc-scangobj \
        gst.supp check.mak \
+       coverage/lcov.mak \
        coverage/coverage-report.pl \
        coverage/coverage-report.xsl \
        coverage/coverage-report-entry.pl
index 9b29e06..254b20b 100644 (file)
--- a/check.mak
+++ b/check.mak
@@ -121,6 +121,15 @@ valgrind: $(TESTS)
                false;                                                  \
        fi
 
+# inspect every plugin feature
+GST_INSPECT = $(GST_TOOLS_DIR)/gst-inspect-$(GST_MAJORMINOR)
+inspect:
+       @echo "Inspecting features ..."
+       for e in `$(TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2      \
+         | cut -d: -f2`;                                               \
+         do echo Inspecting $$e;                                       \
+            $(GST_INSPECT) $$e > /dev/null 2>&1; done
+
 help:
        @echo "make check                         -- run all checks"
        @echo "make torture                       -- run all checks $(LOOPS) times"
@@ -135,3 +144,5 @@ help:
        @echo "make (dir)/(test).valgrind-forever -- valgrind the given test forever"
        @echo "make (dir)/(test).valgrind.gen-suppressions -- generate suppressions"
        @echo "                                               and save to suppressions.log"
+       @echo "make inspect                       -- inspect all plugin features"
+
diff --git a/coverage/lcov.mak b/coverage/lcov.mak
new file mode 100644 (file)
index 0000000..0d23b19
--- /dev/null
@@ -0,0 +1,16 @@
+lcov:
+       find . -name "*.gcda" -exec rm {} \;
+       make -C tests/check inspect
+       make -C tests/check check
+       make lcov-report
+
+lcov-report:
+       @-rm -rf lcov
+       mkdir lcov
+       lcov --directory . --capture --output-file lcov/lcov.info
+       lcov -l lcov/lcov.info | grep -v "`cd $(top_srcdir) && pwd`" | cut -d: -f1 > lcov/remove
+       lcov -l lcov/lcov.info | grep "tests/check/" | cut -d: -f1 >> lcov/remove
+       lcov -r lcov/lcov.info `cat lcov/remove` > lcov/lcov.cleaned.info
+       rm lcov/remove
+       mv lcov/lcov.cleaned.info lcov/lcov.info
+       genhtml -o lcov lcov/lcov.info