From 2eeb92819c307007d7be3533fb6480a56fc3d01a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Stelmach?= Date: Tue, 22 Dec 2020 12:56:00 +0100 Subject: [PATCH] kdbus: build and package kdbus-tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: Ie5a32cb744a28b242aac1f43e879306a43795bb5 Signed-off-by: Łukasz Stelmach --- packaging/linux-rpi4.spec | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packaging/linux-rpi4.spec b/packaging/linux-rpi4.spec index d6c28c6..9bb4c15 100644 --- a/packaging/linux-rpi4.spec +++ b/packaging/linux-rpi4.spec @@ -74,6 +74,15 @@ This package provides userspaces headers from the Linux kernel. These headers are used by the installed headers for GNU glibc and other system libraries. +%package -n %{variant}-kdbus-tests +License: Apache-2.0 +Summary: Kdbus tests +Group: Base/IPC +BuildRequires: libcap-devel rsync + +%description -n %{variant}-kdbus-tests +A single binary that tests kdbus operation. + %prep %setup -q @@ -100,6 +109,9 @@ make dtbs %{?_smp_mflags} # 1-4. Build modules make modules %{?_smp_mflags} +# 1-5. Additionally, build kdbus tests +make -C tools/testing/selftests/kdbus + %install QA_SKIP_BUILD_ROOT="DO_NOT_WANT"; export QA_SKIP_BUILD_ROOT @@ -132,6 +144,10 @@ install -m 644 rpi4/boot/fixup*.dat %{buildroot}/boot/ # 2-5. Install kernel headers make headers_install %{?_smp_mflags} INSTALL_HDR_PATH=%{buildroot}/usr +# 2-6. install kdbus tests +%define _test_runner_dir /usr/lib/dbus-tests/runner +make -C tools/testing/selftests/kdbus INSTALL_PATH=%{buildroot}%{_test_runner_dir} install + # 3. Copy files for devel package mkdir -p %{buildroot}/boot/kernel/devel/kernel-devel-%{variant} rsync -r \ @@ -157,6 +173,7 @@ rsync -r \ --exclude "*.o" \ --exclude "*.S" \ --exclude "*.HEX" \ + --exclude "/tools/testing/selftests/kdbus/kdbus-test" \ %{_builddir}/%{name}-%{version}/ %{buildroot}/boot/kernel/devel/kernel-devel-%{variant} %clean @@ -183,3 +200,7 @@ rm -rf %{buildroot} %files -n %{variant}-linux-kernel-headers /usr/include/* + +%files -n %{variant}-kdbus-tests +%defattr(-,root,root) +%{_test_runner_dir}/kdbus-test -- 2.7.4