Package tests
This commit is contained in:
parent
d838540aee
commit
cbd466f09b
@ -22,30 +22,41 @@ BuildRequires: perl(Exporter)
|
||||
BuildRequires: perl(if)
|
||||
BuildRequires: perl(utf8)
|
||||
# Tests:
|
||||
# Cwd not used
|
||||
# File::Basename not used
|
||||
# File::Find::Rule not used
|
||||
# IO::File not used
|
||||
# lib not used
|
||||
# Release tests are deleted
|
||||
BuildRequires: perl(Test::Inter) >= 1.09
|
||||
BuildRequires: perl(Test::More)
|
||||
# Test::Pod 1.00 not used
|
||||
# Test::Pod::Coverage 1.00 not used
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
||||
# deprecate not used on perl < 5.27.7
|
||||
|
||||
# Filter dependencies on private modules, they are not provided. Generator:
|
||||
# for F in $(find lib -type f); do perl -e '$/ = undef; $_ = <>; if (/^package #\R([\w:]*);/m) { print qq{|^perl\\\\($1\\\\)} }' "$F"; done
|
||||
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Locale::Codes::Country_Retired\\)|^perl\\(Locale::Codes::LangFam_Retired\\)|^perl\\(Locale::Codes::Script_Retired\\)|^perl\\(Locale::Codes::LangExt_Codes\\)|^perl\\(Locale::Codes::LangFam_Codes\\)|^perl\\(Locale::Codes::Script_Codes\\)|^perl\\(Locale::Codes::Language_Codes\\)|^perl\\(Locale::Codes::LangExt_Retired\\)|^perl\\(Locale::Codes::Currency_Codes\\)|^perl\\(Locale::Codes::LangVar_Retired\\)|^perl\\(Locale::Codes::Language_Retired\\)|^perl\\(Locale::Codes::Country_Codes\\)|^perl\\(Locale::Codes::LangVar_Codes\\)|^perl\\(Locale::Codes::Currency_Retired\\)
|
||||
# Filter dependencies on test subscripts
|
||||
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(do_tests\\.pl\\)
|
||||
|
||||
%description
|
||||
Locale-Codes is a distribution containing a set of modules. The modules
|
||||
each deal with different types of codes which identify parts of the locale
|
||||
including languages, countries, currency, etc.
|
||||
|
||||
%package tests
|
||||
Summary: Tests for %{name}
|
||||
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires: perl-Test-Harness
|
||||
|
||||
%description tests
|
||||
Tests from %{name}-%{version}. Execute them
|
||||
with "%{_libexecdir}/%{name}/test".
|
||||
|
||||
%prep
|
||||
%setup -q -n Locale-Codes-%{version}
|
||||
chmod -x examples/*
|
||||
chmod +x t/*.pl
|
||||
# Delete release tests
|
||||
rm t/_*
|
||||
perl -i -lne 'print $_ unless m{\At/_}' MANIFEST
|
||||
# Delete unused files
|
||||
rm t/runtests t/runtests.bat
|
||||
perl -i -lne 'print $_ unless m{\At/runtests}' MANIFEST
|
||||
|
||||
%build
|
||||
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
||||
@ -53,6 +64,13 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
||||
|
||||
%install
|
||||
%{make_install}
|
||||
mkdir -p %{buildroot}/%{_libexecdir}/%{name}
|
||||
cp -a t %{buildroot}/%{_libexecdir}/%{name}
|
||||
cat > %{buildroot}/%{_libexecdir}/%{name}/test << 'EOF'
|
||||
#!/usr/bin/sh
|
||||
cd %{_libexecdir}/%{name} && exec prove -j $(getconf _NPROCESSORS_ONLN)
|
||||
EOF
|
||||
chmod +x %{buildroot}/%{_libexecdir}/%{name}/test
|
||||
%{_fixperms} %{buildroot}/*
|
||||
|
||||
%check
|
||||
@ -65,9 +83,13 @@ make test
|
||||
%{perl_vendorlib}/*
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%files tests
|
||||
%{_libexecdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Fri Aug 30 2019 Petr Pisar <ppisar@redhat.com> - 3.62-1
|
||||
- 3.62 bump
|
||||
- Package tests
|
||||
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.61-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
Loading…
Reference in New Issue
Block a user