From cf8ebea8179f77df569989ad6a89015c982fdb4a Mon Sep 17 00:00:00 2001 From: Rafal Pietruch Date: Tue, 27 Dec 2016 14:53:00 +0100 Subject: [PATCH] build libunwind-tests package include test-ptrace tracer with test-ptrace-misc tracee and run-ptrace-misc script to run test Change-Id: I285f10660670832f74a30e78c7755afa20e1a280 Conflicts: packaging/libunwind.spec --- packaging/libunwind.spec | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packaging/libunwind.spec b/packaging/libunwind.spec index 99812f2..3e3d98c 100644 --- a/packaging/libunwind.spec +++ b/packaging/libunwind.spec @@ -1,4 +1,5 @@ %define keepstatic 1 +%define testsdir %{_libdir}/libunwind Name: libunwind BuildRequires: gcc-c++ @@ -29,6 +30,12 @@ Provides: libunwind:%{_libdir}/libunwind.so A portable and efficient C programming interface (API) to determine the call-chain of a program. +%package tests +Summary: Package with binaries and data for libunwind tests + +%description tests +This package contains installable tests in Bash. + %prep %setup -q cp %{SOURCE1001} . @@ -41,6 +48,7 @@ autoreconf -fi export CFLAGS="%optflags -U_FORTIFY_SOURCE" %configure make %{?_smp_mflags} +make -C tests test-ptrace %install @@ -50,6 +58,11 @@ ln -sf /%{_libdir}/libunwind.so.8 $RPM_BUILD_ROOT%{_libdir}/libunwind.so # Check that ln did not create a dangling link stat %{buildroot}/$(readlink -f "%{buildroot}/%{_libdir}/libunwind.so"); +mkdir -p %{buildroot}%{testsdir} +install -m 750 tests/.libs/test-ptrace %{buildroot}%{testsdir} +install -m 750 tests/test-ptrace-misc %{buildroot}%{testsdir} +install -m 750 tests/run-ptrace-misc %{buildroot}%{testsdir} + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -78,3 +91,6 @@ stat %{buildroot}/$(readlink -f "%{buildroot}/%{_libdir}/libunwind.so"); %doc %{_mandir}/man?/* %changelog + +%files tests +%{testsdir}/* -- 2.7.4