From bc02dd0551a456c7e4f49c3fba1663151c07289d Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Thu, 10 Jun 2021 14:51:00 +0200 Subject: [PATCH] Add gating tests Resolves: bz#1968475 --- qt5-qttools.spec | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/qt5-qttools.spec b/qt5-qttools.spec index 18f2453..5008f61 100644 --- a/qt5-qttools.spec +++ b/qt5-qttools.spec @@ -1,5 +1,7 @@ %global qt_module qttools +%global build_tests 1 + #global bootstrap 1 %if ! 0%{?bootstrap} @@ -10,7 +12,7 @@ Summary: Qt5 - QtTool components Name: qt5-qttools Version: 5.15.2 -Release: 8%{?dist} +Release: 9%{?dist} License: LGPLv3 or LGPLv2 Url: http://www.qt.io @@ -168,6 +170,15 @@ Requires: %{name}-common = %{version}-%{release} %description examples %{summary}. +%if 0%{?build_tests} +%package tests +Summary: Unit tests for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description tests +%{summary}. +%endif + %prep %setup -q -n %{qt_module}-everywhere-src-%{version} @@ -184,10 +195,17 @@ Requires: %{name}-common = %{version}-%{release} %make_build +%if 0%{?build_tests} +%qt5_build_tests +%endif %install make install INSTALL_ROOT=%{buildroot} +%if 0%{?build_tests} +%qt5_install_tests +%endif + # Add desktop files, --vendor=... helps avoid possible conflicts with qt3/qt4 desktop-file-install \ --dir=%{buildroot}%{_datadir}/applications \ @@ -477,8 +495,16 @@ fi %{_qt5_libdir}/cmake/Qt5Designer/Qt5Designer_* %endif +%if 0%{?build_tests} +%files tests +%{_qt5_libdir}/qt5/tests +%endif %changelog +* Wed Jun 09 2021 Jan Grulich - 5.15.2-9 +- Add gating tests + Resolves: bz#1968475 + * Thu May 13 2021 Tom Stellard - 5.15.2-8 - Rebuild for LLVM12