#1 Tests
Merged 2 years ago by jplesnik. Opened 2 years ago by jplesnik.
Unknown source rawhide  into  rawhide

file added
+1
@@ -0,0 +1,1 @@

+ 1

file modified
+1
@@ -22,3 +22,4 @@

  /Log-Log4perl-1.53.tar.gz

  /Log-Log4perl-1.54.tar.gz

  /Log-Log4perl-1.55.tar.gz

+ /Log-Log4perl-1.56.tar.gz

file added
+7
@@ -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}

file modified
+55 -3
@@ -1,10 +1,10 @@

  %bcond_without RRD

  

  Name:           perl-Log-Log4perl

- Version:        1.55

- Release:        2%{?dist}

+ Version:        1.56

+ Release:        1%{?dist}

  Summary:        Log4j implementation for Perl

- License:        GPL+ or Artistic

+ License:        GPL-1.0-or-later OR Artistic-1.0-Perl

  URL:            https://metacpan.org/release/Log-Log4perl

  Source0:        https://cpan.metacpan.org/authors/id/E/ET/ETJ/Log-Log4perl-%{version}.tar.gz

  BuildArch:      noarch
@@ -75,6 +75,11 @@

  Requires:       perl(Sys::Hostname)

  Requires:       perl(Time::HiRes)

  

+ # Filter modules bundled for tests

+ %global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_libexecdir}

+ %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Log4perlInternalTest\\)

+ %global __requires_exclude %{__requires_exclude}|^perl\\(L4pResurrectable\\)

+ 

  %description

  Log::Log4perl lets you remote-control and fine-tune the logging

  behavior of your system from the outside. It implements the widely
@@ -118,6 +123,23 @@

  Log::Log4perl::Config::DOMConfigurator adds support for log4j XML

  configuration files to Log::Log4perl Perl logging system.

  

+ %package tests

+ Summary:        Tests for %{name}

+ Requires:       %{name} = %{?epoch:%{epoch}:}%{version}-%{release}

+ Requires:       perl-Test-Harness

+ Requires:       perl(Filter::Util::Call)

+ # Optional tests

+ %if ! (0%{?rhel} >= 7)

+ Requires:       perl(DBD::CSV) >= 0.33

+ Requires:       perl(DBI) >= 1.607

+ Requires:       perl(Log::Dispatch)

+ Requires:       perl(SQL::Statement) >= 1.20

+ Requires:       perl(Sys::Syslog)

+ %endif

+ 

+ %description tests

+ Tests from %{name}. Execute them

+ with "%{_libexecdir}/%{name}/test".

  

  %prep

  %setup -q -n Log-Log4perl-%{version}
@@ -125,6 +147,12 @@

  perl -MConfig -pi -e 's|^#!/usr/local/bin/perl|$Config{startperl}|' \

      eg/newsyslog-test eg/benchmarks/simple

  

+ # Help generators to recognize Perl scripts

+ for F in t/*.t t/*.pl; 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

  %{make_build}
@@ -133,6 +161,23 @@

  %{make_install}

  %{_fixperms} %{buildroot}/*

  

+ # Install tests

+ mkdir -p %{buildroot}%{_libexecdir}/%{name}

+ cp -a eg 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

  # Shared memory tests guarded with L4P_ALL_TESTS fail in mock.

  make test
@@ -169,7 +214,14 @@

  %{perl_vendorlib}/Log/Log4perl/Config/DOMConfigurator.pm

  %{_mandir}/man3/Log::Log4perl::Config::DOMConfigurator.*

  

+ %files tests

+ %{_libexecdir}/%{name}

+ 

  %changelog

+ * Mon Sep 05 2022 Jitka Plesnikova <jplesnik@redhat.com> - 1.56-1

+ - 1.56 bump

+ - Package tests

+ 

  * Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.55-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

  

file added
+5
@@ -0,0 +1,5 @@

+ summary: Sanity tests

+ discover:

+     how: fmf

+ execute:

+     how: tmt

file modified
+1 -1
@@ -1,1 +1,1 @@

- SHA512 (Log-Log4perl-1.55.tar.gz) = 3110f3ffe740bc1db55180629673411171b621c1bbf077b0cbdf20e961f5c4ad7fed89529794100db3b4d778dd28e37d5dcc418d01a59b11c62d6f95c136a16f

+ SHA512 (Log-Log4perl-1.56.tar.gz) = aa2a6991c6e2e97627e9a70018029777a793da09763cd2ca287c8552c0e77c6617db03145fbd0e2bcf294b3399f216b9b9812e0f73aaaa08072562e991dcfc7d

@@ -0,0 +1,4 @@

+ summary: Upstream tests

+ component: perl-Log-Log4perl

+ require: perl-Log-Log4perl-tests

+ test: /usr/libexec/perl-Log-Log4perl/test

no initial comment

1 new commit added

  • Add missing test run-require perl(Filter::Util::Call)
2 years ago

Pull-Request has been merged by jplesnik

2 years ago