From 2544089320cdb183b23d92551522100728ec3de4 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Thu, 28 Mar 2024 14:40:43 +0100 Subject: [PATCH] Add -tests subpackage with unit tests that can run in CI Resolves: RHEL-28239 --- qt6-qtquick3d.spec | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/qt6-qtquick3d.spec b/qt6-qtquick3d.spec index 7c7acba..6acffcb 100644 --- a/qt6-qtquick3d.spec +++ b/qt6-qtquick3d.spec @@ -7,11 +7,12 @@ %endif %global examples 1 +%global build_tests 1 Summary: Qt6 - Quick3D Libraries and utilities Name: qt6-%{qt_module} Version: 6.6.1 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0 Url: http://www.qt.io @@ -63,6 +64,15 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %endif %endif +%if 0%{?build_tests} +%package tests +Summary: Unit tests for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description tests +%{summary}. +%endif + %prep %autosetup -n %{qt_module}-everywhere-src-%{qt_version}%{?unstable:-%{prerelease}} -p1 @@ -95,8 +105,16 @@ CXXFLAGS="$CXXFLAGS -mno-avx" %install +%if 0%{?build_tests} +%qt6_dont_autoinstall_tests +%endif + %cmake_install +%if 0%{?build_tests} +%qt6_install_tests +%endif + # hardlink files to %{_bindir}, add -qt6 postfix to not conflict mkdir %{buildroot}%{_bindir} pushd %{buildroot}%{_qt6_bindir} @@ -238,7 +256,6 @@ popd %{_qt6_plugindir}/qmltooling/libqmldbg_quick3dprofiler.so %{_qt6_libdir}/pkgconfig/*.pc - %ifnarch s390x %if 0%{?examples} %files examples @@ -246,7 +263,16 @@ popd %endif %endif +%if 0%{?build_tests} +%files tests +%{_qt6_archdatadir}/tests +%endif + %changelog +* Thu Mar 28 2024 Jan Grulich - 6.6.1-4 +- Add -tests subpackage with unit tests that can run in CI + Resolves: RHEL-28239 + * Fri Jan 26 2024 Fedora Release Engineering - 6.6.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild