tdm_monitor_LDADD = $(TDM_CLIENT_LIBS) ../common/libtdm-common.la
tdm_monitor_CFLAGS = \
-fPIE \
+ $(CFLAGS) \
$(TDM_CFLAGS) \
-I$(top_srcdir)/include \
-I$(top_srcdir)/protocol \
%define UTEST_PACKAGE 1
+%define UTEST_GCOV 0
Name: libtdm
Version: 1.11.5
UTEST="yes"
%endif
+%if "%{UTEST_GCOV}" == "1"
+CFLAGS+=" -fprofile-arcs -ftest-coverage -DTIZEN_TEST_GCOV"
+CXXFLAGS+=" -fprofile-arcs -ftest-coverage -DTIZEN_TEST_GCOV"
+LDFLAGS+=" -lgcov"
+%endif
+
%reconfigure --disable-static --with-utests=${UTEST} \
CFLAGS="${CFLAGS} -Wall -Werror" \
CXXFLAGS="${CXXFLAGS} -Wall -Werror" \
libtdm_la_LTLIBRARIES = libtdm.la
libtdm_ladir = $(libdir)
-libtdm_la_LDFLAGS = -version-number 1:0:0 -no-undefined
+libtdm_la_LDFLAGS = $(LDFLAGS) -version-number 1:0:0 -no-undefined
libtdm_la_LIBADD = $(TDM_LIBS) -ldl -lpthread ../common/libtdm-common.la
libtdm_la_CFLAGS = \
$(CFLAGS) \
#include "gtest/gtest.h"
+#ifdef TIZEN_TEST_GCOV
+extern "C" void __gcov_flush(void);
+#endif
+
int main(int argc, char **argv)
{
auto AllTestSuccess = false;
+#ifdef TIZEN_TEST_GCOV
+ setenv("GCOV_PREFIX", "/tmp", 1);
+#endif
+
try {
::testing::InitGoogleTest(&argc, argv);
::testing::FLAGS_gtest_death_test_style = "fast";
std::cout << "\n";
}
+#ifdef TIZEN_TEST_GCOV
+ __gcov_flush();
+#endif
+
return AllTestSuccess;
}
\ No newline at end of file