public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/perl-DateTime-Format-Duration] rawhide: Package the tests
@ 2026-06-01 16:06
0 siblings, 0 replies; only message in thread
From: @ 2026-06-01 16:06 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/perl-DateTime-Format-Duration
Branch : rawhide
Commit : bf0d4fa45703f6639a2886a2b8fc0e4929b4b4a7
Author : Petr Písař <ppisar@redhat.com>
Date : 2026-06-01T18:04:58+02:00
Stats : +30/-2 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/perl-DateTime-Format-Duration/c/bf0d4fa45703f6639a2886a2b8fc0e4929b4b4a7?branch=rawhide
Log:
Package the tests
---
diff --git a/perl-DateTime-Format-Duration.rpmlintrc b/perl-DateTime-Format-Duration.rpmlintrc
new file mode 100644
index 0000000..a5d5f5e
--- /dev/null
+++ b/perl-DateTime-Format-Duration.rpmlintrc
@@ -0,0 +1 @@
+addFilter('-tests\.noarch: W: no-documentation')
diff --git a/perl-DateTime-Format-Duration.spec b/perl-DateTime-Format-Duration.spec
index 70e4ba8..95e113c 100644
--- a/perl-DateTime-Format-Duration.spec
+++ b/perl-DateTime-Format-Duration.spec
@@ -19,6 +19,7 @@ BuildRequires: make
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(:VERSION) >= 5.6
+BuildRequires: perl(Config)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
@@ -44,9 +45,23 @@ Requires: perl(Data::Dumper)
This module formats and parses DateTime::Duration objects as well as other
duration representations.
+%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
%autosetup -p1 -n %{cpan_name}-%{version}
-find -type f -exec chmod -x {} +
+find -type f -exec chmod 0644 {} +
+# Help generators to recognize Perl scripts
+for F in t/*.t; do
+ perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F"
+ chmod +x "$F"
+done
%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
@@ -54,7 +69,15 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
%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
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
@@ -68,9 +91,13 @@ make test
%{perl_vendorlib}/DateTime/Format/Duration.pm
%{_mandir}/man3/DateTime::Format::Duration.*
+%files tests
+%{_libexecdir}/%{name}
+
%changelog
* Mon Jun 01 2026 Petr Pisar <ppisar@redhat.com> - 1.05-1
- 1.05 bump
+- Package the tests
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.04-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-01 16:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-01 16:06 [rpms/perl-DateTime-Format-Duration] rawhide: Package the tests
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox