| |
@@ -1,9 +1,9 @@
|
| |
- %global cpan_version 1.033
|
| |
+ %global cpan_version 1.034
|
| |
|
| |
Name: perl-Test-Output
|
| |
# Keep 2-digit precision
|
| |
Version: %(echo '%{cpan_version}' | sed 's/\(\...\)\(.\)/\1.\2/')
|
| |
- Release: 7%{?dist}
|
| |
+ Release: 1%{?dist}
|
| |
Summary: Utilities to test STDOUT and STDERR messages
|
| |
License: Artistic-2.0
|
| |
URL: https://metacpan.org/release/Test-Output
|
| |
@@ -13,6 +13,7 @@
|
| |
BuildRequires: make
|
| |
BuildRequires: perl-generators
|
| |
BuildRequires: perl-interpreter
|
| |
+ BuildRequires: perl(Config)
|
| |
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
| |
BuildRequires: perl(File::Spec)
|
| |
BuildRequires: perl(File::Spec::Functions)
|
| |
@@ -35,8 +36,22 @@
|
| |
or STDERR. A number of different utilities are included to try and be as
|
| |
flexible as possible to the tester.
|
| |
|
| |
+ %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 Test-Output-%{cpan_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 NO_PERLLOCAL=1
|
| |
@@ -44,9 +59,20 @@
|
| |
|
| |
%install
|
| |
%{make_install}
|
| |
- %{_fixperms} $RPM_BUILD_ROOT
|
| |
+ %{_fixperms} %{buildroot}
|
| |
+
|
| |
+ # Install tests
|
| |
+ mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
| |
+ cp -a t %{buildroot}%{_libexecdir}/%{name}
|
| |
+ rm %{buildroot}%{_libexecdir}/%{name}/t/pod*
|
| |
+ 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
|
| |
+ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
| |
make test
|
| |
|
| |
%files
|
| |
@@ -55,7 +81,14 @@
|
| |
%{perl_vendorlib}/Test/
|
| |
%{_mandir}/man3/Test::Output.3pm*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Fri Jul 14 2023 Jitka Plesnikova <jplesnik@redhat.com>
|
| |
+ - 1.034 bump (rhbz#2219870)
|
| |
+ - Package tests
|
| |
+
|
| |
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.03.3-7
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
| |
|
| |