Package the tests

epel9
Petr Písař 3 years ago
parent 693bab4241
commit 6bd31dc935

@ -0,0 +1 @@
addFilter('-tests\.noarch: W: no-documentation')

@ -1,6 +1,6 @@
Name: perl-Devel-ArgNames Name: perl-Devel-ArgNames
Version: 0.03 Version: 0.03
Release: 24%{?dist} Release: 25%{?dist}
Summary: Figure out the names of variables passed into subroutines Summary: Figure out the names of variables passed into subroutines
License: GPL+ or Artistic License: GPL+ or Artistic
URL: https://metacpan.org/release/Devel-ArgNames URL: https://metacpan.org/release/Devel-ArgNames
@ -28,6 +28,16 @@ Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
This Perl module provides a function which returns the names associated This Perl module provides a function which returns the names associated
with the variables found on @_. with the variables found on @_.
%package tests
Summary: Tests for %{name}
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: perl-Test-Harness
Requires: perl(Devel::ArgNames)
%description tests
Tests from %{name}. Execute them
with "%{_libexecdir}/%{name}/test".
%prep %prep
%setup -q -n Devel-ArgNames-%{version} %setup -q -n Devel-ArgNames-%{version}
@ -37,16 +47,31 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
%install %install
%{make_install} %{make_install}
%{_fixperms} $RPM_BUILD_ROOT/* %{_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
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
make test make test
%files %files
%{perl_vendorlib}/* %{perl_vendorlib}/*
%{_mandir}/man3/* %{_mandir}/man3/*
%files tests
%{_libexecdir}/%{name}
%changelog %changelog
* Thu Jun 30 2022 Petr Pisar <ppisar@redhat.com> - 0.03-25
- Package the tests
* Tue May 31 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.03-24 * Tue May 31 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.03-24
- Perl 5.36 rebuild - Perl 5.36 rebuild

Loading…
Cancel
Save