Change-Id: Id3eebafe701c46bb08ec11949c00a79ee0330640
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
+%define USE_GCOV 0
+
Name: libds
Version: 0.0.1
Release: 0
cp %{SOURCE1001} .
%build
+%if "%{USE_GCOV}" == "1"
+CXXFLAGS+=" -fprofile-arcs -ftest-coverage -DTIZEN_TEST_GCOV"
+LDFLAGS+=" -lgcov"
+%endif
meson setup \
--prefix /usr \
--libdir %{_libdir} \
{
auto AllTestSuccess = false;
+#ifdef TIZEN_TEST_GCOV
+ setenv("GCOV_PREFIX", "/tmp", 1);
+#endif
+
try {
::testing::InitGoogleMock(&argc, argv);
::testing::FLAGS_gtest_death_test_style = "fast";
std::cout << "\n";
}
+#ifdef TIZEN_TEST_GCOV
+ __gcov_flush();
+#endif
return AllTestSuccess;
}
#include "libds-mock.h"
+#ifdef TIZEN_TEST_GCOV
+extern "C" void __gcov_flush(void);
+#endif
+
using ::testing::TestWithParam;
using ::testing::Bool;
using ::testing::Values;