#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
@@ -16,3 +16,4 @@

  /Scope-Upper-0.30.tar.gz

  /Scope-Upper-0.31.tar.gz

  /Scope-Upper-0.32.tar.gz

+ /Scope-Upper-0.33.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
+48 -10
@@ -1,22 +1,22 @@

  Name:           perl-Scope-Upper

  Summary:        Act on upper scopes

- Version:        0.32

- Release:        8%{?dist}

+ Version:        0.33

+ Release:        1%{?dist}

  License:        GPL+ or Artistic

  Source0:        https://cpan.metacpan.org/authors/id/V/VP/VPIT/Scope-Upper-%{version}.tar.gz 

  URL:            https://metacpan.org/release/Scope-Upper

  # Build

+ BuildRequires:  coreutils

  BuildRequires:  findutils

  BuildRequires:  gcc

  BuildRequires:  make

- BuildRequires:  perl-interpreter

  BuildRequires:  perl-devel

  BuildRequires:  perl-generators

+ BuildRequires:  perl-interpreter

  BuildRequires:  perl(Config)

  BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.76

  BuildRequires:  perl(strict)

  BuildRequires:  perl(warnings)

- BuildRequires:  sed

  # Runtime

  BuildRequires:  perl(base)

  BuildRequires:  perl(Exporter)
@@ -34,11 +34,17 @@

  # Optional tests only

  BuildRequires:  perl(Time::HiRes)

  Requires:       perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version))

- Requires:       perl(Exporter)

  Requires:       perl(XSLoader)

  

  %{?perl_default_filter}

  

+ # Filter modules bundled for tests

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

+ %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Scope::Upper::TestGenerator\\)

+ %global __requires_exclude %{__requires_exclude}|^perl\\(Test::Leaner\\)

+ %global __requires_exclude %{__requires_exclude}|^perl\\(VPIT::TestHelpers\\)

+ 

+ 

  %description

  This module lets you defer actions that will take place when the control

  flow returns into an upper scope. Currently, you can hook an upper scope
@@ -46,21 +52,46 @@

  in higher contexts. You can also return to an upper level and know which

  context was in use then.

  

+ %package tests

+ Summary:        Tests for %{name}

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

+ Requires:       perl-Test-Harness

+ Requires:       perl(Time::HiRes)

+ 

+ %description tests

+ Tests from %{name}. Execute them

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

+ 

  %prep

  %setup -q -n Scope-Upper-%{version}

- sed -i -e '1s,^#!.*perl,%(perl -MConfig -e 'print $Config{startperl}'),' \

-     samples/*

+ perl -MConfig -pi -e 's|^#!.*perl|$Config{startperl}|' samples/*

+ 

+ # 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 OPTIMIZE="%{optflags}" NO_PACKLIST=1

- make %{?_smp_mflags}

+ perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1 NO_PERLLOCAL=1

+ %{make_build}

  

  %install

- make pure_install DESTDIR=%{buildroot}

+ %{make_install}

  find %{buildroot} -type f -name '*.bs' -a -size 0 -delete

  %{_fixperms} %{buildroot}/*

  

+ # Install tests

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

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

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

+ #!/bin/sh

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

+ EOF

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

+ 

  %check

+ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')

  make test

  

  %files
@@ -69,7 +100,14 @@

  %exclude %dir %{perl_vendorarch}/auto

  %{_mandir}/man3/*.3*

  

+ %files tests

+ %{_libexecdir}/%{name}

+ 

  %changelog

+ * Tue Dec 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.33-1

+ - 0.33 bump

+ - Package tests

+ 

  * Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.32-8

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_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 (Scope-Upper-0.32.tar.gz) = 92fbc9b2e49bc1f6c66a4f10519c508ede36ba6266781397f93bd48310ae36b454112c59794f0346b8c915cfe106d2a4f673ecf20e7a2b8f11e504539691bda4

+ SHA512 (Scope-Upper-0.33.tar.gz) = ecc7abbcac6ce014632c0b289d97f0a7b15357720765207a8c91dd595ca9cb4082fc69642ef0524a3ea3e569528070bb7e97bd4196872cf74fe440469e76ec58

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

+ summary: Upstream tests

+ component: perl-Scope-Upper

+ require: perl-Scope-Upper-tests

+ test: /usr/libexec/perl-Scope-Upper/test

no initial comment

1 new commit added

  • Package tests
2 years ago

Pull-Request has been merged by jplesnik

2 years ago