public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/perl-Test-Exports] rawhide: Package the tests
@ 2026-06-11 7:49
0 siblings, 0 replies; only message in thread
From: @ 2026-06-11 7:49 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/perl-Test-Exports
Branch : rawhide
Commit : eb9e8d08a3385cba7423f36a1de24233bcd5119a
Author : Petr Písař <ppisar@redhat.com>
Date : 2026-06-11T09:48:11+02:00
Stats : +32/-2 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/perl-Test-Exports/c/eb9e8d08a3385cba7423f36a1de24233bcd5119a?branch=rawhide
Log:
Package the tests
---
diff --git a/perl-Test-Exports.rpmlintrc b/perl-Test-Exports.rpmlintrc
new file mode 100644
index 0000000..a5d5f5e
--- /dev/null
+++ b/perl-Test-Exports.rpmlintrc
@@ -0,0 +1 @@
+addFilter('-tests\.noarch: W: no-documentation')
diff --git a/perl-Test-Exports.spec b/perl-Test-Exports.spec
index b7ed140..495542c 100644
--- a/perl-Test-Exports.spec
+++ b/perl-Test-Exports.spec
@@ -22,21 +22,46 @@ BuildRequires: perl(Test::More) >= 0.65
BuildRequires: perl(Test::Most) >= 0.23
BuildRequires: perl(Test::Tester) >= 0.08
+# Filter underspecified dependencies
+%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(Test::(More|Most|Tester)\\)$
+
%description
This module provides simple test functions for testing other modules' import
methods. Testing is currently limited to checking which subroutines have been
imported.
+%package tests
+Summary: Tests for %{name}
+Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
+Requires: perl-Test-Harness
+Requires: perl(Test::More) >= 0.65
+Requires: perl(Test::Most) >= 0.23
+Requires: perl(Test::Tester) >= 0.08
+
+%description tests
+Tests from %{name}. Execute them
+with "%{_libexecdir}/%{name}/test".
+
%prep
%setup -q -n Test-Exports-%{version}
+# Correct permisions
+chmod a+x t/*.t
%build
perl Build.PL --installdirs=vendor
./Build
%install
-./Build install --destdir=$RPM_BUILD_ROOT --create_packlist=0
-%{_fixperms} $RPM_BUILD_ROOT/*
+./Build install --destdir=%{buildroot} --create_packlist=0
+%{_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
./Build test
@@ -47,9 +72,13 @@ perl Build.PL --installdirs=vendor
%{perl_vendorlib}/Test/Exports.pm
%{_mandir}/man3/Test::Exports.*
+%files tests
+%{_libexecdir}/%{name}
+
%changelog
* Thu Jun 11 2026 Petr Pisar <ppisar@redhat.com> - 1-12
- Modernize a spec file
+- Package the tests
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-11 7:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-11 7:49 [rpms/perl-Test-Exports] rawhide: Package the tests
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox