Add -tests subpackage with unit tests that can run in CI
Resolves: RHEL-28239
This commit is contained in:
parent
f4302c70f5
commit
6839d3b416
@ -6,10 +6,12 @@
|
||||
%global prerelease rc2
|
||||
%endif
|
||||
|
||||
%global build_tests 1
|
||||
|
||||
Summary: Qt6 - LanguageServer component
|
||||
Name: qt6-%{qt_module}
|
||||
Version: 6.6.1
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
|
||||
License: GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
Url: http://qt.io
|
||||
@ -42,20 +44,41 @@ Requires: qt6-qtbase-devel%{?_isa}
|
||||
%description devel
|
||||
%{summary}.
|
||||
|
||||
%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
|
||||
|
||||
|
||||
%build
|
||||
%cmake_qt6
|
||||
%cmake_qt6 \
|
||||
-DQT_BUILD_EXAMPLES:BOOL=%{?examples:ON}%{!?examples:OFF} \
|
||||
-DQT_BUILD_TESTS=%{?build_tests:ON}%{!?build_tests:OFF}
|
||||
|
||||
%if 0%{?build_tests}
|
||||
%qt6_fix_tests
|
||||
%endif
|
||||
|
||||
%cmake_build
|
||||
|
||||
|
||||
%install
|
||||
%if 0%{?build_tests}
|
||||
%qt6_dont_autoinstall_tests
|
||||
%endif
|
||||
|
||||
%cmake_install
|
||||
|
||||
%if 0%{?build_tests}
|
||||
%qt6_install_tests
|
||||
%endif
|
||||
|
||||
%files
|
||||
%license LICENSES/*
|
||||
@ -79,8 +102,16 @@ Requires: qt6-qtbase-devel%{?_isa}
|
||||
%{_qt6_libdir}/qt6/modules/LanguageServerPrivate.json
|
||||
#{_qt6_libdir}/pkgconfig/*.pc
|
||||
|
||||
%if 0%{?build_tests}
|
||||
%files tests
|
||||
%{_qt6_archdatadir}/tests
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Mar 27 2024 Jan Grulich <jgrulich@redhat.com> - 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 <releng@fedoraproject.org> - 6.6.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user