Skip to content

Commit

Permalink
Making unittests output coverage information.
Browse files Browse the repository at this point in the history
  • Loading branch information
mithro committed Jan 5, 2015
1 parent 6129022 commit 3ac06e5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ endif
if GCOV_ENABLED
coverage:
$(MAKE) -C tools coverage
$(MAKE) -C tests/unit coverage
endif

style:
Expand Down
17 changes: 17 additions & 0 deletions tests/unit/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
if GCOV_ENABLED
# --coverage
GCOV_CFLAGS = -fprofile-arcs -ftest-coverage
GCOV_LFLAGS = -fprofile-arcs -ftest-coverage
#GCOV_CFLAGS = --coverage
#GCOV_LFLAGS = --coverage
else
GCOV_CFLAGS =
GCOV_LFLAGS =
endif

include $(top_srcdir)/build/glib-tap.mk

AM_CFLAGS = $(GLIB_CFLAGS) $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) $(X_CFLAGS) $(GTK_CFLAGS) \
$(GCOV_CFLAGS) \
-DLOG_PREFIX="\"./tests/unit\""
LDADD = $(GLIB_LIBS) $(GST_LIBS) $(X_LIBS) $(LIBM) $(GTK_LIBS)

Expand All @@ -12,4 +24,9 @@ test_programs = \
gstswitchexample \
$(NULL)

if GCOV_ENABLED
coverage:
gcov *.o
endif

include $(top_srcdir)/build/Makefile.am.gitignore

0 comments on commit 3ac06e5

Please sign in to comment.