public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/perl-Object-Remote] epel10.2: Package tests
@ 2026-08-03 13:37 Jitka Plesnikova
  0 siblings, 0 replies; only message in thread
From: Jitka Plesnikova @ 2026-08-03 13:37 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/perl-Object-Remote
Branch : epel10.2
Commit : e2d2c0c056a519e0f4c4dc951bd18c0401912283
Author : Jitka Plesnikova <jplesnik@redhat.com>
Date   : 2024-05-23T09:59:44+02:00
Stats  : +63/-1 in 5 file(s)
URL    : https://src.fedoraproject.org/rpms/perl-Object-Remote/c/e2d2c0c056a519e0f4c4dc951bd18c0401912283?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..3b56a2d
--- /dev/null
+++ b/gating.yaml
@@ -0,0 +1,16 @@
+--- !Policy
+product_versions:
+  - fedora-*
+decision_context: bodhi_update_push_testing
+subject_type: koji_build
+rules:
+  - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
+
+# Rawhide
+--- !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-Object-Remote.spec b/perl-Object-Remote.spec
index cb08316..c744f5b 100644
--- a/perl-Object-Remote.spec
+++ b/perl-Object-Remote.spec
@@ -81,24 +81,55 @@ Requires:       sudo
 %global __provides_exclude %__provides_exclude|^perl\\(start\\)$
 %global __provides_exclude %__provides_exclude|^perl\\(then\\)$
 
+# Filter modules bundled for tests
+%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_libexecdir}
+%global __requires_exclude %__requires_exclude|^perl\\(ORFeed.*\\)$
+%global __requires_exclude %__requires_exclude|^perl\\(ORTest.*\\)$
+%global __requires_exclude %__requires_exclude|^perl\\(t::lib::.*\\)$
+
 %description
 Object::Remote allows you to create an object in another process - usually
 one running on another machine you can connect to via ssh, although there
 are other connection mechanisms available.
 
+%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 Object-Remote-%{version}
 perl -MConfig -pi -e 's|^#!.*perl|$Config{startperl}|' bin/*
 
+# Help generators to recognize Perl scripts
+for F in t/*.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} $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}')
 make test
 
 %files
@@ -110,9 +141,13 @@ make test
 %{perl_vendorlib}/Object/Remote*
 %{_mandir}/man3/Object::Remote*
 
+%files tests
+%{_libexecdir}/%{name}
+
 %changelog
 * Thu May 23 2024 Jitka Plesnikova <jplesnik@redhat.com> - 0.004003-1
 - 0.004003 bump (rhbz#2282271)
+- Package tests
 
 * Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.004001-14
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_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..0880200
--- /dev/null
+++ b/tests/upstream-tests.fmf
@@ -0,0 +1,5 @@
+summary: Upstream tests
+contact: Jitka Plesnikova <jplesnik@redhat.com>
+component: perl-Object-Remote
+require: perl-Object-Remote-tests
+test: /usr/libexec/perl-Object-Remote/test

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-03 13:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-03 13:37 [rpms/perl-Object-Remote] epel10.2: Package tests Jitka Plesnikova

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