public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/perl-Dist-Zilla] rawhide: Package tests
@ 2026-09-15 13:30
0 siblings, 0 replies; only message in thread
From: @ 2026-09-15 13:30 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/perl-Dist-Zilla
Branch : rawhide
Commit : 49852e9d897a6991c9758acf1f4092c8693607ec
Author : Michal Josef Špaček <mspacek@redhat.com>
Date : 2026-09-15T15:01:29+02:00
Stats : +57/-0 in 6 file(s)
URL : https://src.fedoraproject.org/rpms/perl-Dist-Zilla/c/49852e9d897a6991c9758acf1f4092c8693607ec?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..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-Dist-Zilla.rpmlintrc b/perl-Dist-Zilla.rpmlintrc
new file mode 100644
index 0000000..b486f7c
--- /dev/null
+++ b/perl-Dist-Zilla.rpmlintrc
@@ -0,0 +1,6 @@
+from Config import *
+addFilter("-tests\.noarch: W: no-documentation");
+addFilter(r'non-executable-script /usr/libexec/perl-Dist-Zilla/corpus/dist/AutoPrereqs/bin/foobar')
+addFilter(r'non-executable-script /usr/libexec/perl-Dist-Zilla/corpus/dist/DZT_Bin/another_perl_script')
+addFilter(r'non-executable-script /usr/libexec/perl-Dist-Zilla/corpus/dist/DZT_Bin/test.bash')
+addFilter(r'non-executable-script /usr/libexec/perl-Dist-Zilla/corpus/dist/DZT_Bin/test.pl')
diff --git a/perl-Dist-Zilla.spec b/perl-Dist-Zilla.spec
index 837b6c7..4ff514a 100644
--- a/perl-Dist-Zilla.spec
+++ b/perl-Dist-Zilla.spec
@@ -138,6 +138,9 @@ Requires: perl(Term::UI)
%{?perl_default_filter}
# Remove under-specified dependencies
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\((App::Cmd::Setup|CPAN::Meta::Requirements|Moose|Path::Class|String::RewritePrefix)\\)$
+# Remove private modules
+%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(DZPA.*\\)
+%global __provides_exclude %{?__provides_exclude:%{__provides_exclude}|}^perl\\((DZPA.*|DZ1|DZT::Sample|Dist::Zilla::Plugin::(BrokenPlugin|JustForManifestSkipTests|MungerThatPrunesPodFiles|TestArchiveBuilder|TestAutoLicense|TestAutoName|TestReleaseProvider|Versioned)|Dist::Zilla::Stash::Heap|Foo|Foo::Bar)\\)
%description
Dist::Zilla builds distributions of code to be uploaded to the CPAN. In
@@ -148,8 +151,24 @@ by authors, and is meant to be run on a repository checkout rather than on
published, released code, it can do much more than those tools, and is free
to make much more ludicrous demands in terms of prerequisites.
+%package tests
+Summary: Tests for %{name}
+Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
+Requires: make
+Requires: perl-Test-Harness
+Requires: perl(Perl::PrereqScanner) >= 1.016
+
+%description tests
+Tests from %{name}. Execute them
+with "%{_libexecdir}/%{name}/test".
+
%prep
%setup -q -n Dist-Zilla-%{version}
+# Help generators to recognize Perl scripts
+for F in t/*.t; do
+ perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F"
+ chmod +x "$F"
+done
%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
@@ -157,6 +176,17 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
%install
%{make_install}
+# Install tests
+mkdir -p %{buildroot}%{_libexecdir}/%{name}
+cp -a t %{buildroot}%{_libexecdir}/%{name}
+cp -a corpus %{buildroot}%{_libexecdir}/%{name}
+# Uses direct *.pm files to load.
+rm %{buildroot}%{_libexecdir}/%{name}/t/compile.t
+cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
+#!/bin/sh
+cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)" -r t
+EOF
+chmod +x %{buildroot}%{_libexecdir}/%{name}/test
%{_fixperms} %{buildroot}/*
# install bash_completion script
install -D -m 0644 misc/dzil-bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/dzil
@@ -173,9 +203,13 @@ make test
%{_mandir}/man3/*
%{_sysconfdir}/bash_completion.d
+%files tests
+%{_libexecdir}/%{name}
+
%changelog
* Tue Sep 15 2026 Michal Josef Špaček <mspacek@redhat.com> - 6.039-1
- 6.039 bump
+- Package tests
- Remove nonsense filter
* Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 6.037-2
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..e0f6407
--- /dev/null
+++ b/tests/upstream-tests.fmf
@@ -0,0 +1,4 @@
+summary: Upstream tests
+component: perl-Dist-Zilla
+require: perl-Dist-Zilla-tests
+test: /usr/libexec/perl-Dist-Zilla/test
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-15 13:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15 13:30 [rpms/perl-Dist-Zilla] rawhide: Package tests
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox