From dba0ec0c65af810f241748f61d10eb2a4fd87879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Sun, 17 Nov 2019 23:37:17 +0100 Subject: [PATCH] spec: added %check to run unit tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also shipped 'tests' in sources. Signed-off-by: Jaroslav Škarvada --- tuned.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tuned.spec b/tuned.spec index a4c4119..99537b6 100644 --- a/tuned.spec +++ b/tuned.spec @@ -59,15 +59,22 @@ Requires(post): systemd, virt-what Requires(preun): systemd Requires(postun): systemd BuildRequires: %{_py}, %{_py}-devel +# BuildRequires for 'make test' +BuildRequires: %{_py}-unittest2, %{_py}-flexmock, %{_py}-configobj +BuildRequires: %{_py}-decorator, %{_py}-pyudev Requires: %{_py}-decorator, %{_py}-pyudev, %{_py}-configobj Requires: %{_py}-schedutils, %{_py}-linux-procfs, %{_py}-perf # requires for packages with inconsistent python2/3 names %if %{with python3} +# BuildRequires for 'make test' +BuildRequires: python3-dbus, python3-gobject-base Requires: python3-dbus, python3-gobject-base %if 0%{?fedora} > 22 || 0%{?rhel} > 7 Recommends: python3-dmidecode %endif %else +# BuildRequires for 'make test' +BuildRequires: dbus-python, pygobject3-base Requires: dbus-python, pygobject3-base %if 0%{?fedora} > 22 || 0%{?rhel} > 7 Recommends: python-dmidecode @@ -254,6 +261,9 @@ touch %{buildroot}%{_sysconfdir}/modprobe.d/kvm.rt.tuned.conf # validate desktop file desktop-file-validate %{buildroot}%{_datadir}/applications/tuned-gui.desktop +%check +make test + %post %systemd_post tuned.service