public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/perl-Business-ISBN] epel9: Package tests
@ 2026-08-18 10:51 Jitka Plesnikova
  0 siblings, 0 replies; 2+ messages in thread
From: Jitka Plesnikova @ 2026-08-18 10:51 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/perl-Business-ISBN
Branch : epel9
Commit : 6f4219ca7d4c431ae437927296b1ea29a82df464
Author : Jitka Plesnikova <jplesnik@redhat.com>
Date   : 2022-01-10T12:33:36+01:00
Stats  : +50/-1 in 5 file(s)
URL    : https://src.fedoraproject.org/rpms/perl-Business-ISBN/c/6f4219ca7d4c431ae437927296b1ea29a82df464?branch=epel9

Log:
Package tests

---
diff --git a/.fmf/version b/.fmf/version
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/.fmf/version
@@ -0,0 +1 @@
+1

diff --git a/gating.yaml b/gating.yaml
new file mode 100644
index 0000000..282e16b
--- /dev/null
+++ b/gating.yaml
@@ -0,0 +1,7 @@
+--- !Policy
+product_versions:
+  - fedora-*
+decision_context: bodhi_update_push_stable
+subject_type: koji_build
+rules:
+  - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

diff --git a/perl-Business-ISBN.spec b/perl-Business-ISBN.spec
index 66d00b4..c7283eb 100644
--- a/perl-Business-ISBN.spec
+++ b/perl-Business-ISBN.spec
@@ -19,6 +19,7 @@ BuildRequires:  coreutils
 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)
@@ -54,18 +55,45 @@ ISBN-10 and ISBN-13.
 For exporting ISBN into a bar code, with png_barcode(), you need to install
 GD::Barcode::EAN13 Perl module.
 
+%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 Business-ISBN-%{cpan_version}
 
+# Help generators to recognize Perl scripts
+for F in `find t -name *.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
 %{make_build}
 
 %install
 %{make_install}
-%{_fixperms} -c $RPM_BUILD_ROOT/*
+%{_fixperms} -c %{buildroot}/*
+
+# Install tests
+mkdir -p %{buildroot}%{_libexecdir}/%{name}
+cp -a t %{buildroot}%{_libexecdir}/%{name}
+# Remove release tests
+rm %{buildroot}%{_libexecdir}/%{name}/t/pod*
+cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
+#!/bin/sh
+cd %{_libexecdir}/%{name} && exec prove -I . -r -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
@@ -74,9 +102,13 @@ make test
 %{perl_vendorlib}/*
 %{_mandir}/man3/*.3*
 
+%files tests
+%{_libexecdir}/%{name}
+
 %changelog
 * Mon Jan 10 2022 Jitka Plesnikova <jplesnik@redhat.com> - 3.007-1
 - 3.007 bump
+- Package tests
 
 * Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.006-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

diff --git a/plans/sanity.fmf b/plans/sanity.fmf
new file mode 100644
index 0000000..a72ded4
--- /dev/null
+++ b/plans/sanity.fmf
@@ -0,0 +1,5 @@
+summary: Sanity tests
+discover:
+    how: fmf
+execute:
+    how: tmt

diff --git a/tests/upstream-tests.fmf b/tests/upstream-tests.fmf
new file mode 100644
index 0000000..904a55e
--- /dev/null
+++ b/tests/upstream-tests.fmf
@@ -0,0 +1,4 @@
+summary: Upstream tests
+component: perl-Business-ISBN
+require: perl-Business-ISBN-tests
+test: /usr/libexec/perl-Business-ISBN/test

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [rpms/perl-Business-ISBN] epel9: Package tests
@ 2026-08-18 10:51 Jitka Plesnikova
  0 siblings, 0 replies; 2+ messages in thread
From: Jitka Plesnikova @ 2026-08-18 10:51 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/perl-Business-ISBN
Branch : epel9
Commit : 2e832e394bd725d8048709f141c31304c9b2fc10
Author : Jitka Plesnikova <jplesnik@redhat.com>
Date   : 2022-01-10T12:36:08+01:00
Stats  : +2/-1 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/perl-Business-ISBN/c/2e832e394bd725d8048709f141c31304c9b2fc10?branch=epel9

Log:
Package tests

---
diff --git a/perl-Business-ISBN.spec b/perl-Business-ISBN.spec
index c7283eb..2cf8b74 100644
--- a/perl-Business-ISBN.spec
+++ b/perl-Business-ISBN.spec
@@ -16,6 +16,7 @@ URL:            https://metacpan.org/release/Business-ISBN
 Source0:        https://cpan.metacpan.org/authors/id/B/BD/BDFOY/Business-ISBN-%{cpan_version}.tar.gz
 BuildArch:      noarch
 BuildRequires:  coreutils
+BuildRequires:  findutils
 BuildRequires:  make
 BuildRequires:  perl-generators
 BuildRequires:  perl-interpreter
@@ -45,7 +46,7 @@ BuildRequires:  perl(Test::Pod) >= 1.00
 BuildRequires:  perl(Test::Pod::Coverage)
 Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
 %if %{with perl_Business_ISBN_enables_PNG}
-Recommends:       perl(GD::Barcode::EAN13)
+Recommends:     perl(GD::Barcode::EAN13)
 %endif
 
 %description

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-18 10:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-18 10:51 [rpms/perl-Business-ISBN] epel9: Package tests Jitka Plesnikova
2026-08-18 10:51 Jitka Plesnikova

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox