Add -tests subpackage with unit tests that can run in CI
Resolves: RHEL-28239
This commit is contained in:
parent
1a69ad92a7
commit
b625d11e7c
@ -9,9 +9,10 @@
|
|||||||
Summary: Qt6 - Qt3D QML bindings and C++ APIs
|
Summary: Qt6 - Qt3D QML bindings and C++ APIs
|
||||||
Name: qt6-%{qt_module}
|
Name: qt6-%{qt_module}
|
||||||
Version: 6.6.1
|
Version: 6.6.1
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
|
|
||||||
%global examples 1
|
%global examples 1
|
||||||
|
%global build_tests 1
|
||||||
|
|
||||||
License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
Url: http://www.qt.io
|
Url: http://www.qt.io
|
||||||
@ -62,6 +63,15 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|||||||
%{summary}.
|
%{summary}.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?build_tests}
|
||||||
|
%package tests
|
||||||
|
Summary: Unit tests for %{name}
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description tests
|
||||||
|
%{summary}.
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{qt_module}-everywhere-src-%{qt_version}%{?unstable:-%{prerelease}} -p1
|
%autosetup -n %{qt_module}-everywhere-src-%{qt_version}%{?unstable:-%{prerelease}} -p1
|
||||||
|
|
||||||
@ -75,6 +85,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|||||||
|
|
||||||
%cmake_qt6 \
|
%cmake_qt6 \
|
||||||
-DQT_BUILD_EXAMPLES:BOOL=%{?examples:ON}%{!?examples:OFF} \
|
-DQT_BUILD_EXAMPLES:BOOL=%{?examples:ON}%{!?examples:OFF} \
|
||||||
|
-DQT_BUILD_TESTS=%{?build_tests:ON}%{!?build_tests:OFF} \
|
||||||
-DQT_FEATURE_qt3d_system_assimp=%{?fedora:ON}%{!?fedora:OFF}
|
-DQT_FEATURE_qt3d_system_assimp=%{?fedora:ON}%{!?fedora:OFF}
|
||||||
|
|
||||||
%cmake_build
|
%cmake_build
|
||||||
@ -83,6 +94,10 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|||||||
%install
|
%install
|
||||||
%cmake_install
|
%cmake_install
|
||||||
|
|
||||||
|
%if 0%{?build_tests}
|
||||||
|
%qt6_install_tests
|
||||||
|
%endif
|
||||||
|
|
||||||
%ifarch %{multilib_archs}
|
%ifarch %{multilib_archs}
|
||||||
# multilib: qt3dcore-config_p.h
|
# multilib: qt3dcore-config_p.h
|
||||||
mv %{buildroot}%{_qt6_headerdir}/Qt3DCore/%{version}/Qt3DCore/private/qt3dcore-config_p.h %{buildroot}%{_qt6_headerdir}/Qt3DCore/%{version}/Qt3DCore/private/qt3dcore-config-%{__isa_bits}_p.h
|
mv %{buildroot}%{_qt6_headerdir}/Qt3DCore/%{version}/Qt3DCore/private/qt3dcore-config_p.h %{buildroot}%{_qt6_headerdir}/Qt3DCore/%{version}/Qt3DCore/private/qt3dcore-config-%{__isa_bits}_p.h
|
||||||
@ -200,8 +215,16 @@ popd
|
|||||||
%{_qt6_examplesdir}/
|
%{_qt6_examplesdir}/
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?build_tests}
|
||||||
|
%files tests
|
||||||
|
%{_qt6_archdatadir}/tests
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Mar 27 2024 Jan Grulich <jgrulich@redhat.com> - 6.6.1-5
|
||||||
|
- Add -tests subpackage with unit tests that can run in CI
|
||||||
|
Resolves: RHEL-28239
|
||||||
|
|
||||||
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.6.1-4
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.6.1-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user