Resolves: RHEL-43290 - Package tests
This commit is contained in:
parent
85b54aee58
commit
e623e4f889
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
7
gating.yaml
Normal file
7
gating.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
# RHEL
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-*
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
@ -1,6 +1,6 @@
|
||||
Name: perl-libxml-perl
|
||||
Version: 0.08
|
||||
Release: 44%{?dist}
|
||||
Release: 45%{?dist}
|
||||
Summary: A collection of Perl modules for working with XML
|
||||
License: (GPL+ or Artistic) and Public Domain
|
||||
URL: https://metacpan.org/release/libxml-perl
|
||||
@ -9,6 +9,7 @@ BuildArch: noarch
|
||||
BuildRequires: make
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: perl(Config)
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
||||
# Run-time:
|
||||
BuildRequires: perl(:VERSION) >= 5.5.0
|
||||
@ -19,7 +20,6 @@ BuildRequires: perl(UNIVERSAL)
|
||||
BuildRequires: perl(vars)
|
||||
BuildRequires: perl(XML::Parser) >= 2.19
|
||||
# Tests:
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
||||
Requires: perl(XML::Parser) >= 2.19
|
||||
|
||||
# Filter out unversioned provides
|
||||
@ -33,8 +33,22 @@ documents for working with XML in Perl. libxml-perl software works in
|
||||
combination with XML::Parser, PerlSAX, XML::DOM, XML::Grove and
|
||||
others.
|
||||
|
||||
%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 libxml-perl-%{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 Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
||||
@ -43,6 +57,22 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
||||
%install
|
||||
%{make_install}
|
||||
%{_fixperms} %{buildroot}/*
|
||||
# Install tests
|
||||
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
||||
cp -a t %{buildroot}%{_libexecdir}/%{name}
|
||||
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
||||
#!/bin/bash
|
||||
set -e
|
||||
# Some tests write into temporary files/directories. The easiest solution
|
||||
# is to copy the tests into a writable directory and execute them from there.
|
||||
DIR=$(mktemp -d)
|
||||
pushd "$DIR"
|
||||
cp -a %{_libexecdir}/%{name}/* ./
|
||||
prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
popd
|
||||
rm -rf "$DIR"
|
||||
EOF
|
||||
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
||||
|
||||
%check
|
||||
make test
|
||||
@ -51,9 +81,17 @@ make test
|
||||
%doc ChangeLog Changes README
|
||||
%{perl_vendorlib}/Data/
|
||||
%{perl_vendorlib}/XML/
|
||||
%{_mandir}/man3/*.3*
|
||||
%{_mandir}/man3/Data*.3*
|
||||
%{_mandir}/man3/XML*.3*
|
||||
|
||||
%files tests
|
||||
%{_libexecdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Mon Jul 01 2024 Jitka Plesnikova <jplesnik@redhat.com> - 0.08-45
|
||||
- Resolves: RHEL-43290
|
||||
- Package tests
|
||||
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.08-44
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
5
plans/sanity.fmf
Normal file
5
plans/sanity.fmf
Normal file
@ -0,0 +1,5 @@
|
||||
summary: Sanity tests
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
12
tests/upstream-tests.fmf
Normal file
12
tests/upstream-tests.fmf
Normal file
@ -0,0 +1,12 @@
|
||||
summary: Upstream tests
|
||||
contact: Jitka Plesnikova <jplesnik@redhat.com>
|
||||
component: perl-libxml-perl
|
||||
require: perl-libxml-perl-tests
|
||||
test: /usr/libexec/perl-libxml-perl/test
|
||||
enabled: true
|
||||
tag:
|
||||
- rhel-buildroot
|
||||
adjust:
|
||||
- enabled: false
|
||||
when: distro < rhel-9 or distro < centos-stream-9
|
||||
continue: false
|
Loading…
Reference in New Issue
Block a user