Add gcov environment 50/189350/1 tizen_coverage
authorSeokHoon Lee <andy.shlee@samsung.com>
Mon, 17 Sep 2018 07:00:20 +0000 (16:00 +0900)
committerSeokHoon Lee <andy.shlee@samsung.com>
Mon, 17 Sep 2018 07:00:38 +0000 (16:00 +0900)
Signed-off-by: SeokHoon Lee <andy.shlee@samsung.com>
Change-Id: I4ffa27fc3e42b90e640ae721781a49254fee74bf

packaging/capi-mediademuxer.spec

index 783b06b..a700115 100755 (executable)
@@ -42,6 +42,13 @@ export CFLAGS="$CFLAGS -DENABLE_FFMPEG_CODEC"
 %endif
 export CFLAGS="$CFLAGS -DSYSCONFDIR=\\\"%{_sysconfdir}\\\" -DTIZEN_FEATURE_GST_UPSTREAM"
 
+%if 0%{?gcov:1}
+export CFLAGS+=" -fprofile-arcs -ftest-coverage"
+export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
+export FFLAGS+=" -fprofile-arcs -ftest-coverage"
+export LDFLAGS+=" -lgcov"
+%endif
+
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}