kdbus: build and package kdbus-tests 13/251413/5 accepted/tizen/unified/20210119.130216 submit/tizen/20210119.051826
authorŁukasz Stelmach <l.stelmach@samsung.com>
Tue, 22 Dec 2020 11:56:00 +0000 (12:56 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 15 Jan 2021 10:11:49 +0000 (10:11 +0000)
Change-Id: Ie5a32cb744a28b242aac1f43e879306a43795bb5
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
packaging/linux-rpi4.spec

index d6c28c6..9bb4c15 100644 (file)
@@ -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