public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/perl-Language-Prolog-Sugar] f44: Package the tests
Date: Mon, 13 Jul 2026 14:00:26 GMT	[thread overview]
Message-ID: <178395122628.1.16942290277272797514.rpms-perl-Language-Prolog-Sugar-82d35364865d@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/perl-Language-Prolog-Sugar
Branch : f44
Commit : 82d35364865dd5a5f2b0a15e419749101db6e018
Author : Petr Písař <ppisar@redhat.com>
Date   : 2026-07-13T15:56:20+02:00
Stats  : +24/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/perl-Language-Prolog-Sugar/c/82d35364865dd5a5f2b0a15e419749101db6e018?branch=f44

Log:
Package the tests

---
diff --git a/perl-Language-Prolog-Sugar.rpmlintrc b/perl-Language-Prolog-Sugar.rpmlintrc
new file mode 100644
index 0000000..a5d5f5e
--- /dev/null
+++ b/perl-Language-Prolog-Sugar.rpmlintrc
@@ -0,0 +1 @@
+addFilter('-tests\.noarch: W: no-documentation')

diff --git a/perl-Language-Prolog-Sugar.spec b/perl-Language-Prolog-Sugar.spec
index c6ea128..0679fa8 100644
--- a/perl-Language-Prolog-Sugar.spec
+++ b/perl-Language-Prolog-Sugar.spec
@@ -30,6 +30,15 @@ subroutines to create Prolog terms as defined in the
 Language::Prolog::Types module. Perl programs using these constructors have
 the same look as real Prolog programs.
 
+%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 Language-Prolog-Sugar-%{version}
 for F in README; do
@@ -44,7 +53,16 @@ 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}
+rm %{buildroot}%{_libexecdir}/%{name}/t/2_pods.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
 export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
@@ -57,9 +75,13 @@ make test
 %{perl_vendorlib}/Language/Prolog/Sugar.pm
 %{_mandir}/man3/Language::Prolog::Sugar.*
 
+%files tests
+%{_libexecdir}/%{name}
+
 %changelog
 * Mon Jul 13 2026 Petr Pisar <ppisar@redhat.com> - 0.07-1
 - 0.07 bump
+- Package the tests
 
 * Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.06-39
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild

                 reply	other threads:[~2026-07-13 14:00 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=178395122628.1.16942290277272797514.rpms-perl-Language-Prolog-Sugar-82d35364865d@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