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
# 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
# 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 \
--exclude "*.o" \
--exclude "*.S" \
--exclude "*.HEX" \
+ --exclude "/tools/testing/selftests/kdbus/kdbus-test" \
%{_builddir}/%{name}-%{version}/ %{buildroot}/boot/kernel/devel/kernel-devel-%{variant}
%clean
%files -n %{variant}-linux-kernel-headers
/usr/include/*
+
+%files -n %{variant}-kdbus-tests
+%defattr(-,root,root)
+%{_test_runner_dir}/kdbus-test