Package tests
This commit is contained in:
parent
2f317c7597
commit
56fa198385
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
|||||||
|
1
|
@ -1,17 +0,0 @@
|
|||||||
https://rt.cpan.org/Public/Bug/Display.html?id=86060
|
|
||||||
|
|
||||||
--- lib/Mail/SPF/Util.pm
|
|
||||||
+++ lib/Mail/SPF/Util.pm
|
|
||||||
@@ -155,9 +155,9 @@ sub ipv6_address_is_ipv4_mapped {
|
|
||||||
throws I<Mail::SPF::EInvalidOptionValue>
|
|
||||||
|
|
||||||
Returns the given I<NetAddr::IP> IPv4 or IPv6 address compactly formatted as a
|
|
||||||
-I<string>. For IPv4 addresses, this is equivalent to calling L< NetAddr::IP's
|
|
||||||
-C<addr> |NetAddr::IP/addr> method. For IPv6 addresses, this is equivalent to
|
|
||||||
-calling L< NetAddr::IP's C<short> |NedAddr::IP/short> method. Throws a
|
|
||||||
+I<string>. For IPv4 addresses, this is equivalent to calling L<NetAddr::IP's
|
|
||||||
+C<addr>|NetAddr::IP/addr> method. For IPv6 addresses, this is equivalent to
|
|
||||||
+calling L<NetAddr::IP's C<short>|NetAddr::IP/short> method. Throws a
|
|
||||||
I<Mail::SPF::EInvalidOptionValue> exception if the specified object is not a
|
|
||||||
I<NetAddr::IP> IPv4 or IPv6 address object.
|
|
||||||
|
|
16
gating.yaml
Normal file
16
gating.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- fedora-*
|
||||||
|
decision_context: bodhi_update_push_testing
|
||||||
|
subject_type: koji_build
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||||
|
|
||||||
|
# Rawhide
|
||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- fedora-*
|
||||||
|
decision_context: bodhi_update_push_stable
|
||||||
|
subject_type: koji_build
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
@ -12,6 +12,7 @@ BuildRequires: coreutils
|
|||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: perl-generators
|
BuildRequires: perl-generators
|
||||||
BuildRequires: perl-interpreter
|
BuildRequires: perl-interpreter
|
||||||
|
BuildRequires: perl(Config)
|
||||||
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
||||||
BuildRequires: perl(strict)
|
BuildRequires: perl(strict)
|
||||||
BuildRequires: perl(warnings)
|
BuildRequires: perl(warnings)
|
||||||
@ -31,8 +32,6 @@ BuildRequires: perl(blib)
|
|||||||
BuildRequires: perl(Net::DNS::Resolver::Programmable) >= 0.003
|
BuildRequires: perl(Net::DNS::Resolver::Programmable) >= 0.003
|
||||||
BuildRequires: perl(Net::DNS::RR)
|
BuildRequires: perl(Net::DNS::RR)
|
||||||
BuildRequires: perl(Test::More)
|
BuildRequires: perl(Test::More)
|
||||||
# Optional tests only
|
|
||||||
BuildRequires: perl(Test::Pod) >= 1.00
|
|
||||||
Requires: perl(Net::DNS) >= 0.62
|
Requires: perl(Net::DNS) >= 0.62
|
||||||
Requires: perl(URI) >= 1.13
|
Requires: perl(URI) >= 1.13
|
||||||
|
|
||||||
@ -43,12 +42,27 @@ Requires(postun): %{_sbindir}/update-alternatives
|
|||||||
Mail::SPF is an object-oriented implementation of Sender Policy Framework
|
Mail::SPF is an object-oriented implementation of Sender Policy Framework
|
||||||
(SPF). See http://www.openspf.org for more information about SPF.
|
(SPF). See http://www.openspf.org for more information about SPF.
|
||||||
|
|
||||||
|
%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 Mail-SPF-%{version}
|
%setup -q -n Mail-SPF-%{version}
|
||||||
# Work around test suite failures with Net::DNS ≥ 0.68 (CPAN RT#78214)
|
# Work around test suite failures with Net::DNS ≥ 0.68 (CPAN RT#78214)
|
||||||
%patch -P 0
|
%patch -P 0
|
||||||
chmod -x bin/*
|
chmod -x bin/*
|
||||||
|
|
||||||
|
# Help generators to recognize Perl scripts
|
||||||
|
for F in t/*.t; do
|
||||||
|
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$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}
|
||||||
@ -62,6 +76,19 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
|||||||
%{__mv} -f %{buildroot}%{_mandir}/man1/spfquery.1 %{buildroot}%{_mandir}/man1/spfquery-%{name}.1
|
%{__mv} -f %{buildroot}%{_mandir}/man1/spfquery.1 %{buildroot}%{_mandir}/man1/spfquery-%{name}.1
|
||||||
touch %{buildroot}%{_bindir}/spfquery %{buildroot}%{_bindir}/spfd %{buildroot}%{_mandir}/man1/spfquery.1.gz
|
touch %{buildroot}%{_bindir}/spfquery %{buildroot}%{_bindir}/spfd %{buildroot}%{_mandir}/man1/spfquery.1.gz
|
||||||
|
|
||||||
|
# Install tests
|
||||||
|
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
||||||
|
cp -a t %{buildroot}%{_libexecdir}/%{name}
|
||||||
|
rm %{buildroot}%{_libexecdir}/%{name}/t/90-author*
|
||||||
|
for F in `ls %{buildroot}%{_libexecdir}/%{name}/t/*`; do
|
||||||
|
perl -i -ne 'print $_ unless m{^use blib}' $F
|
||||||
|
done
|
||||||
|
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
|
||||||
|
|
||||||
@ -87,9 +114,13 @@ fi
|
|||||||
%{_bindir}/spfquery.%{name}
|
%{_bindir}/spfquery.%{name}
|
||||||
%{_bindir}/spfd.%{name}
|
%{_bindir}/spfd.%{name}
|
||||||
|
|
||||||
|
%files tests
|
||||||
|
%{_libexecdir}/%{name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Feb 05 2024 Jitka Plesnikova <jplesnik@redhat.com> - 3.20240205-1
|
* Mon Feb 05 2024 Jitka Plesnikova <jplesnik@redhat.com> - 3.20240205-1
|
||||||
- 3.20240205 bump (rhbz#2262786)
|
- 3.20240205 bump (rhbz#2262786)
|
||||||
|
- Package tests
|
||||||
|
|
||||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.0-34
|
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.0-34
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
5
plans/sanity.fmf
Normal file
5
plans/sanity.fmf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
summary: Sanity tests
|
||||||
|
discover:
|
||||||
|
how: fmf
|
||||||
|
execute:
|
||||||
|
how: tmt
|
4
tests/upstream-tests.fmf
Normal file
4
tests/upstream-tests.fmf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
summary: Upstream tests
|
||||||
|
component: perl-Mail-SPF
|
||||||
|
require: perl-Mail-SPF-tests
|
||||||
|
test: /usr/libexec/perl-Mail-SPF/test
|
Loading…
Reference in New Issue
Block a user