public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/perl-DateTime-Format-Duration] rawhide: Package the tests
Date: Mon, 01 Jun 2026 16:06:57 GMT	[thread overview]
Message-ID: <178033001713.1.1852602850719265158.rpms-perl-DateTime-Format-Duration-bf0d4fa45703@fedoraproject.org> (raw)

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

                 reply	other threads:[~2026-06-01 16:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178033001713.1.1852602850719265158.rpms-perl-DateTime-Format-Duration-bf0d4fa45703@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox