Add gating tests

Resolves: bz#1968462
This commit is contained in:
Jan Grulich 2021-06-09 12:35:20 +02:00
parent 20e61e8187
commit 3494e108ac

View File

@ -3,12 +3,14 @@
# definition borrowed from qtbase
%global multilib_archs x86_64 %{ix86} %{?mips} ppc64 ppc s390x s390 sparc64 sparcv9
%global build_tests 1
#global bootstrap 1
Summary: Qt5 - QtDeclarative component
Name: qt5-%{qt_module}
Version: 5.15.2
Release: 5%{?dist}
Release: 6%{?dist}
# See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details
License: LGPLv2 with exceptions or GPLv3 with exceptions
@ -44,7 +46,7 @@ Obsoletes: %{name}-examples < %{version}-%{release}
%global no_examples CONFIG-=compile_examples
%endif
%if 0%{?tests}
%if 0%{?build_tests}
BuildRequires: dbus-x11
BuildRequires: mesa-dri-drivers
BuildRequires: time
@ -77,6 +79,15 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%{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}
%patch0 -p1
@ -92,10 +103,20 @@ export PATH=`pwd`:$PATH
%make_build
%if 0%{?build_tests}
%qt5_build_tests
%endif
%install
%make_install INSTALL_ROOT=%{buildroot}
%if 0%{?build_tests}
%qt5_install_tests
%endif
# Fix mangling shebangs
sed -i s@\/usr\/bin\/python@\/usr\/bin\/python3@ %{buildroot}%{_qt5_libdir}/qt5/tests/auto/qml/ecmascripttests/test262.py
%ifarch %{multilib_archs}
# multilib: qv4global_p.h
mv %{buildroot}%{_qt5_headerdir}/QtQml/%{version}/QtQml/private/qv4global_p.h \
@ -200,8 +221,16 @@ make check -k -C tests ||:
%{_qt5_examplesdir}/
%endif
%if 0%{?build_tests}
%files tests
%{_qt5_libdir}/qt5/tests
%endif
%changelog
* Wed Jun 09 2021 Jan Grulich <jgrulich@redhat.com> - 5.15.2-6
- Add gating tests
Resolves: bz#1968462
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 5.15.2-5
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937