public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/biber] epel10: Package the tests
@ 2026-08-18 11:23
0 siblings, 0 replies; only message in thread
From: @ 2026-08-18 11:23 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/biber
Branch : epel10
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
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-18 11:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-18 11:23 [rpms/biber] epel10: Package the tests
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox