Package tests
This commit is contained in:
parent
a572189779
commit
0ab3ac0f83
@ -1,2 +1,3 @@
|
|||||||
from Config import *
|
from Config import *
|
||||||
addFilter("spelling-error .* (gethostbyaddr|gethostbyname)");
|
addFilter("spelling-error .* (gethostbyaddr|gethostbyname)");
|
||||||
|
addFilter("-tests\.noarch: W: no-documentation");
|
||||||
|
@ -115,10 +115,31 @@ Recommends: perl(IO::Socket::IP) >= 0.32
|
|||||||
%description Nameserver
|
%description Nameserver
|
||||||
Instances of the "Net::DNS::Nameserver" class represent DNS server objects.
|
Instances of the "Net::DNS::Nameserver" class represent DNS server objects.
|
||||||
|
|
||||||
|
%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 Net-DNS-%{version}
|
%setup -q -n Net-DNS-%{version}
|
||||||
chmod -x demo/*
|
chmod -x demo/*
|
||||||
perl -MConfig -i -pe 's{^#!/usr/local/bin/perl}{$Config{startperl}}' demo/*
|
perl -MConfig -i -pe 's{^#!/usr/local/bin/perl}{$Config{startperl}}' demo/*
|
||||||
|
# Remove author tests
|
||||||
|
for F in \
|
||||||
|
t/00-install.t \
|
||||||
|
t/00-pod.t \
|
||||||
|
; do
|
||||||
|
rm "$F"
|
||||||
|
perl -i -ne 'print $_ unless m{\A\Q'"$F"'\E}' MANIFEST
|
||||||
|
done
|
||||||
|
# Help generators to recognize Perl scripts
|
||||||
|
for F in t/*.t; do
|
||||||
|
chmod +x "$F"
|
||||||
|
done
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export PERL_MM_USE_DEFAULT=yes
|
export PERL_MM_USE_DEFAULT=yes
|
||||||
@ -129,6 +150,14 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 --no-online-tes
|
|||||||
%{make_install}
|
%{make_install}
|
||||||
find %{buildroot} -type f -name '*.bs' -a -size 0 -delete
|
find %{buildroot} -type f -name '*.bs' -a -size 0 -delete
|
||||||
%{_fixperms} %{buildroot}/*
|
%{_fixperms} %{buildroot}/*
|
||||||
|
# Install tests
|
||||||
|
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
||||||
|
cp -a t %{buildroot}%{_libexecdir}/%{name}
|
||||||
|
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
||||||
|
#!/bin/sh
|
||||||
|
cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
||||||
|
EOF
|
||||||
|
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make test
|
make test
|
||||||
@ -149,8 +178,12 @@ make test
|
|||||||
%{perl_vendorlib}/Net/DNS/Nameserver.pm
|
%{perl_vendorlib}/Net/DNS/Nameserver.pm
|
||||||
%{_mandir}/man3/Net::DNS::Nameserver*
|
%{_mandir}/man3/Net::DNS::Nameserver*
|
||||||
|
|
||||||
|
%files tests
|
||||||
|
%{_libexecdir}/%{name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Feb 22 2022 Michal Josef Špaček <mspacek@redhat.com> - 1.33-2
|
* Tue Feb 22 2022 Michal Josef Špaček <mspacek@redhat.com> - 1.33-2
|
||||||
|
- Package tests
|
||||||
- Remove obsolete dependency to Net::DNS::SEC
|
- Remove obsolete dependency to Net::DNS::SEC
|
||||||
There was dependency until 1.29 version and it was used for tests.
|
There was dependency until 1.29 version and it was used for tests.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user