diff options
author | joon.c.baek <joon.c.baek@samsung.com> | 2019-06-28 11:30:40 +0900 |
---|---|---|
committer | joon.c.baek <joon.c.baek@samsung.com> | 2019-07-01 13:45:54 +0900 |
commit | 9003eb047d46ef36e2f19cd42d4a06bd95e974d4 (patch) | |
tree | 71f4a70caacbada7cd3351232baf393e4423ddea | |
parent | 4a87ccb85c870777655c4066a36dd11ba260ea6d (diff) | |
download | ttrace-submit/tizen/20190701.045532.tar.gz ttrace-submit/tizen/20190701.045532.tar.bz2 ttrace-submit/tizen/20190701.045532.zip |
make a gcov package for measuring coverage easiertizen_5.5.m2_releasesubmit/tizen_5.5_wearable_hotfix/20201027.114701submit/tizen_5.5_wearable_hotfix/20201026.1843010submit/tizen_5.5_mobile_hotfix/20201027.114301submit/tizen_5.5_mobile_hotfix/20201026.1851010submit/tizen_5.5/20191031.000013submit/tizen_5.5/20191031.000011submit/tizen_5.5/20191031.000009submit/tizen/20190701.045532accepted/tizen/unified/20190702.114958accepted/tizen/5.5/unified/wearable/hotfix/20201027.091920accepted/tizen/5.5/unified/mobile/hotfix/20201027.061108accepted/tizen/5.5/unified/20191031.034044tizen_5.5_wearable_hotfixtizen_5.5_tvtizen_5.5_mobile_hotfixaccepted/tizen_5.5_unified_wearable_hotfixaccepted/tizen_5.5_unified_mobile_hotfix
Change-Id: I8bc65b1d0767ad5cc940d6ebdb31cd622fca4c6f
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
-rw-r--r-- | packaging/ttrace.spec | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/packaging/ttrace.spec b/packaging/ttrace.spec index f922f60..5ee3a9e 100644 --- a/packaging/ttrace.spec +++ b/packaging/ttrace.spec @@ -48,16 +48,36 @@ Requires: %{name} = %{version}-%{release} %description devel T-trace library devel +%if 0%{?gcov:1} +%package gcov +Summary: ttrace(gcov) +Group: Development/Libraries +%description gcov +New T-trace library cov objects +%endif + %prep %setup -q %build +%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 + export CFLAGS="$CFLAGS -g -Wall -std=gnu99" export CXXFLAGS="$CXXFLAGS -std=c++0x -fPIE -pie -fno-exceptions" %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir} \ -DTTRACE_PROFILE=%{TTRACE_PROFILE} -DTTRACE_TIZEN_VERSION_MAJOR=%{TTRACE_TIZEN_VERSION_MAJOR} make %{?jobs:-j%jobs} +%if 0%{?gcov:1} +mkdir -p gcov-obj +find . -name '*.gcno' -exec cp '{}' gcov-obj ';' +%endif + %install rm -rf %{buildroot} %make_install @@ -71,6 +91,11 @@ cp %{SOURCE103} %{buildroot}%{_bindir} %install_service sysinit.target.wants ttrace-marker.service %install_service sysinit.target.wants sys-kernel-debug-tracing.mount +%if 0%{?gcov:1} +mkdir -p %{buildroot}%{_datadir}/gcov/obj +install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj +%endif + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -95,3 +120,8 @@ cp %{SOURCE103} %{buildroot}%{_bindir} %{_libdir}/libttrace.so %{_libdir}/libttrace.a %{_libdir}/pkgconfig/*.pc + +%if 0%{?gcov:1} +%files gcov +%{_datadir}/gcov/obj/* +%endif |