public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/biber] epel10.2: Package the tests
Date: Tue, 18 Aug 2026 11:40:24 GMT	[thread overview]
Message-ID: <178705322422.1.17496011390914591484.rpms-biber-1c629bc82624@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/biber
Branch : epel10.2
Commit : 1c629bc8262484f31ef150ba00ba1fb685b68179
Author : Petr Písař <ppisar@redhat.com>
Date   : 2021-05-18T12:04:57+02:00
Stats  : +54/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/biber/c/1c629bc8262484f31ef150ba00ba1fb685b68179?branch=epel10.2

Log:
Package the tests

---
diff --git a/biber.rpmlintrc b/biber.rpmlintrc
index 219bd15..f6ee413 100644
--- a/biber.rpmlintrc
+++ b/biber.rpmlintrc
@@ -1,2 +1,4 @@
 from Config import *
-addFilter("spelling-error .* (bibtex|biblatex|superset|texlive)");
+addFilter("spelling-error .* (bibtex|biblatex|superset|texlive)")
+addFilter("-tests\.noarch: W: no-documentation")
+addFilter("-tests\.noarch: W: dangling-symlink /usr/libexec/biber/")

diff --git a/biber.spec b/biber.spec
index 852b327..bfec707 100644
--- a/biber.spec
+++ b/biber.spec
@@ -28,6 +28,7 @@ BuildArch:      noarch
 BuildRequires:  coreutils
 BuildRequires:  perl-interpreter
 BuildRequires:  perl-generators
+BuildRequires:  perl(Config)
 BuildRequires:  perl(Module::Build)
 BuildRequires:  perl(strict)
 BuildRequires:  perl(utf8)
@@ -169,6 +170,17 @@ functionality.  It is often used with the popular BibLaTeX package
 (texlive-biblatex), where it is required for some features.
 
 
+%package tests
+Summary:        Tests for %{name}
+Requires:       %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
+Requires:       coreutils
+Requires:       perl-Test-Harness
+
+%description tests
+Tests from %{name}. Execute them
+with "%{_libexecdir}/%{name}/test".
+
+
 %prep
 %setup -q -n biber-%{version}
 %patch0 -p1
@@ -183,6 +195,11 @@ for F in \
     rm "$F";
     perl -i -ne 'print $_ unless m{\A\Q'"$F"'\E\b}' MANIFEST
 done
+# 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
@@ -193,6 +210,36 @@ perl Build.PL installdirs=vendor
 %install
 ./Build install destdir=%{buildroot} create_packlist=0
 %{_fixperms} %{buildroot}/*
+# Install tests
+mkdir -p %{buildroot}%{_libexecdir}/%{name}
+cp -a t %{buildroot}%{_libexecdir}/%{name}
+mkdir -p %{buildroot}%{_libexecdir}/%{name}/data/schemata
+ln -s %{perl_vendorlib}/Biber/biber-tool.conf \
+    %{buildroot}%{_libexecdir}/%{name}/data
+for F in {bcf,config}.{rnc,rng}; do
+    ln -s %{perl_vendorlib}/Biber/"$F" \
+        %{buildroot}%{_libexecdir}/%{name}/data/schemata
+done
+%if %{with biber_enables_extra_test}
+mkdir %{buildroot}%{_libexecdir}/%{name}/bin
+ln -s %{_bindir}/%{name} %{buildroot}%{_libexecdir}/%{name}/bin
+%endif
+cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
+#!/usr/bin/bash
+set -e
+# t/datalists.t via generate_bltxml_schema() writes into CWD
+DIR=$(mktemp -d)
+cp -a %{_libexecdir}/%{name}/* "$DIR"
+pushd "$DIR"
+unset BIBER_DEV_TESTS ISBN_RANGE_MESSAGE PAR_TEMP PERL_LWP_SSL_CA_FILE
+%if %{with biber_enables_extra_test}
+export BIBER_DEV_TESTS=1
+%endif
+prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
+popd
+rm -r "$DIR"
+EOF
+chmod +x %{buildroot}%{_libexecdir}/%{name}/test
 
 
 %check
@@ -211,10 +258,14 @@ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print
 %{_mandir}/man1/*
 %{perl_vendorlib}/Biber*
 
+%files tests
+%{_libexecdir}/%{name}
+
 
 %changelog
 * Tue May 18 2021 Petr Pisar <ppisar@redhat.com> - 2.16-1
 - 2.16 bump
+- Package the tests
 
 * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

                 reply	other threads:[~2026-08-18 11:40 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=178705322422.1.17496011390914591484.rpms-biber-1c629bc82624@fedoraproject.org \
    --to=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