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-Darwin-InitObjC] rawhide: Package tests
Date: Fri, 29 May 2026 06:48:42 +0000 [thread overview]
Message-ID: <rpms-perl-Darwin-InitObjC-73eb2afe8894@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/perl-Darwin-InitObjC
Branch : rawhide
Commit : 73eb2afe88942d1921a96440e19ca7204245859d
Author : Jitka Plesnikova <jplesnik@redhat.com>
Date : 2026-05-29T07:59:20+02:00
Stats : +57/-3 in 5 file(s)
URL : https://src.fedoraproject.org/rpms/perl-Darwin-InitObjC/c/73eb2afe88942d1921a96440e19ca7204245859d?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..5025e30
--- /dev/null
+++ b/gating.yaml
@@ -0,0 +1,13 @@
+# 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.installability.functional}
+ - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis}
+ - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
diff --git a/perl-Darwin-InitObjC.spec b/perl-Darwin-InitObjC.spec
index 57bbe7c..21fcf2a 100644
--- a/perl-Darwin-InitObjC.spec
+++ b/perl-Darwin-InitObjC.spec
@@ -1,6 +1,6 @@
Name: perl-Darwin-InitObjC
Version: 1.0.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Initializes Objective-C runtime
License: GPL-1.0-or-later OR Artistic-1.0-Perl
URL: https://metacpan.org/dist/Darwin-InitObjC
@@ -22,18 +22,42 @@ Requires: perl(DynaLoader)
%description
Darwin::InitObjC initializes Objective-C runtime.
+%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 Darwin-InitObjC-v%{version}
+# 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 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
+export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
./Build test
%files
@@ -42,7 +66,13 @@ perl Build.PL --installdirs=vendor
%{perl_vendorlib}/Darwin*
%{_mandir}/man3/Darwin::InitObjC*
+%files tests
+%{_libexecdir}/%{name}
+
%changelog
+* Tue May 26 2026 Jitka Plesnikova <jplesnik@redhat.com> - 1.0.0-2
+- Package tests
+
* Mon May 25 2026 Jitka Plesnikova <jplesnik@redhat.com> - 1.0.0-1
- 1.0.0 bump (rhbz#2480992)
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..a447eab
--- /dev/null
+++ b/tests/upstream-tests.fmf
@@ -0,0 +1,5 @@
+summary: Upstream tests
+contact: Jitka Plesnikova <jplesnik@redhat.com>
+component: perl-Darwin-InitObjC
+require: perl-Darwin-InitObjC-tests
+test: /usr/libexec/perl-Darwin-InitObjC/test
reply other threads:[~2026-05-29 6:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=rpms-perl-Darwin-InitObjC-73eb2afe8894@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