public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/perl-libnet] rawhide: Package tests
@ 2026-11-24 14:53 Jitka Plesnikova
0 siblings, 0 replies; only message in thread
From: Jitka Plesnikova @ 2026-11-24 14:53 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/perl-libnet
Branch : rawhide
Commit : 7caa8674926160a0fe79a27c003eb48e85606255
Author : Jitka Plesnikova <jplesnik@redhat.com>
Date : 2026-11-24T15:27:14+01:00
Stats : +81/-0 in 6 file(s)
URL : https://src.fedoraproject.org/rpms/perl-libnet/c/7caa8674926160a0fe79a27c003eb48e85606255?branch=rawhide
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..da7481a
--- /dev/null
+++ b/gating.yaml
@@ -0,0 +1,19 @@
+# Fedora
+--- !Policy
+id: fedora_policy
+product_versions:
+ - fedora-*
+decision_contexts:
+ - bodhi_update_push_testing
+ - bodhi_update_push_stable
+subject_type: koji_build
+rules:
+ - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
+
+# RHEL
+--- !Policy
+product_versions:
+ - rhel-*
+decision_context: osci_compose_gate
+rules:
+ - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
diff --git a/perl-libnet.spec b/perl-libnet.spec
index a98f7dc..c9cf485 100644
--- a/perl-libnet.spec
+++ b/perl-libnet.spec
@@ -24,9 +24,11 @@ Patch0: libnet-3.09-Normalize-Changes-encoding.patch
Patch1: libnet-3.08-Do-not-create-Net-libnet.cfg.patch
BuildArch: noarch
BuildRequires: coreutils
+BuildRequires: findutils
BuildRequires: make
BuildRequires: perl-generators
BuildRequires: perl-interpreter
+BuildRequires: perl(Config)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
# Getopt::Std not used because of Do-not-create-Net-libnet.cfg.patch
# IO::File not used because of Do-not-create-Net-libnet.cfg.patch
@@ -100,10 +102,24 @@ This is a collection of Perl modules which provides a simple and
consistent programming interface (API) to the client side of various
protocols used in the internet community.
+%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 libnet-%{base_version}
%patch -P0 -p1
%patch -P1 -p1
+# 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 </dev/null
@@ -112,6 +128,18 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 </dev/null
%install
%{make_install}
%{_fixperms} $RPM_BUILD_ROOT/*
+# Install tests
+mkdir -p %{buildroot}%{_libexecdir}/%{name}
+cp -a t %{buildroot}%{_libexecdir}/%{name}
+rm %{buildroot}%{_libexecdir}/%{name}/t/changes.t
+rm %{buildroot}%{_libexecdir}/%{name}/t/critic.t
+rm %{buildroot}%{_libexecdir}/%{name}/t/pod*
+cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
+#!/bin/sh
+# XXX Not run network tests in t/external/*.t
+cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
+EOF
+chmod +x %{buildroot}%{_libexecdir}/%{name}/test
%check
make test
@@ -132,10 +160,14 @@ make test
%{perl_vendorlib}/Net/libnetFAQ.pod
%{_mandir}/man3/Net::*
+%files tests
+%{_libexecdir}/%{name}
+
%changelog
* Tue Nov 24 2026 Jitka Plesnikova <jplesnik@redhat.com> - 3.17-1
- 3.17 bump (rhbz#2580692)
- Fix CVE-2026-40558 (Net::FTP::pasv() followed the server-supplied IP address in the 227 reply)
+- Package tests
* Tue Oct 27 2026 Jitka Plesnikova <jplesnik@redhat.com> - 3.16-1
- 3.16 bump (rhbz#2560316)
diff --git a/plans/internal.fmf b/plans/internal.fmf
new file mode 100644
index 0000000..f967711
--- /dev/null
+++ b/plans/internal.fmf
@@ -0,0 +1,12 @@
+summary: Private (RHEL) beakerlib tests
+enabled: false
+adjust:
+ - when: distro == rhel
+ enabled: true
+ because: private tests are accesible only within rhel pipline
+discover:
+ - name: rhel
+ how: fmf
+ url: https://pkgs.devel.redhat.com/git/tests/perl-libnet
+execute:
+ how: tmt
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..ac4298d
--- /dev/null
+++ b/tests/upstream-tests.fmf
@@ -0,0 +1,12 @@
+summary: Upstream tests
+contact: Michal Josef Spacek <mspacek@redhat.com>
+component: perl-libnet
+require: perl-libnet-tests
+test: /usr/libexec/perl-libnet/test
+enabled: true
+tag:
+ - rhel-buildroot
+adjust:
+ - enabled: false
+ when: distro < rhel-10 or distro < centos-stream-10
+ continue: false
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-24 14:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-24 14:53 [rpms/perl-libnet] rawhide: 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