#1 Tests
Merged 3 years ago by ppisar. Opened 3 years ago by ppisar.
rpms/ ppisar/perl-libwww-perl rawhide  into  rawhide

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

+ 1

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

  /libwww-perl-6.50.tar.gz

  /libwww-perl-6.51.tar.gz

  /libwww-perl-6.52.tar.gz

+ /libwww-perl-6.53.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}

@@ -0,0 +1,2 @@ 

+ from Config import *

+ addFilter("-tests.noarch: W: no-documentation");

file modified
+48 -7
@@ -4,8 +4,8 @@ 

  %bcond_with perl_libwww_perl_enables_internet_test

  

  Name:           perl-libwww-perl

- Version:        6.52

- Release:        2%{?dist}

+ Version:        6.53

+ Release:        1%{?dist}

  Summary:        A Perl interface to the World-Wide Web

  License:        GPL+ or Artistic

  URL:            https://metacpan.org/release/libwww-perl
@@ -14,6 +14,7 @@ 

  Patch0:         libwww-perl-6.39-Normalize-shebangs-in-examples.patch

  BuildArch:      noarch

  BuildRequires:  coreutils

+ BuildRequires:  findutils

  BuildRequires:  make

  BuildRequires:  perl-generators

  BuildRequires:  perl-interpreter
@@ -77,7 +78,7 @@ 

  BuildRequires:  perl(File::Spec)

  BuildRequires:  perl(File::Temp)

  BuildRequires:  perl(FindBin)

- BuildRequires:  perl(HTTP::Daemon) >= 6

+ BuildRequires:  perl(HTTP::Daemon) >= 6.12

  BuildRequires:  perl(Test::Fatal)

  BuildRequires:  perl(Test::More) >= 0.96

  %if %{with perl_libwww_perl_enables_internet_test}
@@ -128,6 +129,9 @@ 

  Provides:       perl(LWP::Protocol::http::Socket) = %{version}

  Provides:       perl(LWP::Protocol::http::SocketMethods) = %{version}

  

+ # Remove underspecified dependencies

+ %global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((Authen::NTLM|Encode|File::Listing|HTTP::Cookies|HTTP::Daemon|HTTP::Date|HTTP::Negotiate|HTTP::Request|HTTP::Response|HTTP::Status|LWP::MediaTypes|MIME::Base64|Net::FTP|Net::HTTP|Test::More|URI|WWW::RobotRules)\\)$

+ 

  %description

  The libwww-perl collection is a set of Perl modules which provides a simple and

  consistent application programming interface to the World-Wide Web.  The main
@@ -135,16 +139,37 @@ 

  write WWW clients. The library also contain modules that are of more general

  use and even classes that help you implement simple HTTP servers.

  

- # Remove underspecified dependencies

- %global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((Authen::NTLM|Encode|File::Listing|HTTP::Date|HTTP::Negotiate|HTTP::Request|HTTP::Response|HTTP::Status|LWP::MediaTypes|MIME::Base64|Net::FTP|Net::HTTP|URI|WWW::RobotRules)\\)$

+ %package tests

+ Summary:        Tests for %{name}

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

+ Requires:       perl-Test-Harness

+ Requires:       perl(HTTP::Cookies) >= 6

+ Requires:       perl(HTTP::Daemon) >= 6.12

+ Requires:       perl(HTTP::Request) >= 6

+ Requires:       perl(HTTP::Response) >= 6

+ Requires:       perl(Net::HTTP) >= 6.18

+ Requires:       perl(Test::More) >= 0.96

+ %if %{with perl_libwww_perl_enables_internet_test} && %{with perl_libwww_perl_enables_optional_test}

+ Requires:       perl(Test::LeakTrace)

+ %endif

+ Requires:       perl(URI) >= 1.10

+ 

+ %description tests

+ Tests from %{name}. Execute them

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

  

  %prep

  %setup -q -n libwww-perl-%{version} 

  %patch0 -p1

  %if !%{with perl_libwww_perl_enables_internet_test}

- rm t/leak/no_leak.t t/redirect.t

- perl -i -ne 'print $_ unless m{^(?:t/leak/no_leak\.t|t/redirect\.t)}' MANIFEST

+ rm t/base/protocols/nntp.t t/leak/no_leak.t t/redirect.t

+ perl -i -ne 'print $_ unless m{^(?:t/base/protocols/nntp\.t|t/leak/no_leak\.t|t/redirect\.t)}' MANIFEST

  %endif

+ # Help generators to recognize a Perl code

+ for F in $(find t -name '*.t'); do

+     perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*\bperl}{$Config{startperl}}' "$F"

+     chmod +x "$F"

+ done

  

  %build

  # Install the aliases by default
@@ -154,6 +179,15 @@ 

  %install

  %{make_install}

  %{_fixperms} $RPM_BUILD_ROOT/*

+ # Install tests

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

+ cp -a t %{buildroot}%{_libexecdir}/%{name}

+ cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'

+ #!/bin/bash

+ unset COVERAGE PERL_LWP_ENV_HTTP_TEST_SERVER_TIMEOUT PERL_LWP_ENV_HTTP_TEST_URL

+ cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)" -r

+ EOF

+ chmod +x %{buildroot}%{_libexecdir}/%{name}/test

  

  %check

  unset COVERAGE PERL_LWP_ENV_HTTP_TEST_SERVER_TIMEOUT PERL_LWP_ENV_HTTP_TEST_URL
@@ -169,7 +203,14 @@ 

  %{_mandir}/man1/*.1*

  %{_mandir}/man3/*.3*

  

+ %files tests

+ %{_libexecdir}/%{name}

+ 

  %changelog

+ * Mon Mar 08 2021 Petr Pisar <ppisar@redhat.com> - 6.53-1

+ - 6.53 bump

+ - Package tests

+ 

  * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.52-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_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 (libwww-perl-6.52.tar.gz) = e4b62a6b816d0231c69a83cf5243b3f3551200f10fb0e319ab062b17f3373576c75d4950588b1374f463a8e956f84220737b5187bfe056b2b194077023e9e7b9

+ SHA512 (libwww-perl-6.53.tar.gz) = d45bba79bf2f3d49cf6b14591a58d04f551e0f6666e6bac32ec31018091590d5efe4313781605287dab22693bafa547dc916b010aafcc677a35a7c3a1154c8ff

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

+ summary: Upstream tests

+ component: perl-libwww-perl

+ require: perl-libwww-perl-tests

+ test: /usr/libexec/perl-libwww-perl/test