public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/perl-String-Similarity] epel10: Package the tests
Date: Wed, 09 Sep 2026 08:47:47 GMT	[thread overview]
Message-ID: <178894366776.1.143611850485421332.rpms-perl-String-Similarity-269b6a19720f@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/perl-String-Similarity
Branch : epel10
Commit : 269b6a19720f9628fa7c0f84c9316a7edc88c80e
Author : Petr Písař <ppisar@redhat.com>
Date   : 2024-12-09T12:46:35+01:00
Stats  : +25/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/perl-String-Similarity/c/269b6a19720f9628fa7c0f84c9316a7edc88c80e?branch=epel10

Log:
Package the tests

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

diff --git a/perl-String-Similarity.spec b/perl-String-Similarity.spec
index 58656e0..af874f2 100644
--- a/perl-String-Similarity.spec
+++ b/perl-String-Similarity.spec
@@ -29,6 +29,16 @@ A value of 0 means that the strings are entirely different. A value of 1
 means that the strings are identical. Everything else lies between 0 and 1 
 and describes the amount of similarity between the strings.
 
+%package tests
+Summary:        Tests for %{name}
+BuildArch:      noarch
+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 String-Similarity-%{version}
 
@@ -38,8 +48,16 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_
 
 %install
 %{make_install}
-find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
-%{_fixperms} $RPM_BUILD_ROOT/*
+find %{buildroot} -type f -name '*.bs' -size 0 -delete
+%{_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}')
@@ -54,9 +72,13 @@ make test
 %{perl_vendorarch}/String/Similarity.pm
 %{_mandir}/man3/String::Similarity.*
 
+%files tests
+%{_libexecdir}/%{name}
+
 %changelog
 * Mon Dec 09 2024 Petr Pisar <ppisar@redhat.com> - 1.04-45
 - Modernize a spec file
+- Package the tests
 
 * Fri Jul 26 2024 Miroslav Suchý <msuchy@redhat.com> - 1.04-44
 - convert license to SPDX

                 reply	other threads:[~2026-09-09  8:47 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=178894366776.1.143611850485421332.rpms-perl-String-Similarity-269b6a19720f@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