[0.6.229] add line coverage option 67/232067/2
authorEunhye Choi <eunhae1.choi@samsung.com>
Tue, 28 Apr 2020 05:30:22 +0000 (14:30 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Tue, 28 Apr 2020 05:31:43 +0000 (14:31 +0900)
Change-Id: I5faec48d2bcccb3b93793d687ef9f2a2203d878d

packaging/libmm-player.spec

index 4a007df..91a13e1 100644 (file)
@@ -53,6 +53,13 @@ export CFLAGS+=" -DHAVE_X11"
 %endif
 
 LDFLAGS+="-Wl,--rpath=%{_prefix}/lib -Wl,--hash-style=both -Wl,--as-needed"; export LDFLAGS
+
+%if 0%{?gcov:1}
+export CFLAGS+=" -fprofile-arcs -ftest-coverage"
+export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
+export LDFLAGS+=" -lgcov"
+%endif
+
 ./autogen.sh
 # always enable sdk build. This option should go away
 #CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS ./configure --enable-sdk --prefix=%{_prefix} --disable-static