Package tests; Modernize spec
This commit is contained in:
parent
bfebdce259
commit
743d02700a
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,24 +1,27 @@
|
||||
Name: perl-XML-SAX-Base
|
||||
Version: 1.09
|
||||
Release: 20%{?dist}
|
||||
Release: 21%{?dist}
|
||||
Summary: Base class SAX drivers and filters
|
||||
License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
||||
URL: https://metacpan.org/release/XML-SAX-Base
|
||||
Source0: https://cpan.metacpan.org/authors/id/G/GR/GRANTM/XML-SAX-Base-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRequires: make
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: make
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: perl(base)
|
||||
BuildRequires: perl(Carp)
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: perl(Config)
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
||||
BuildRequires: perl(overload)
|
||||
BuildRequires: perl(strict)
|
||||
BuildRequires: perl(warnings)
|
||||
# Run-time
|
||||
BuildRequires: perl(Carp)
|
||||
BuildRequires: perl(overload)
|
||||
BuildRequires: perl(vars)
|
||||
# Tests
|
||||
BuildRequires: perl(base)
|
||||
BuildRequires: perl(Test)
|
||||
BuildRequires: perl(Test::More) >= 0.88
|
||||
BuildRequires: perl(vars)
|
||||
BuildRequires: perl(warnings)
|
||||
Conflicts: perl-XML-SAX < 0.99-1
|
||||
|
||||
# Move to unversioned documentation directories from F-20
|
||||
@ -31,29 +34,61 @@ and filters. Its default behavior is to pass the input directly to the
|
||||
output unchanged. It can be useful to use this module as a base class so
|
||||
you don't have to, for example, implement the characters() callback.
|
||||
|
||||
%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
|
||||
%setup -q -n XML-SAX-Base-%{version}
|
||||
# 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
|
||||
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1
|
||||
make %{?_smp_mflags}
|
||||
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
||||
%{make_build}
|
||||
|
||||
%install
|
||||
make pure_install DESTDIR=$RPM_BUILD_ROOT
|
||||
%{_fixperms} $RPM_BUILD_ROOT
|
||||
%{make_install}
|
||||
%{_fixperms} %{buildroot}
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{our_docdir}
|
||||
mv $RPM_BUILD_ROOT%{perl_vendorlib}/XML/SAX/BuildSAXBase.pl $RPM_BUILD_ROOT%{our_docdir}
|
||||
mkdir -p %{buildroot}%{our_docdir}
|
||||
mv %{buildroot}%{perl_vendorlib}/XML/SAX/BuildSAXBase.pl %{buildroot}%{our_docdir}
|
||||
|
||||
# Install tests
|
||||
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
||||
cp -a t %{buildroot}%{_libexecdir}/%{name}
|
||||
rm %{buildroot}%{_libexecdir}/%{name}/t/release-pod-syntax.t
|
||||
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
|
||||
unset RELEASE_TESTING
|
||||
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
||||
make test
|
||||
|
||||
%files
|
||||
%doc Changes README BuildSAXBase.pl
|
||||
%{perl_vendorlib}/*
|
||||
%{_mandir}/man3/*
|
||||
%{perl_vendorlib}/XML*
|
||||
%{_mandir}/man3/XML::SAX::*
|
||||
|
||||
%files tests
|
||||
%{_libexecdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Mon Sep 18 2023 Jitka Plesnikova <jplesnik@redhat.com> - 1.09-21
|
||||
- Package tests
|
||||
|
||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.09-20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_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-XML-SAX-Base
|
||||
require: perl-XML-SAX-Base-tests
|
||||
test: /usr/libexec/perl-XML-SAX-Base/test
|
Loading…
Reference in New Issue
Block a user