public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jitka Plesnikova <jplesnik@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/perl-Business-ISBN] epel10.2: Package tests
Date: Tue, 18 Aug 2026 10:42:21 GMT [thread overview]
Message-ID: <178704974112.1.17516833432950713303.rpms-perl-Business-ISBN-6f4219ca7d4c@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/perl-Business-ISBN
Branch : epel10.2
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=epel10.2
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
next reply other threads:[~2026-08-18 10:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 10:42 Jitka Plesnikova [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-08-18 10:42 [rpms/perl-Business-ISBN] epel10.2: Package tests Jitka Plesnikova
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=178704974112.1.17516833432950713303.rpms-perl-Business-ISBN-6f4219ca7d4c@fedoraproject.org \
--to=jplesnik@redhat.com \
--cc=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