Package tests
This commit is contained in:
parent
ce1214051a
commit
5fe0516f55
2
perl-App-cpanminus.rpmlintrc
Normal file
2
perl-App-cpanminus.rpmlintrc
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
from Config import *
|
||||||
|
addFilter("-tests.noarch: W: no-documentation");
|
@ -119,6 +119,15 @@ Why? It's dependency free, requires zero configuration, and stands alone
|
|||||||
but it's maintainable and extensible with plug-ins and friendly to shell
|
but it's maintainable and extensible with plug-ins and friendly to shell
|
||||||
scripting. When running, it requires only 10 MB of RAM.
|
scripting. When running, it requires only 10 MB of RAM.
|
||||||
|
|
||||||
|
%package tests
|
||||||
|
Summary: Tests for %{name}
|
||||||
|
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||||
|
Requires: perl-Test-Harness
|
||||||
|
|
||||||
|
%description tests
|
||||||
|
Tests from %{name}. Execute them
|
||||||
|
with "%{_libexecdir}/%{name}/test".
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n App-cpanminus-%{version}
|
%setup -q -n App-cpanminus-%{version}
|
||||||
# Unbundle fat-packed modules
|
# Unbundle fat-packed modules
|
||||||
@ -132,6 +141,12 @@ done
|
|||||||
|
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
|
||||||
|
# Help generators to recognize Perl scripts
|
||||||
|
for F in t/*.t; do
|
||||||
|
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1' "$F"
|
||||||
|
chmod +x "$F"
|
||||||
|
done
|
||||||
|
|
||||||
%build
|
%build
|
||||||
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
||||||
%{make_build}
|
%{make_build}
|
||||||
@ -139,6 +154,14 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
|||||||
%install
|
%install
|
||||||
%{make_install}
|
%{make_install}
|
||||||
%{_fixperms} %{buildroot}/*
|
%{_fixperms} %{buildroot}/*
|
||||||
|
# Install tests
|
||||||
|
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
||||||
|
cp -a t %{buildroot}%{_libexecdir}/%{name}
|
||||||
|
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
||||||
|
#!/bin/bash
|
||||||
|
cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
||||||
|
EOF
|
||||||
|
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make test
|
make test
|
||||||
@ -151,9 +174,13 @@ make test
|
|||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
%{_bindir}/cpanm
|
%{_bindir}/cpanm
|
||||||
|
|
||||||
|
%files tests
|
||||||
|
%{_libexecdir}/%{name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Mar 09 2021 Petr Pisar <ppisar@redhat.com> - 1.7044-12
|
* Tue Mar 09 2021 Petr Pisar <ppisar@redhat.com> - 1.7044-12
|
||||||
- Correct an SHA version in a message
|
- Correct an SHA version in a message
|
||||||
|
- Package tests
|
||||||
|
|
||||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7044-11
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7044-11
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
Loading…
Reference in New Issue
Block a user