Introduce build-condition for optional tests

This commit is contained in:
Petr Písař 2017-04-28 14:54:15 +02:00
parent ed9b2ecf00
commit 431285aef1

View File

@ -1,3 +1,6 @@
# Run optional tests
%{bcond_without perl_File_MimeInfo_enables_optional_test}
Name: perl-File-MimeInfo
Version: 0.28
Release: 3%{?dist}
@ -24,6 +27,7 @@ BuildRequires: perl(File::DesktopEntry) >= 0.04
BuildRequires: perl(File::Spec)
# Tests:
BuildRequires: perl(Test::More)
%if %{with perl_File_MimeInfo_enables_optional_test}
# Optional tests:
%if !%{defined perl_bootstrap}
# Break build cycle: perl-Path-Tiny → perl-Unicode-UTF8 →
@ -34,6 +38,7 @@ BuildRequires: perl(Test::Pod) >= 1.00
BuildRequires: perl(Test::Pod::Coverage) >= 1.00
# needed for some tests otherwise there are warnings
BuildRequires: shared-mime-info
%endif
# there is also a mimeinfo.cache file created by desktop-file-utils
# needed. It won't be there if building in a chroot, even if
# desktop-file-utils is installed if desktop-file-utils was never run.