summaryrefslogtreecommitdiff
path: root/packaging/odroid-linux-kernel.spec
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/odroid-linux-kernel.spec')
-rw-r--r--packaging/odroid-linux-kernel.spec22
1 files changed, 22 insertions, 0 deletions
diff --git a/packaging/odroid-linux-kernel.spec b/packaging/odroid-linux-kernel.spec
index 938028befd78..bc5dc74d0021 100644
--- a/packaging/odroid-linux-kernel.spec
+++ b/packaging/odroid-linux-kernel.spec
@@ -56,6 +56,15 @@ Provides: %{variant}-kernel-devel-uname-r = %{fullVersion}
%description -n %{variant}-linux-kernel-devel
This package provides kernel map and etc information for odroid kernel.
+%package -n kdbus-tests
+License: Apache-2.0
+Summary: Kdbus tests
+Group: Base/IPC
+BuildRequires: libcap-devel rsync
+
+%description -n kdbus-tests
+A single binary that tests kdbus operation.
+
%prep
%setup -q -n linux-kernel-%{version}
@@ -77,6 +86,9 @@ make dtbs %{?_smp_mflags}
# 3. Build modules
make modules %{?_smp_mflags}
+# Additionally, build kdbus tests
+make -C tools/testing/selftests/kdbus
+
%install
QA_SKIP_BUILD_ROOT="DO_NOT_WANT"; export QA_SKIP_BUILD_ROOT
@@ -105,6 +117,12 @@ find %{buildroot}/lib/modules/ -name "*.ko" -type f -print0 | xargs -0 chmod 755
rm -f %{buildroot}/lib/modules/%{fullVersion}/build
rm -f %{buildroot}/lib/modules/%{fullVersion}/source
+# install kdbus tests
+%define _test_runner_dir /usr/lib/dbus-tests/runner
+mkdir -p %{buildroot}%{_test_runner_dir}
+make -C tools/testing/selftests/kdbus INSTALL_PATH=%{buildroot}%{_test_runner_dir} TEST_PROGS=kdbus-test install
+make -C tools/testing/selftests/kdbus clean
+
# 9-1. remove unnecessary files to prepare for devel package
rm -f tools/mkimage*
find %{_builddir}/linux-kernel-%{version} -name "*\.HEX" -type f -delete
@@ -141,3 +159,7 @@ rm -rf %{buildroot}
/boot/*.dtb
/boot/System.map*
/boot/config*
+
+%files -n kdbus-tests
+%defattr(-,root,root)
+%{_test_runner_dir}/kdbus-test