File perl-Perl5-TestEachCommit.spec of Package perl-Perl5-TestEachCommit
#
# spec file for package perl-Perl5-TestEachCommit
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define cpan_name Perl5-TestEachCommit
Name: perl-Perl5-TestEachCommit
Version: 0.05
Release: 0
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Test each commit in a pull request to Perl core
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/J/JK/JKEENAN/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Capture::Tiny)
BuildRequires: perl(Data::Dump)
BuildRequires: perl(Devel::CheckBin)
BuildRequires: perl(String::PerlIdentifier) >= 0.06
Requires: perl(Data::Dump)
%{perl_requires}
%description
This library is intended for use by people working to maintain the at
https://github.com/Perl/perl5.
Commits to 'blead', the main development branch in the Perl repository, are
most often done by pull requests. Most such p.r.s consist of a single
commit, but commits of forty or eighty are not unknown. A continuous
integration system (CI) ensures that each p.r. is configured, built and
tested on submission and on subsequent modifications. That CI system,
however, only executes that cycle on the *final* commit in each p.r. It
cannot detect any failure in a *non-final* commit. This library provides a
way to test each commit in the p.r. to the same extent that the CI system
tests the final commit.
Why is this important? Suppose that we have a pull request that consists of
5 commits. In commit 3 the developer makes an error which causes _make_ to
fail. The developer notices that and corrects the error in commit 4. Commit
5 configures, builds and tests satisfactorily, so the CI system gives the
p.r. as a whole a PASS. The committer uses that PASS as the basis for
approving a merge of the branch into 'blead'.
Commit Configure Build Test
------------------------------------
1abcd X X X
2efab X X X
3cdef X 0 -
4dcba X X X
5fedc X X X
If, for any reason (*e.g.,* bisection), some other developer in the future
needs to say _git checkout 3cdef_, they will discover that at that commit
the build was actually broken.
%prep
%autosetup -n %{cpan_name}-%{version}
%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build
%check
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%doc Changes examples README Todo
%license LICENSE
%changelog