From 6437e2a949a5fe05ee4374100181d326690ae2cc Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Stelmach?= Date: Mon, 29 Mar 2021 10:35:37 +0200 Subject: [PATCH] kdbus: build and package kdbus-tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: Icfcecc2780e6c5cdddaad0440b731ebb9dc49446 Signed-off-by: Łukasz Stelmach --- packaging/linux-rpi3.spec | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/packaging/linux-rpi3.spec b/packaging/linux-rpi3.spec index 4985a68..f7b4b32 100644 --- a/packaging/linux-rpi3.spec +++ b/packaging/linux-rpi3.spec @@ -80,6 +80,15 @@ Provides: perf = %{fullVersion} This package provides the "perf" tool that can be used to monitor performance counter events as well as various kernel internal events. +%package -n linux-kernel-kdbus-tests +License: Apache-2.0 +Summary: Kdbus tests +Group: Base/IPC +BuildRequires: libcap-devel + +%description -n linux-kernel-kdbus-tests +A single binary that tests kdbus operation. + %prep %setup -q @@ -87,6 +96,10 @@ counter events as well as various kernel internal events. %{?asan:/usr/bin/gcc-unforce-options} %{?ubsan:/usr/bin/gcc-unforce-options} +# 0. extract uapi headers +make headers_check %{?_smp_mflags} +make headers_install %{?_smp_mflags} + # 1-1. Set config file make %{config_name} %{?_smp_mflags} if ! grep -q "^CONFIG_LOCALVERSION=\"-%{variant}" .config; then @@ -106,6 +119,9 @@ make modules %{?_smp_mflags} make -s -C tools/lib/traceevent %{?_smp_mflags} NO_LIBPERL=1 make -s -C tools/perf EXTRA_CFLAGS="-fPIE -rdynamic" %{?_smp_mflags} NO_LIBPERL=1 +# 1-6. Additionally, build kdbus tests +make -C tools/testing/selftests/kdbus + %install QA_SKIP_BUILD_ROOT="DO_NOT_WANT"; export QA_SKIP_BUILD_ROOT @@ -144,6 +160,11 @@ rm -rf %{buildroot}/usr/lib/debug rm -rf %{buildroot}/usr/lib/perf rm -rf %{buildroot}/usr/share +# 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 -lr \ @@ -153,6 +174,7 @@ rsync -lr \ --exclude "/*.manifest" \ --exclude "/packaging/" \ --exclude "/.gbs.conf" \ + --exclude "/usr/include/" \ --exclude ".gitignore" \ --exclude "*\.c" \ --exclude ".tmp_vmlinux*" \ @@ -167,6 +189,7 @@ rsync -lr \ --exclude "*.o" \ --exclude "*.S" \ --exclude "*.HEX" \ + --exclude "/tools/testing/selftests/kdbus/kdbus-test" \ %{_builddir}/%{name}-%{version}/ %{buildroot}/boot/kernel/devel/kernel-devel-%{variant} @@ -198,3 +221,7 @@ rm -rf %{buildroot} /usr/bin/* /usr/libexec/* /usr/lib/traceevent/* + +%files -n linux-kernel-kdbus-tests +%defattr(-,root,root) +%{_test_runner_dir}/kdbus-test -- 2.7.4