Package tests
This commit is contained in:
parent
4d6131bbd0
commit
bea55caaed
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
|||||||
|
1
|
7
gating.yaml
Normal file
7
gating.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
--- !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}
|
@ -1,2 +1,3 @@
|
|||||||
from Config import *
|
from Config import *
|
||||||
addFilter("spelling-error .* UserAgent");
|
addFilter("spelling-error .* UserAgent");
|
||||||
|
addFilter("-tests.noarch: W: no-documentation");
|
||||||
|
@ -59,6 +59,15 @@ URLs with LWP. This module is a plug-in to the LWP protocol handling, so
|
|||||||
you don't use it directly. Once the module is installed LWP is able to
|
you don't use it directly. Once the module is installed LWP is able to
|
||||||
access sites using HTTP over SSL/TLS.
|
access sites using HTTP over SSL/TLS.
|
||||||
|
|
||||||
|
%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 LWP-Protocol-https-%{version}
|
%setup -q -n LWP-Protocol-https-%{version}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
@ -67,6 +76,11 @@ access sites using HTTP over SSL/TLS.
|
|||||||
rm t/apache.t
|
rm t/apache.t
|
||||||
perl -i -ne 'print $_ unless m{^t/apache.t}' MANIFEST
|
perl -i -ne 'print $_ unless m{^t/apache.t}' MANIFEST
|
||||||
%endif
|
%endif
|
||||||
|
# Help generators to recognize Perl scripts
|
||||||
|
for F in $(find t/ -name '*.t'); do
|
||||||
|
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F"
|
||||||
|
chmod +x "$F"
|
||||||
|
done
|
||||||
|
|
||||||
%build
|
%build
|
||||||
perl Makefile.PL NO_PACKLIST=1 NO_PERLLOCAL=1 INSTALLDIRS=vendor
|
perl Makefile.PL NO_PACKLIST=1 NO_PERLLOCAL=1 INSTALLDIRS=vendor
|
||||||
@ -74,6 +88,15 @@ perl Makefile.PL NO_PACKLIST=1 NO_PERLLOCAL=1 INSTALLDIRS=vendor
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%{make_install}
|
%{make_install}
|
||||||
|
# Install tests
|
||||||
|
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
||||||
|
cp -a t %{buildroot}%{_libexecdir}/%{name}
|
||||||
|
rm -f %{buildroot}%{_libexecdir}/%{name}/t/00*
|
||||||
|
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
||||||
|
#!/bin/sh
|
||||||
|
cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)" -r
|
||||||
|
EOF
|
||||||
|
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
||||||
%{_fixperms} %{buildroot}/*
|
%{_fixperms} %{buildroot}/*
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@ -85,8 +108,12 @@ make test
|
|||||||
%{perl_vendorlib}/*
|
%{perl_vendorlib}/*
|
||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
|
|
||||||
|
%files tests
|
||||||
|
%{_libexecdir}/%{name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Dec 08 2022 Michal Josef Špaček <mspacek@redhat.com> - 6.10-8
|
* Thu Dec 08 2022 Michal Josef Špaček <mspacek@redhat.com> - 6.10-8
|
||||||
|
- Package tests
|
||||||
- Update license to SPDX format
|
- Update license to SPDX format
|
||||||
|
|
||||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.10-7
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.10-7
|
||||||
|
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-LWP-Protocol-https
|
||||||
|
require: perl-LWP-Protocol-https-tests
|
||||||
|
test: /usr/libexec/perl-LWP-Protocol-https/test
|
Loading…
Reference in New Issue
Block a user